Ignore:
Timestamp:
Apr 16, 2018, 9:51:02 AM (7 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
Children:
32cab5b, 6040e67d, 9181f1d, f38e7d7
Parents:
0a89a8f
Message:

update to support more bison directives

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/prettyprinter/parser.yy

    r0a89a8f r81bb114  
    1010// Created On       : Sat Dec 15 13:44:21 2001
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Tue Aug 29 16:34:10 2017
    13 // Update Count     : 1047
     12// Last Modified On : Sun Apr 15 21:40:30 2018
     13// Update Count     : 1052
    1414//
    1515
     
    6161%token<tokenp>  CODE                                                                    // C code
    6262
    63 %token<tokenp>  START                                                                   // %start
    64 %token<tokenp>  UNION                                                                   // %union
    65 %token<tokenp>  TOKEN                                                                   // %token
     63%token<tokenp>  DEFINE                                                                  // %define
     64%token<tokenp>  EXPECT                                                                  // %expect
    6665%token<tokenp>  LEFT                                                                    // %left
    67 %token<tokenp>  RIGHT                                                                   // %right
     66%token<tokenp>  LOCATIONS                                                               // %locations
    6867%token<tokenp>  NONASSOC                                                                // %nonassoc
    6968%token<tokenp>  PRECEDENCE                                                              // %precedence
     69%token<tokenp>  PURE_PARSER                                                             // %pure_parser
     70%token<tokenp>  RIGHT                                                                   // %right
     71%token<tokenp>  SEMANTIC_PARSER                                                 // %semantic_parser
     72%token<tokenp>  START                                                                   // %start
     73%token<tokenp>  THONG                                                                   // %thong
     74%token<tokenp>  TOKEN                                                                   // %token
    7075%token<tokenp>  TYPE                                                                    // %type
    71 %token<tokenp>  PURE_PARSER                                                             // %pure_parser
    72 %token<tokenp>  SEMANTIC_PARSER                                                 // %semantic_parser
    73 %token<tokenp>  EXPECT                                                                  // %expect
    74 %token<tokenp>  THONG                                                                   // %thong
     76%token<tokenp>  UNION                                                                   // %union
    7577
    7678%token<tokenp>  PREC                                                                    // %prec
    7779
    78 %token          END_TERMINALS                                                           // ALL TERMINAL TOKEN NAMES MUST APPEAR BEFORE THIS
     80%token                  END_TERMINALS                                                   // ALL TERMINAL TOKEN NAMES MUST APPEAR BEFORE THIS
    7981
    8082%type<tokenp>   sections
    81 %token          _SECTIONS
     83%token                  _SECTIONS
    8284%type<tokenp>   mark
    8385%type<tokenp>   defsection_opt
    84 %token          _DEFSECTION_OPT
     86%token                  _DEFSECTION_OPT
    8587%type<tokenp>   declarations
    8688%type<tokenp>   literalblock
    87 %token          _LITERALBLOCK
     89%token                  _LITERALBLOCK
    8890%type<tokenp>   declaration
    89 %token          _DECLARATION
     91%token                  _DECLARATION
    9092%type<tokenp>   union
    9193%type<tokenp>   rword
    9294%type<tokenp>   tag_opt
    93 %token          _TAG_OPT
     95%token                  _TAG_OPT
    9496%type<tokenp>   namenolist
    95 %token          _NAMENOLIST
     97%token                  _NAMENOLIST
    9698%type<tokenp>   nameno
    97 %token          _NAMENO
     99%token                  _NAMENO
    98100%type<tokenp>   namelist
    99 %token          _NAMELIST
     101%token                  _NAMELIST
    100102%type<tokenp>   name
    101103%type<tokenp>   rulesection
    102 %token          _RULESECTION
     104%token                  _RULESECTION
    103105%type<tokenp>   rules
    104 %token          _RULE
     106%token                  _RULE
    105107%type<tokenp>   lhs
    106 %token          _LHS
     108%token                  _LHS
    107109%type<tokenp>   rhs
    108 %token          _RHS
     110%token                  _RHS
    109111%type<tokenp>   prod
    110112%type<tokenp>   prec
    111 %token          _PREC
     113%token                  _PREC
    112114%type<tokenp>   action
    113 %token          _ACTION
     115%token                  _ACTION
    114116%type<tokenp>   usersection_opt
    115 %token          _USERSECTION_OPT
     117%token                  _USERSECTION_OPT
    116118%type<tokenp>   ccode_opt
    117119%type<tokenp>   blocks
     
    234236                    $$ = $1;
    235237                }
     238        | DEFINE                                                                                        // bison
     239        | LOCATIONS
    236240        | THONG                                                                                         // bison
    237241        ;
Note: See TracChangeset for help on using the changeset viewer.