modules/rpsl/aggr_bndry.y

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following functions.
  1. yyparse
  2. aggr_bndryerror

   1 %{
   2 /*
   3   filename: aggr_bndry.y
   4 
   5   description:
   6     Defines the grammar for an RPSL aggr-bndry attribute.  It was mostly
   7     stolen from the IRRToolSet, simplified by removing ability to parse
   8     things defined by a dictionary (we use XML for extensibility rather
   9     than a dictionary).
  10 
  11   notes:
  12     Defines tokens for the associated lexer, aggr_bndry.l.
  13 */
  14 %}
  15 
  16 %token OP_OR OP_AND
  17 %token KEYW_EXCEPT
  18 %token TKN_ASNO TKN_ASNAME
  19 
  20 %{
  21 #include <stdio.h>
  22 #include <stdarg.h>
  23 #include <stdlib.h>
  24 
  25 int yyerror(const char *s);
  26 
  27 %}
  28 
  29 %%
     /* [<][>][^][v][top][bottom][index][help] */
  30 
  31 aggr_bndry: as_expr
  32 ;
  33 
  34 as_expr: as_expr OP_OR as_expr_term
  35 | as_expr_term
  36 ;
  37 
  38 as_expr_term: as_expr_term OP_AND as_expr_factor 
  39 | as_expr_term KEYW_EXCEPT as_expr_factor 
  40 | as_expr_factor
  41 ;
  42 
  43 as_expr_factor: '(' as_expr ')' 
  44 | as_expr_operand
  45 ;
  46 
  47 as_expr_operand: TKN_ASNO
  48 | TKN_ASNAME
  49 ;
  50 
  51 %%
  52 
  53 #undef aggr_bndryerror
  54 #undef yyerror
  55 
  56 int
  57 aggr_bndryerror (const char *s)
     /* [<][>][^][v][top][bottom][index][help] */
  58 {
  59     yyerror(s);
  60     return 0;
  61 }
  62 
  63 

/* [<][>][^][v][top][bottom][index][help] */