PageRenderTime 36ms CodeModel.GetById 2ms app.highlight 19ms RepoModel.GetById 1ms app.codeStats 1ms

/parser.y

https://github.com/gitpan/Rinchi-Fortran-Preprocessor
Happy | 1834 lines | 1485 code | 349 blank | 0 comment | 0 complexity | 72458533a1c130f5e859ed4f0c946462 MD5 | raw file
   1%{
   2#include <stdio.h>
   3#include "parser_routines.h"
   4#include "tree.h"
   5#include "lexer.h"
   6#define YYDEBUG 1
   7#define YYERROR_VERBOSE 1
   8//define YYSTYPE int
   9char *getCurrentFilename();
  10void yyerror(char const *s);
  11int yypp_lex (void);
  12
  13%}
  14
  15%no-lines
  16%name-prefix="yypp_"
  17%locations
  18
  19%union {
  20  float fval;
  21  char *sval;
  22  unsigned int uval;
  23  int ival;
  24  long lval;
  25}
  26
  27%token ECS_NULL
  28%token ASC_SOH
  29%token ASC_STX
  30%token ASC_ETX
  31%token ASC_EOT
  32%token ASC_ENQ
  33%token ASC_ACK
  34%token ECS_ALERT
  35%token ECS_BACKSPACE
  36%token BCS_WHTSP_TAB
  37%token BCS_WHTSP_NEWLINE
  38%token BCS_WHTSP_VERTICAL_TAB
  39%token BCS_WHTSP_FORMFEED
  40%token ECS_CARRIAGE_RETURN
  41%token ASC_SHIFT_OUT
  42%token ASC_SHIFT_IN
  43%token ASC_DLE
  44%token ASC_DC1
  45%token ASC_DC2
  46%token ASC_DC3
  47%token ASC_DC4
  48%token ASC_NAK
  49%token ASC_SYN
  50%token ASC_ETB
  51%token ASC_CAN
  52%token ASC_EM
  53%token ASC_SUB
  54%token ASC_ESC
  55%token ASC_IS4
  56%token ASC_IS3
  57%token ASC_IS2
  58%token ASC_IS1
  59%token BCS_WHTSP_SPACE
  60%token BCS_PUNCT_EXCLAMATION
  61%token BCS_PUNCT_QUOTE
  62%token BCS_PUNCT_HASH
  63%token ASC_DOLLAR_SIGN
  64%token BCS_PUNCT_PERCENT
  65%token BCS_PUNCT_AMPERSAND
  66%token BCS_PUNCT_APOSTROPHE
  67%token BCS_PUNCT_OPEN_PARENTHESIS
  68%token BCS_PUNCT_CLOSE_PARENTHESIS
  69%token BCS_PUNCT_ASTERISK
  70%token BCS_PUNCT_PLUS
  71%token BCS_PUNCT_COMMA
  72%token BCS_PUNCT_MINUS
  73%token BCS_PUNCT_PERIOD
  74%token BCS_PUNCT_SLASH
  75%token BCS_DIGIT_0
  76%token BCS_DIGIT_1
  77%token BCS_DIGIT_2
  78%token BCS_DIGIT_3
  79%token BCS_DIGIT_4
  80%token BCS_DIGIT_5
  81%token BCS_DIGIT_6
  82%token BCS_DIGIT_7
  83%token BCS_DIGIT_8
  84%token BCS_DIGIT_9
  85%token BCS_PUNCT_COLON
  86%token BCS_PUNCT_SEMICOLON
  87%token BCS_PUNCT_LESS_THAN
  88%token BCS_PUNCT_EQUAL
  89%token BCS_PUNCT_GREATER_THAN
  90%token BCS_PUNCT_QUESTION
  91%token ASC_AT_SIGN
  92%token BCS_UPPER_A
  93%token BCS_UPPER_B
  94%token BCS_UPPER_C
  95%token BCS_UPPER_D
  96%token BCS_UPPER_E
  97%token BCS_UPPER_F
  98%token BCS_UPPER_G
  99%token BCS_UPPER_H
 100%token BCS_UPPER_I
 101%token BCS_UPPER_J
 102%token BCS_UPPER_K
 103%token BCS_UPPER_L
 104%token BCS_UPPER_M
 105%token BCS_UPPER_N
 106%token BCS_UPPER_O
 107%token BCS_UPPER_P
 108%token BCS_UPPER_Q
 109%token BCS_UPPER_R
 110%token BCS_UPPER_S
 111%token BCS_UPPER_T
 112%token BCS_UPPER_U
 113%token BCS_UPPER_V
 114%token BCS_UPPER_W
 115%token BCS_UPPER_X
 116%token BCS_UPPER_Y
 117%token BCS_UPPER_Z
 118%token BCS_PUNCT_OPEN_BRACKET
 119%token BCS_PUNCT_BACKSLASH
 120%token BCS_PUNCT_CLOSE_BRACKET
 121%token BCS_PUNCT_CARET
 122%token BCS_PUNCT_UNDERSCORE
 123%token BCS_LOWER_A
 124%token BCS_LOWER_B
 125%token BCS_LOWER_C
 126%token BCS_LOWER_D
 127%token BCS_LOWER_E
 128%token BCS_LOWER_F
 129%token BCS_LOWER_G
 130%token BCS_LOWER_H
 131%token BCS_LOWER_I
 132%token BCS_LOWER_J
 133%token BCS_LOWER_K
 134%token BCS_LOWER_L
 135%token BCS_LOWER_M
 136%token BCS_LOWER_N
 137%token BCS_LOWER_O
 138%token BCS_LOWER_P
 139%token BCS_LOWER_Q
 140%token BCS_LOWER_R
 141%token BCS_LOWER_S
 142%token BCS_LOWER_T
 143%token BCS_LOWER_U
 144%token BCS_LOWER_V
 145%token BCS_LOWER_W
 146%token BCS_LOWER_X
 147%token BCS_LOWER_Y
 148%token BCS_LOWER_Z
 149%token BCS_PUNCT_OPEN_BRACE
 150%token BCS_PUNCT_VERTICAL_BAR
 151%token BCS_PUNCT_CLOSE_BRACE
 152%token BCS_PUNCT_TILDE
 153%token ASC_DEL
 154
 155%token ALT_PUNCT_OPEN_BRACE
 156%token ALT_PUNCT_CLOSE_BRACE
 157%token ALT_PUNCT_OPEN_BRACKET
 158%token ALT_PUNCT_CLOSE_BRACKET
 159%token ALT_PUNCT_HASH
 160
 161%token PUNC_DBL_COLON
 162%token PUNC_ARROW
 163
 164%token KWD_ABSTRACT
 165%token KWD_ABSTRACT_INTERFACE
 166%token KWD_ACCESS
 167%token KWD_ACTION
 168%token KWD_ADVANCE
 169%token KWD_ALLOCATABLE
 170%token KWD_ALLOCATE
 171%token KWD_ASSIGN
 172%token KWD_ASSOCIATE
 173%token KWD_ASYNCHRONOUS
 174%token KWD_BACKSPACE
 175%token KWD_BIND
 176%token KWD_BLANK
 177%token KWD_BLOCK
 178%token KWD_BLOCK_DATA
 179%token KWD_CALL
 180%token KWD_CASE
 181%token KWD_CHARACTER
 182%token KWD_CLASS
 183%token KWD_CLASS_DEFAULT
 184%token KWD_CLASS_IS
 185%token KWD_CLOSE
 186%token KWD_COMMON
 187%token KWD_COMPLEX
 188%token KWD_CONTAINS
 189%token KWD_CONTIGUOUS
 190%token KWD_CONTINUE
 191%token KWD_CYCLE
 192%token KWD_DATA
 193%token KWD_DEALLOCATE
 194%token KWD_DEFAULT
 195%token KWD_DEFERRED
 196%token KWD_DIMENSION
 197%token KWD_DIRECT
 198%token KWD_DO
 199%token KWD_DOUBLE
 200%token KWD_DOUBLE_COMPLEX
 201%token KWD_DOUBLE_PRECISION
 202%token KWD_ELEMENTAL
 203%token KWD_ELSE
 204%token KWD_ELSE_IF
 205%token KWD_ELSE_WHERE
 206%token KWD_ENCODING
 207%token KWD_END
 208%token KWD_END_ASSOCIATE
 209%token KWD_END_BLOCK
 210%token KWD_END_BLOCK_DATA
 211%token KWD_END_DO
 212%token KWD_END_ENUM
 213%token KWD_END_FILE
 214%token KWD_END_FORALL
 215%token KWD_END_FUNCTION
 216%token KWD_END_IF
 217%token KWD_END_INTERFACE
 218%token KWD_END_MODULE
 219%token KWD_END_PROCEDURE
 220%token KWD_END_PROGRAM
 221%token KWD_END_SELECT
 222%token KWD_END_SUBMODULE
 223%token KWD_END_SUBROUTINE
 224%token KWD_END_TYPE
 225%token KWD_END_WHERE
 226%token KWD_ENTRY
 227%token KWD_EOR
 228%token KWD_EQUIVALENCE
 229%token KWD_ERR
 230%token KWD_ERRMSG
 231%token KWD_EXIST
 232%token KWD_EXIT
 233%token KWD_EXTENDS
 234%token KWD_EXTENSIBLE
 235%token KWD_EXTERNAL
 236%token KWD_FALSE
 237%token KWD_FILE
 238%token KWD_FINAL
 239%token KWD_FLUSH
 240%token KWD_FMT
 241%token KWD_FORALL
 242%token KWD_FORM
 243%token KWD_FORMAT
 244%token KWD_FORMATTED
 245%token KWD_FUNCTION
 246%token KWD_GENERIC
 247%token KWD_GOTO
 248%token KWD_IF
 249%token KWD_IMPLICIT
 250%token KWD_IMPLICIT_NONE
 251%token KWD_IMPORT
 252%token KWD_IMPURE
 253%token KWD_IN
 254%token KWD_IN_OUT
 255%token KWD_INCLUDE
 256%token KWD_INQUIRE
 257%token KWD_INTEGER
 258%token KWD_INTENT
 259%token KWD_INTERFACE
 260%token KWD_INTRINSIC
 261%token KWD_IOSTAT
 262%token KWD_IOMSG
 263%token KWD_KIND
 264%token KWD_LET
 265%token KWD_LOGICAL
 266%token KWD_MODULE
 267%token KWD_MOLD
 268%token KWD_NAME
 269%token KWD_NAMED
 270%token KWD_NAMELIST
 271%token KWD_NEXTREC
 272%token KWD_NON_INTRINSIC
 273%token KWD_NON_OVERRIDABLE
 274%token KWD_NONKIND
 275%token KWD_NONE
 276%token KWD_NOPASS
 277%token KWD_NULLIFY
 278%token KWD_NUMBER
 279%token KWD_OPEN
 280%token KWD_OPENED
 281%token KWD_OPERATOR
 282%token KWD_OPTIONAL
 283%token KWD_OUT
 284%token KWD_PAD
 285%token KWD_PARAMETER
 286%token KWD_PASS
 287%token KWD_PAUSE
 288%token KWD_PENDING
 289%token KWD_POINTER
 290%token KWD_POSITION
 291%token KWD_PRECISION
 292%token KWD_PRINT
 293%token KWD_PRIVATE
 294%token KWD_PROCEDURE
 295%token KWD_PROGRAM
 296%token KWD_PROTECTED
 297%token KWD_PUBLIC
 298%token KWD_PURE
 299%token KWD_READ
 300%token KWD_READ_FORMATTED
 301%token KWD_READ_UNFORMATTED
 302%token KWD_READWRITE
 303%token KWD_REAL
 304%token KWD_REC
 305%token KWD_RECL
 306%token KWD_RETURN
 307%token KWD_REWIND
 308%token KWD_ROUND
 309%token KWD_SAVE
 310%token KWD_SELECT_CASE
 311%token KWD_SELECT_TYPE
 312%token KWD_SEQUENCE
 313%token KWD_SEQUENTIAL
 314%token KWD_SIGN
 315%token KWD_SIZE
 316%token KWD_SOURCE
 317%token KWD_STATUS
 318%token KWD_STOP
 319%token KWD_STREAM
 320%token KWD_SUBMODULE
 321%token KWD_SUBROUTINE
 322%token KWD_TARGET
 323%token KWD_THEN
 324%token KWD_TRUE
 325%token KWD_TYPE
 326%token KWD_UNFORMATTED
 327%token KWD_UNIT
 328%token KWD_USE
 329%token KWD_VALUE
 330%token KWD_VOLATILE
 331%token KWD_WHERE
 332%token KWD_WRITE
 333%token KWD_WRITE_FORMATTED
 334%token KWD_WRITE_UNFORMATTED
 335
 336%token PPD_NULL
 337%token PPD_DEFINE
 338%token PPD_ELIF
 339%token PPD_ELSE
 340%token PPD_ENDIF
 341%token PPD_ERROR
 342%token PPD_WARNING
 343%token PPD_IF
 344%token PPD_IFDEF
 345%token PPD_IFNDEF
 346%token PPD_INCLUDE
 347%token PPD_LINE
 348%token PPD_PRAGMA
 349%token PPD_UNDEF
 350
 351%token OP_LOGICAL_NOT
 352%token OP_NE
 353%token OP_STRINGIZE
 354%token OP_TOKEN_SPLICE
 355%token OP_MODULO
 356%token ALT_OP_TOKEN_SPLICE
 357%token OP_ASSIGN_MODULO
 358%token OP_BIT_AND
 359%token OP_ADDRESS
 360%token OP_LOGICAL_AND
 361%token OP_ASSIGN_BIT_AND
 362%token OP_DEREFERENCE
 363%token OP_MULTIPLY
 364%token OP_ASSIGN_MULTIPLY
 365%token OP_PLUS
 366%token OP_INCREMENT
 367%token OP_ASSIGN_PLUS
 368%token OP_MINUS
 369%token OP_DECREMENT
 370%token OP_ASSIGN_MINUS
 371%token OP_POINTER_MEMBER
 372%token OP_POINTER_POINTER_TO_MEMBER
 373%token OP_OBJECT_MEMBER
 374%token OP_OBJECT_POINTER_TO_MEMBER
 375%token OP_DIVIDE
 376%token OP_ASSIGN_DIVIDE
 377%token OP_ELSE
 378%token OP_LT
 379%token OP_SHIFT_LEFT
 380%token OP_ASSIGN_SHIFT_LEFT
 381%token OP_LE
 382%token OP_ASSIGN
 383%token OP_EQ
 384%token OP_GT
 385%token OP_GE
 386%token OP_SHIFT_RIGHT
 387%token OP_ASSIGN_SHIFT_RIGHT
 388%token OP_CONDITIONAL
 389%token OP_BIT_PLUS
 390%token OP_ASSIGN_BIT_PLUS
 391%token OP_BIT_OR
 392%token OP_ASSIGN_BIT_OR
 393%token OP_LOGICAL_OR
 394%token OP_BIT_NOT
 395
 396%token OP_ALT_LOGICAL_AND
 397%token OP_ALT_ASSIGN_BIT_AND
 398%token OP_ALT_BIT_AND
 399%token OP_ALT_BIT_OR
 400%token OP_ALT_BIT_NOT
 401%token OP_ALT_LOGICAL_NOT
 402%token OP_ALT_NE
 403%token OP_ALT_LOGICAL_OR
 404%token OP_ALT_ASSIGN_BIT_OR
 405%token OP_ALT_BIT_PLUS
 406%token OP_ALT_ASSIGN_BIT_PLUS
 407
 408%token OPEN_PARENTHESIS_SLASH
 409%token CLOSE_PARENTHESIS_SLASH
 410
 411%token INV_ALT_LOGICAL_AND
 412%token INV_ALT_ASSIGN_BIT_AND
 413%token INV_ALT_BIT_AND
 414%token INV_ALT_BIT_OR
 415%token INV_ALT_BIT_NOT
 416%token INV_ALT_LOGICAL_NOT
 417%token INV_ALT_NE
 418%token INV_ALT_LOGICAL_OR
 419%token INV_ALT_ASSIGN_BIT_OR
 420%token INV_ALT_BIT_PLUS
 421%token INV_ALT_ASSIGN_BIT_PLUS
 422
 423%token INV_MFI_LOGICAL_AND
 424%token INV_MFI_ASSIGN_BIT_AND
 425%token INV_MFI_BIT_AND
 426%token INV_MFI_BIT_OR
 427%token INV_MFI_BIT_NOT
 428%token INV_MFI_LOGICAL_NOT
 429%token INV_MFI_NE
 430%token INV_MFI_LOGICAL_OR
 431%token INV_MFI_ASSIGN_BIT_OR
 432%token INV_MFI_BIT_PLUS
 433%token INV_MFI_ASSIGN_BIT_PLUS
 434
 435%token DECL_REFERENCE
 436%token DECL_POINTER
 437%token DECL_VAR_ARGS
 438
 439%token WHITE_SPACE
 440%token SYSTEM_HEADER_STRING
 441%token HEADER_STRING
 442%token IDENTIFIER
 443%token NON_REPLACEABLE_IDENTIFIER
 444%token MACRO_FUNCTION_IDENTIFIER
 445%token MACRO_OBJECT_IDENTIFIER
 446%token PP_NUMBER
 447%token CHARACTER_LITERAL
 448%token L_CHARACTER_LITERAL
 449%token STRING_LITERAL
 450%token L_STRING_LITERAL
 451%token <lval> INTEGER_LITERAL
 452%token <lval> OCTAL_LITERAL
 453%token <lval> DECIMAL_LITERAL
 454%token <lval> HEXADECIMAL_LITERAL
 455%token FLOATING_LITERAL
 456
 457%token <sval> UNIVERSAL_CHARACTER_NAME
 458%token <sval> USE_ON_CODE
 459
 460%token PUNC_INITIALIZE
 461%token PUNC_SYNONYM
 462%token DONT_CARE
 463
 464%token <sval> RESERVED_WORD
 465%token <sval> ACCESS_SPECIFIER
 466%token <ival> BOOLEAN_LITERAL
 467%token <sval> CV_QUALIFIER
 468%token <sval> INTRINSIC_TYPE
 469%token <sval> FUNCTION_SPECIFIER
 470%token <sval> STORAGE_CLASS_SPECIFIER
 471
 472
 473%token <sval> USER_TOKEN
 474%token <sval> SYMBOL
 475%token <sval> COMMENT
 476%token <sval> BLOCK_COMMENT
 477%token END_OF_STATEMENT
 478%token BLOCK_OPEN
 479%token BLOCK_CLOSE
 480%token LIST_OPEN
 481%token LIST_SEPARATOR
 482%token LIST_CLOSE
 483
 484%type <lval> pp_constant_expression
 485%type <lval> pp_expression
 486%type <lval> pp_conditional_expression
 487%type <lval> pp_logical_or_expression
 488%type <lval> pp_logical_and_expression
 489%type <lval> pp_inclusive_or_expression
 490%type <lval> pp_exclusive_or_expression
 491%type <lval> pp_and_expression
 492%type <lval> pp_equality_expression
 493%type <lval> pp_relational_expression
 494%type <lval> pp_shift_expression
 495%type <lval> pp_additive_expression
 496%type <lval> pp_multiplicative_expression
 497%type <lval> pp_unary_expression
 498%type <lval> pp_primary_expression
 499%type <lval> pp_boolean_literal
 500%type <lval> pp_integer_literal
 501%type <lval> pp_octal_literal
 502%type <lval> pp_decimal_literal
 503%type <lval> pp_hexadecimal_literal
 504
 505%%
 506
 507preprocessing_file: { handle_file_begin(preprocessing_file_index); } group_part_seq_opt {handle_file_end(preprocessing_file_index); } 
 508  ;
 509
 510group_part_seq_opt: /* empty */
 511  | group_part_seq
 512  ;
 513
 514group_part_seq: group_part
 515  | group_part_seq group_part
 516  ;
 517
 518group_part: { /* handle_token(group_part_index); */ } preprocessing_token_seq_opt new_line 
 519  | if_section
 520  | control_line
 521  ;
 522
 523if_section: if_group elif_group_seq_opt else_group_opt endif_line 
 524  ;
 525
 526if_open: PPD_IF pp_constant_expression { handle_if_open(PPD_IF_INDEX, $2); } 
 527  |  PPD_IF string_literal { handle_if_open(PPD_IF_INDEX, 0); }
 528  ;
 529
 530ifdef_open: PPD_IFDEF 
 531  ;
 532
 533ifndef_open: PPD_IFNDEF 
 534  ;
 535
 536ifdef_identifier: IDENTIFIER { handle_ifdef_open(PPD_IFDEF_INDEX); } 
 537  ;
 538
 539ifndef_identifier: IDENTIFIER { handle_ifndef_open(PPD_IFNDEF_INDEX); } 
 540  ;
 541
 542if_group: if_open new_line group_part_seq_opt
 543  | ifdef_open ifdef_identifier new_line group_part_seq_opt
 544  | ifndef_open ifndef_identifier new_line group_part_seq_opt
 545  | ifdef_open invalid_ifdef_identifier new_line group_part_seq_opt
 546  | ifndef_open invalid_ifndef_identifier new_line group_part_seq_opt
 547  ;
 548
 549elif_group_seq_opt: /* empty */
 550  | elif_group_seq
 551  ;
 552
 553elif_group_seq: elif_group
 554  | elif_group_seq elif_group
 555  ;
 556
 557elif_group_open: PPD_ELIF pp_constant_expression { handle_elif_open(PPD_ELIF_INDEX, $2); } 
 558  ;
 559
 560elif_group: elif_group_open new_line group_part_seq_opt { handle_elif_close(PPD_ELIF_INDEX); }
 561  ;
 562
 563else_group_opt: /* empty */
 564  | else_group
 565  ;
 566
 567else_open: PPD_ELSE { handle_else_open(PPD_ELSE_INDEX); }
 568  ;
 569
 570else_group: else_open new_line group_part_seq_opt
 571  ;
 572
 573endif_open: PPD_ENDIF { handle_endif(PPD_ENDIF_INDEX); }
 574  ;
 575
 576endif_line: endif_open new_line
 577  ;
 578
 579control_line: PPD_INCLUDE preprocessing_token_seq new_line { handle_include(PPD_INCLUDE_INDEX); };
 580  | PPD_DEFINE mo_identifier string_literal_opt new_line { handle_macro_close (object_macro_index); }
 581  | PPD_DEFINE mf_identifier mf_args replacement_list new_line  { handle_macro_close (function_macro_index); }
 582  | PPD_UNDEF mu_identifier new_line
 583  | PPD_LINE { handle_token_open (PPD_LINE_INDEX); } preprocessing_token_seq new_line { handle_token_close (PPD_LINE_INDEX); }
 584  | PPD_ERROR { handle_token_open (PPD_ERROR_INDEX); } preprocessing_token_seq_opt new_line { handle_token_close (PPD_ERROR_INDEX); }
 585  | PPD_PRAGMA { handle_token_open (PPD_PRAGMA_INDEX); } preprocessing_token_seq_opt new_line { handle_token_close (PPD_PRAGMA_INDEX); }
 586  | PPD_NULL new_line
 587  ;
 588
 589mf_args: BCS_PUNCT_OPEN_PARENTHESIS clean_identifier_list_opt BCS_PUNCT_CLOSE_PARENTHESIS
 590  ;
 591
 592replacement_list: { handle_replacement_open (replacement_list_index); } preprocessing_token_seq_opt { handle_replacement_close (replacement_list_index); }
 593  ;
 594
 595preprocessing_token_seq_opt: /* empty */
 596  | preprocessing_token_seq
 597  ;
 598
 599preprocessing_token_seq: preprocessing_token
 600  | preprocessing_token_seq preprocessing_token
 601  ;
 602
 603preprocessing_token: white_space
 604  | header_name
 605  | identifier
 606  | pp_number
 607  | character_literal
 608  | string_literal
 609  | preprocessing_op_or_punc
 610  | BCS_PUNCT_BACKSLASH { handle_token(BCS_PUNCT_BACKSLASH_INDEX); }
 611  ;
 612
 613header_name: SYSTEM_HEADER_STRING { handle_header_name(SYSTEM_HEADER_STRING_INDEX); }
 614  | HEADER_STRING { handle_header_name(HEADER_STRING_INDEX); }
 615  ;
 616
 617clean_identifier_list_opt: /* empty */
 618  | clean_identifier_list
 619  ;
 620
 621clean_identifier_list: identifier
 622  | clean_identifier_list BCS_PUNCT_COMMA identifier
 623  ;
 624
 625identifier: IDENTIFIER   { handle_identifier(IDENTIFIER_INDEX); }
 626  | NON_REPLACEABLE_IDENTIFIER { handle_nonrepl_identifier(IDENTIFIER_INDEX); }
 627  | key_word
 628  ;
 629
 630pp_identifier: IDENTIFIER
 631  | NON_REPLACEABLE_IDENTIFIER
 632
 633key_word: kwd_abstract
 634  | kwd_abstract_interface
 635  | kwd_access
 636  | kwd_action
 637  | kwd_advance
 638  | kwd_allocatable
 639  | kwd_allocate
 640  | kwd_assign
 641  | kwd_asynchronous
 642  | kwd_backspace
 643  | kwd_bind
 644  | kwd_blank
 645  | kwd_block
 646  | kwd_block_data
 647  | kwd_call
 648  | kwd_case
 649  | kwd_character
 650  | kwd_class
 651  | kwd_class_default
 652  | kwd_class_is
 653  | kwd_close
 654  | kwd_common
 655  | kwd_complex
 656  | kwd_contains
 657  | kwd_contiguous
 658  | kwd_continue
 659  | kwd_cycle
 660  | kwd_data
 661  | kwd_deallocate
 662  | kwd_default
 663  | kwd_deferred
 664  | kwd_dimension
 665  | kwd_direct
 666  | kwd_do
 667  | kwd_double
 668  | kwd_double_complex
 669  | kwd_double_precision
 670  | kwd_elemental
 671  | kwd_else
 672  | kwd_else_if
 673  | kwd_else_where
 674  | kwd_end
 675  | kwd_end_associate
 676  | kwd_end_block
 677  | kwd_end_block_data
 678  | kwd_end_do
 679  | kwd_end_enum
 680  | kwd_end_file
 681  | kwd_end_forall
 682  | kwd_end_function
 683  | kwd_end_if
 684  | kwd_end_interface
 685  | kwd_end_module
 686  | kwd_end_procedure
 687  | kwd_end_program
 688  | kwd_end_select
 689  | kwd_end_submodule
 690  | kwd_end_subroutine
 691  | kwd_end_type
 692  | kwd_end_where
 693  | kwd_entry
 694  | kwd_eor
 695  | kwd_equivalence
 696  | kwd_err
 697  | kwd_errmsg
 698  | kwd_exist
 699  | kwd_exit
 700  | kwd_extends
 701  | kwd_extensible
 702  | kwd_external
 703  | kwd_false
 704  | kwd_file
 705  | kwd_final
 706  | kwd_flush
 707  | kwd_fmt
 708  | kwd_forall
 709  | kwd_form
 710  | kwd_format
 711  | kwd_formatted
 712  | kwd_function
 713  | kwd_generic
 714  | kwd_goto
 715  | kwd_if
 716  | kwd_implicit
 717  | kwd_implicit_none
 718  | kwd_import
 719  | kwd_impure
 720  | kwd_in
 721  | kwd_include
 722  | kwd_inquire
 723  | kwd_integer
 724  | kwd_intrinsic
 725  | kwd_in_out
 726  | kwd_intent
 727  | kwd_interface
 728  | kwd_iostat
 729  | kwd_iomsg
 730  | kwd_kind
 731  | kwd_let
 732  | kwd_logical
 733  | kwd_module
 734  | kwd_mold
 735  | kwd_name
 736  | kwd_named
 737  | kwd_namelist
 738  | kwd_nextrec
 739  | kwd_non_intrinsic
 740  | kwd_non_overridable
 741  | kwd_nonkind
 742  | kwd_none
 743  | kwd_nopass
 744  | kwd_nullify
 745  | kwd_number
 746  | kwd_open
 747  | kwd_opened
 748  | kwd_operator
 749  | kwd_optional
 750  | kwd_out
 751  | kwd_pad
 752  | kwd_parameter
 753  | kwd_pass
 754  | kwd_pause
 755  | kwd_pointer
 756  | kwd_position
 757  | kwd_precision
 758  | kwd_print
 759  | kwd_private
 760  | kwd_procedure
 761  | kwd_program
 762  | kwd_protected
 763  | kwd_public
 764  | kwd_pure
 765  | kwd_read
 766  | kwd_read_formatted
 767  | kwd_read_unformatted
 768  | kwd_real
 769  | kwd_rec
 770  | kwd_recl
 771  | kwd_return
 772  | kwd_rewind
 773  | kwd_round
 774  | kwd_save
 775  | kwd_select_case
 776  | kwd_select_type
 777  | kwd_sequence
 778  | kwd_sequential
 779  | kwd_sign
 780  | kwd_size
 781  | kwd_status
 782  | kwd_stop
 783  | kwd_source
 784  | kwd_subroutine
 785  | kwd_target
 786  | kwd_then
 787  | kwd_true
 788  | kwd_type
 789  | kwd_unformatted
 790  | kwd_unit
 791  | kwd_use
 792  | kwd_value
 793  | kwd_volatile
 794  | kwd_where
 795  | kwd_write
 796  | kwd_write_formatted
 797  | kwd_write_unformatted
 798  ;
 799
 800white_space_opt: /* empty */
 801  | white_space
 802  ;
 803
 804white_space: WHITE_SPACE { handle_string_token(WHITE_SPACE_INDEX); }
 805  ;
 806
 807pp_number: PP_NUMBER { handle_pp_number(); }
 808  | integer_literal
 809  | floating_literal
 810  ;
 811
 812integer_literal: INTEGER_LITERAL { handle_string_token(INTEGER_LITERAL_INDEX); }
 813  | octal_literal
 814  | decimal_literal
 815  | hexadecimal_literal
 816  ;
 817
 818octal_literal: OCTAL_LITERAL { handle_string_token(OCTAL_LITERAL_INDEX); }
 819  ;
 820
 821decimal_literal: DECIMAL_LITERAL { handle_string_token(DECIMAL_LITERAL_INDEX); }
 822  ;
 823
 824hexadecimal_literal: HEXADECIMAL_LITERAL { handle_string_token(HEXADECIMAL_LITERAL_INDEX); }
 825  ;
 826
 827pp_integer_literal: INTEGER_LITERAL { $$ = $1; }
 828  | pp_octal_literal { $$ = $1; }
 829  | pp_decimal_literal { $$ = $1; }
 830  | pp_hexadecimal_literal { $$ = $1; }
 831  ;
 832
 833pp_octal_literal: OCTAL_LITERAL { $$ = $1; }
 834  ;
 835
 836pp_decimal_literal: DECIMAL_LITERAL { $$ = $1; }
 837  ;
 838
 839pp_hexadecimal_literal: HEXADECIMAL_LITERAL { $$ = $1; }
 840  ;
 841
 842character_literal: CHARACTER_LITERAL { handle_string_token(CHARACTER_LITERAL_INDEX); }
 843  | L_CHARACTER_LITERAL { handle_string_token(L_CHARACTER_LITERAL_INDEX); }
 844  ;
 845
 846string_literal_opt: /* empty */
 847  | string_literal
 848  ;
 849
 850string_literal: STRING_LITERAL { handle_string_token(STRING_LITERAL_INDEX); }
 851  | L_STRING_LITERAL { handle_string_token(L_STRING_LITERAL_INDEX); }
 852  ;
 853
 854floating_literal: FLOATING_LITERAL { handle_string_token(FLOATING_LITERAL_INDEX); }
 855  ;
 856
 857pp_boolean_literal: KWD_FALSE { $$ = 0; }
 858  | KWD_TRUE { $$ = 1; }
 859  | BOOLEAN_LITERAL { $$ = $1; }
 860  ;
 861
 862preprocessing_op_or_punc: bcs_exclamation
 863  | bcs_hash
 864  | op_stringize
 865  | bcs_percent
 866  | bcs_ampersand
 867  | bcs_open_parenthesis
 868  | bcs_close_parenthesis
 869  | open_parenthesis_slash
 870  | close_parenthesis_slash
 871  | bcs_asterisk
 872  | bcs_plus
 873  | bcs_comma
 874  | bcs_minus
 875  | bcs_period
 876  | bcs_slash
 877  | bcs_colon
 878  | bcs_semicolon
 879  | bcs_less_than
 880  | bcs_equal
 881  | bcs_greater_than
 882  | bcs_question
 883  | bcs_open_bracket
 884  | bcs_caret
 885  | bcs_close_bracket
 886  | bcs_open_brace
 887  | bcs_vertical_bar
 888  | bcs_close_brace
 889  | bcs_tilde
 890  | ne
 891  | token_splice
 892  | assign_modulo
 893  | truth_and
 894  | assign_bit_and
 895  | assign_multiply
 896  | increment
 897  | assign_plus
 898  | decrement
 899  | assign_minus
 900  | pointer_member
 901  | pointer_ptm
 902  | object_ptm
 903  | assign_divide
 904  | dbl_colon
 905  | arrow
 906  | shift_left
 907  | assign_shift_left
 908  | le
 909  | eq
 910  | ge
 911  | shift_right
 912  | assign_shift_right
 913  | assign_bit_xor
 914  | assign_bit_or
 915  | truth_or
 916  | var_args
 917  | alt_bit_and
 918  | alt_bit_or
 919  | alt_bit_not
 920  | alt_truth_not
 921  | alt_bit_xor
 922  ;
 923
 924pp_constant_expression: pp_expression {$$ = $1;}
 925  ;
 926
 927pp_expression: pp_conditional_expression {$$ = $1;}
 928  | pp_expression pp_comma_op pp_conditional_expression {$$ = $3;}
 929  ;
 930
 931pp_conditional_expression: pp_logical_or_expression {$$ = $1;}
 932  | pp_logical_or_expression pp_conditional_operator pp_expression pp_conditional_separator pp_conditional_expression {$$ = ($1) ? $3 : $5;}
 933  ;
 934
 935pp_logical_or_expression: pp_logical_and_expression {$$ = $1;}
 936  | pp_logical_or_expression pp_truth_or pp_logical_and_expression {$$ = $1 || $3;}
 937  ;
 938
 939pp_logical_and_expression: pp_inclusive_or_expression {$$ = $1;}
 940  | pp_logical_and_expression pp_truth_and pp_inclusive_or_expression {$$ = $1 && $3;}
 941  ;
 942
 943pp_inclusive_or_expression: pp_exclusive_or_expression {$$ = $1;}
 944  | pp_inclusive_or_expression pp_bit_or pp_exclusive_or_expression  {$$ = $1 | $3;}
 945  ;
 946
 947pp_exclusive_or_expression: pp_and_expression {$$ = $1;}
 948  | pp_exclusive_or_expression pp_bit_xor pp_and_expression {$$ = $1 ^ $3;}
 949  ;
 950
 951pp_and_expression: pp_equality_expression {$$ = $1;}
 952  | pp_and_expression pp_bit_and pp_equality_expression {$$ = $1 & $3;}
 953  ;
 954
 955pp_equality_expression: pp_relational_expression {$$ = $1;}
 956  | pp_equality_expression pp_eq pp_relational_expression {$$ = ($1 == $3);}
 957  | pp_equality_expression pp_ne pp_relational_expression {$$ = ($1 != $3);}
 958  ;
 959
 960pp_relational_expression: pp_shift_expression {$$ = $1;}
 961  | pp_relational_expression pp_lt pp_shift_expression {$$ = ($1 < $3);}
 962  | pp_relational_expression pp_gt pp_shift_expression {$$ = ($1 > $3);}
 963  | pp_relational_expression pp_le pp_shift_expression {$$ = ($1 <= $3);}
 964  | pp_relational_expression pp_ge pp_shift_expression {$$ = ($1 >= $3);}
 965  ;
 966
 967pp_shift_expression: pp_additive_expression {$$ = $1;}
 968  | pp_shift_expression pp_shift_left pp_additive_expression {$$ = ($1 << $3);}
 969  | pp_shift_expression pp_shift_right pp_additive_expression {$$ = ($1 >> $3);}
 970  ;
 971
 972pp_additive_expression: pp_multiplicative_expression {$$ = $1;}
 973  | pp_additive_expression pp_plus pp_multiplicative_expression {$$ = ($1 + $3);}
 974  | pp_additive_expression pp_minus pp_multiplicative_expression {$$ = ($1 - $3);}
 975  ;
 976
 977pp_multiplicative_expression: pp_unary_expression {$$ = $1;}
 978  | pp_multiplicative_expression pp_multiply pp_unary_expression {$$ = ($1 * $3);}
 979  | pp_multiplicative_expression pp_divide pp_unary_expression {$$ = ($1 / $3);}
 980  | pp_multiplicative_expression pp_modulo pp_unary_expression {$$ = ($1 % $3);}
 981  ;
 982
 983pp_unary_expression: pp_primary_expression {$$ = $1;}
 984  | pp_unary_plus pp_unary_expression {$$ = $2;}
 985  | pp_unary_minus pp_unary_expression {$$ = -$2;}
 986  | pp_truth_not pp_unary_expression {$$ = !$2;}
 987  | pp_bit_not pp_unary_expression {$$ = ~$2;}
 988  ;
 989
 990pp_primary_expression: pp_boolean_literal {$$ = $1;}
 991  | pp_integer_literal {$$ = $1;}
 992  | BCS_PUNCT_OPEN_PARENTHESIS pp_expression BCS_PUNCT_CLOSE_PARENTHESIS {$$ = $2;}
 993  | pp_identifier {$$ = 0;}
 994  ;
 995
 996kwd_abstract:          KWD_ABSTRACT         { handle_token(KWD_ABSTRACT_INDEX); }
 997  ;
 998
 999kwd_abstract_interface:KWD_ABSTRACT_INTERFACE { handle_token(KWD_ABSTRACT_INTERFACE_INDEX); }
1000  ;
1001
1002kwd_access:            KWD_ACCESS           { handle_token(KWD_ACCESS_INDEX); }
1003  ;
1004
1005kwd_action:            KWD_ACTION           { handle_token(KWD_ACTION_INDEX); }
1006  ;
1007
1008kwd_advance:           KWD_ADVANCE          { handle_token(KWD_ADVANCE_INDEX); }
1009  ;
1010
1011kwd_allocatable:       KWD_ALLOCATABLE      { handle_token(KWD_ALLOCATABLE_INDEX); }
1012  ;
1013
1014kwd_allocate:          KWD_ALLOCATE         { handle_token(KWD_ALLOCATE_INDEX); }
1015  ;
1016
1017kwd_assign:            KWD_ASSIGN           { handle_token(KWD_ASSIGN_INDEX); }
1018  ;
1019
1020kwd_asynchronous:      KWD_ASYNCHRONOUS     { handle_token(KWD_ASYNCHRONOUS_INDEX); }
1021  ;
1022
1023kwd_backspace:         KWD_BACKSPACE        { handle_token(KWD_BACKSPACE_INDEX); }
1024  ;
1025
1026kwd_bind:              KWD_BIND             { handle_token(KWD_BIND_INDEX); }
1027  ;
1028
1029kwd_blank:             KWD_BLANK            { handle_token(KWD_BLANK_INDEX); }
1030  ;
1031
1032kwd_block:             KWD_BLOCK            { handle_token(KWD_BLOCK_INDEX); }
1033  ;
1034
1035kwd_block_data:        KWD_BLOCK_DATA       { handle_token(KWD_BLOCK_DATA_INDEX); }
1036  ;
1037
1038kwd_call:              KWD_CALL             { handle_token(KWD_CALL_INDEX); }
1039  ;
1040
1041kwd_case:              KWD_CASE             { handle_token(KWD_CASE_INDEX); }
1042  ;
1043
1044kwd_character:         KWD_CHARACTER        { handle_token(KWD_CHARACTER_INDEX); }
1045  ;
1046
1047kwd_class:             KWD_CLASS            { handle_token(KWD_CLASS_INDEX); }
1048  ;
1049
1050kwd_class_default:     KWD_CLASS_DEFAULT    { handle_token(KWD_CLASS_DEFAULT_INDEX); }
1051  ;
1052
1053kwd_class_is:          KWD_CLASS_IS         { handle_token(KWD_CLASS_IS_INDEX); }
1054  ;
1055
1056kwd_close:             KWD_CLOSE            { handle_token(KWD_CLOSE_INDEX); }
1057  ;
1058
1059kwd_common:            KWD_COMMON           { handle_token(KWD_COMMON_INDEX); }
1060  ;
1061
1062kwd_complex:           KWD_COMPLEX          { handle_token(KWD_COMPLEX_INDEX); }
1063  ;
1064
1065kwd_contains:          KWD_CONTAINS         { handle_token(KWD_CONTAINS_INDEX); }
1066  ;
1067
1068kwd_contiguous:        KWD_CONTIGUOUS       { handle_token(KWD_CONTIGUOUS_INDEX); }
1069  ;
1070
1071kwd_continue:          KWD_CONTINUE         { handle_token(KWD_CONTINUE_INDEX); }
1072  ;
1073
1074kwd_cycle:             KWD_CYCLE            { handle_token(KWD_CYCLE_INDEX); }
1075  ;
1076
1077kwd_data:              KWD_DATA             { handle_token(KWD_DATA_INDEX); }
1078  ;
1079
1080kwd_deallocate:        KWD_DEALLOCATE       { handle_token(KWD_DEALLOCATE_INDEX); }
1081  ;
1082
1083kwd_default:           KWD_DEFAULT          { handle_token(KWD_DEFAULT_INDEX); }
1084  ;
1085
1086kwd_deferred:          KWD_DEFERRED         { handle_token(KWD_DEFERRED_INDEX); }
1087  ;
1088
1089kwd_dimension:         KWD_DIMENSION        { handle_token(KWD_DIMENSION_INDEX); }
1090  ;
1091
1092kwd_direct:            KWD_DIRECT           { handle_token(KWD_DIRECT_INDEX); }
1093  ;
1094
1095kwd_do:                KWD_DO               { handle_token(KWD_DO_INDEX); }
1096  ;
1097
1098kwd_double:            KWD_DOUBLE           { handle_token(KWD_DOUBLE_INDEX); }
1099  ;
1100
1101kwd_double_complex:    KWD_DOUBLE_COMPLEX   { handle_token(KWD_DOUBLE_COMPLEX_INDEX); }
1102  ;
1103
1104kwd_double_precision:  KWD_DOUBLE_PRECISION { handle_token(KWD_DOUBLE_PRECISION_INDEX); }
1105  ;
1106
1107kwd_elemental:         KWD_ELEMENTAL        { handle_token(KWD_ELEMENTAL_INDEX); }
1108  ;
1109
1110kwd_else:              KWD_ELSE             { handle_token(KWD_ELSE_INDEX); }
1111  ;
1112
1113kwd_else_if:           KWD_ELSE_IF          { handle_token(KWD_ELSE_IF_INDEX); }
1114  ;
1115
1116kwd_else_where:        KWD_ELSE_WHERE       { handle_token(KWD_ELSE_WHERE_INDEX); }
1117  ;
1118
1119kwd_end:               KWD_END              { handle_token(KWD_END_INDEX); }
1120  ;
1121
1122kwd_end_associate:     KWD_END_ASSOCIATE    { handle_token(KWD_END_ASSOCIATE_INDEX); }
1123  ;
1124
1125kwd_end_block:         KWD_END_BLOCK        { handle_token(KWD_END_BLOCK_INDEX); }
1126  ;
1127
1128kwd_end_block_data:    KWD_END_BLOCK_DATA   { handle_token(KWD_END_BLOCK_DATA_INDEX); }
1129  ;
1130
1131kwd_end_do:            KWD_END_DO           { handle_token(KWD_END_DO_INDEX); }
1132  ;
1133
1134kwd_end_enum:          KWD_END_ENUM         { handle_token(KWD_END_ENUM_INDEX); }
1135  ;
1136
1137kwd_end_file:          KWD_END_FILE         { handle_token(KWD_END_FILE_INDEX); }
1138  ;
1139
1140kwd_end_forall:        KWD_END_FORALL       { handle_token(KWD_END_FORALL_INDEX); }
1141  ;
1142
1143kwd_end_function:      KWD_END_FUNCTION     { handle_token(KWD_END_FUNCTION_INDEX); }
1144  ;
1145
1146kwd_end_if:            KWD_END_IF           { handle_token(KWD_END_IF_INDEX); }
1147  ;
1148
1149kwd_end_interface:     KWD_END_INTERFACE    { handle_token(KWD_END_INTERFACE_INDEX); }
1150  ;
1151
1152kwd_end_module:        KWD_END_MODULE       { handle_token(KWD_END_MODULE_INDEX); }
1153  ;
1154
1155kwd_end_procedure:     KWD_END_PROCEDURE    { handle_token(KWD_END_PROCEDURE_INDEX); }
1156  ;
1157
1158kwd_end_program:       KWD_END_PROGRAM      { handle_token(KWD_END_PROGRAM_INDEX); }
1159  ;
1160
1161kwd_end_select:        KWD_END_SELECT       { handle_token(KWD_END_SELECT_INDEX); }
1162  ;
1163
1164kwd_end_submodule:     KWD_END_SUBMODULE    { handle_token(KWD_END_SUBMODULE_INDEX); }
1165  ;
1166
1167kwd_end_subroutine:    KWD_END_SUBROUTINE   { handle_token(KWD_END_SUBROUTINE_INDEX); }
1168  ;
1169
1170kwd_end_type:          KWD_END_TYPE         { handle_token(KWD_END_TYPE_INDEX); }
1171  ;
1172
1173kwd_end_where:         KWD_END_WHERE        { handle_token(KWD_END_WHERE_INDEX); }
1174  ;
1175
1176kwd_entry:             KWD_ENTRY            { handle_token(KWD_ENTRY_INDEX); }
1177  ;
1178
1179kwd_eor:               KWD_EOR              { handle_token(KWD_EOR_INDEX); }
1180  ;
1181
1182kwd_equivalence:       KWD_EQUIVALENCE      { handle_token(KWD_EQUIVALENCE_INDEX); }
1183  ;
1184
1185kwd_err:               KWD_ERR              { handle_token(KWD_ERR_INDEX); }
1186  ;
1187
1188kwd_errmsg:            KWD_ERRMSG           { handle_token(KWD_ERRMSG_INDEX); }
1189  ;
1190
1191kwd_exist:             KWD_EXIST            { handle_token(KWD_EXIST_INDEX); }
1192  ;
1193
1194kwd_exit:              KWD_EXIT             { handle_token(KWD_EXIT_INDEX); }
1195  ;
1196
1197kwd_extends:           KWD_EXTENDS          { handle_token(KWD_EXTENDS_INDEX); }
1198  ;
1199
1200kwd_extensible:        KWD_EXTENSIBLE       { handle_token(KWD_EXTENSIBLE_INDEX); }
1201  ;
1202
1203kwd_external:          KWD_EXTERNAL         { handle_token(KWD_EXTERNAL_INDEX); }
1204  ;
1205
1206kwd_false:             KWD_FALSE            { handle_token(KWD_FALSE_INDEX); }
1207  ;
1208
1209kwd_file:              KWD_FILE             { handle_token(KWD_FILE_INDEX); }
1210  ;
1211
1212kwd_final:             KWD_FINAL            { handle_token(KWD_FINAL_INDEX); }
1213  ;
1214
1215kwd_flush:             KWD_FLUSH            { handle_token(KWD_FLUSH_INDEX); }
1216  ;
1217
1218kwd_fmt:               KWD_FMT              { handle_token(KWD_FMT_INDEX); }
1219  ;
1220
1221kwd_forall:            KWD_FORALL           { handle_token(KWD_FORALL_INDEX); }
1222  ;
1223
1224kwd_form:              KWD_FORM             { handle_token(KWD_FORM_INDEX); }
1225  ;
1226
1227kwd_format:            KWD_FORMAT           { handle_token(KWD_FORMAT_INDEX); }
1228  ;
1229
1230kwd_formatted:         KWD_FORMATTED        { handle_token(KWD_FORMATTED_INDEX); }
1231  ;
1232
1233kwd_function:          KWD_FUNCTION         { handle_token(KWD_FUNCTION_INDEX); }
1234  ;
1235
1236kwd_generic:           KWD_GENERIC          { handle_token(KWD_GENERIC_INDEX); }
1237  ;
1238
1239kwd_goto:              KWD_GOTO             { handle_token(KWD_GOTO_INDEX); }
1240  ;
1241
1242kwd_if:                KWD_IF               { handle_token(KWD_IF_INDEX); }
1243  ;
1244
1245kwd_implicit:          KWD_IMPLICIT         { handle_token(KWD_IMPLICIT_INDEX); }
1246  ;
1247
1248kwd_implicit_none:     KWD_IMPLICIT_NONE    { handle_token(KWD_IMPLICIT_NONE_INDEX); }
1249  ;
1250
1251kwd_import:            KWD_IMPORT           { handle_token(KWD_IMPORT_INDEX); }
1252  ;
1253
1254kwd_impure:            KWD_IMPURE           { handle_token(KWD_IMPURE_INDEX); }
1255  ;
1256
1257kwd_in:                KWD_IN               { handle_token(KWD_IN_INDEX); }
1258  ;
1259
1260kwd_in_out:            KWD_IN_OUT           { handle_token(KWD_IN_OUT_INDEX); }
1261  ;
1262
1263kwd_include:           KWD_INCLUDE          { handle_token(KWD_INCLUDE_INDEX); }
1264  ;
1265
1266kwd_inquire:           KWD_INQUIRE          { handle_token(KWD_INQUIRE_INDEX); }
1267  ;
1268
1269kwd_integer:           KWD_INTEGER          { handle_token(KWD_INTEGER_INDEX); }
1270  ;
1271
1272kwd_intent:            KWD_INTENT           { handle_token(KWD_INTENT_INDEX); }
1273  ;
1274
1275kwd_interface:         KWD_INTERFACE        { handle_token(KWD_INTERFACE_INDEX); }
1276  ;
1277
1278kwd_intrinsic:         KWD_INTRINSIC        { handle_token(KWD_INTRINSIC_INDEX); }
1279  ;
1280
1281kwd_iostat:            KWD_IOSTAT           { handle_token(KWD_IOSTAT_INDEX); }
1282  ;
1283
1284kwd_iomsg:             KWD_IOMSG            { handle_token(KWD_IOMSG_INDEX); }
1285  ;
1286
1287kwd_kind:              KWD_KIND             { handle_token(KWD_KIND_INDEX); }
1288  ;
1289
1290kwd_let:               KWD_LET              { handle_token(KWD_LET_INDEX); }
1291  ;
1292
1293kwd_logical:           KWD_LOGICAL          { handle_token(KWD_LOGICAL_INDEX); }
1294  ;
1295
1296kwd_module:            KWD_MODULE           { handle_token(KWD_MODULE_INDEX); }
1297  ;
1298
1299kwd_mold:              KWD_MOLD             { handle_token(KWD_MOLD_INDEX); }
1300  ;
1301
1302kwd_name:              KWD_NAME             { handle_token(KWD_NAME_INDEX); }
1303  ;
1304
1305kwd_named:             KWD_NAMED            { handle_token(KWD_NAMED_INDEX); }
1306  ;
1307
1308kwd_namelist:          KWD_NAMELIST         { handle_token(KWD_NAMELIST_INDEX); }
1309  ;
1310
1311kwd_nextrec:           KWD_NEXTREC          { handle_token(KWD_NEXTREC_INDEX); }
1312  ;
1313
1314kwd_non_intrinsic:     KWD_NON_INTRINSIC    { handle_token(KWD_NON_INTRINSIC_INDEX); }
1315  ;
1316
1317kwd_non_overridable:   KWD_NON_OVERRIDABLE  { handle_token(KWD_NON_OVERRIDABLE_INDEX); }
1318  ;
1319
1320kwd_nonkind:           KWD_NONKIND          { handle_token(KWD_NONKIND_INDEX); }
1321  ;
1322
1323kwd_none:              KWD_NONE             { handle_token(KWD_NONE_INDEX); }
1324  ;
1325
1326kwd_nopass:            KWD_NOPASS           { handle_token(KWD_NOPASS_INDEX); }
1327  ;
1328
1329kwd_nullify:           KWD_NULLIFY          { handle_token(KWD_NULLIFY_INDEX); }
1330  ;
1331
1332kwd_number:            KWD_NUMBER           { handle_token(KWD_NUMBER_INDEX); }
1333  ;
1334
1335kwd_open:              KWD_OPEN             { handle_token(KWD_OPEN_INDEX); }
1336  ;
1337
1338kwd_opened:            KWD_OPENED           { handle_token(KWD_OPENED_INDEX); }
1339  ;
1340
1341kwd_operator:          KWD_OPERATOR         { handle_token(KWD_OPERATOR_INDEX); }
1342  ;
1343
1344kwd_optional:          KWD_OPTIONAL         { handle_token(KWD_OPTIONAL_INDEX); }
1345  ;
1346
1347kwd_out:               KWD_OUT              { handle_token(KWD_OUT_INDEX); }
1348  ;
1349
1350kwd_pad:               KWD_PAD              { handle_token(KWD_PAD_INDEX); }
1351  ;
1352
1353kwd_parameter:         KWD_PARAMETER        { handle_token(KWD_PARAMETER_INDEX); }
1354  ;
1355
1356kwd_pass:              KWD_PASS             { handle_token(KWD_PASS_INDEX); }
1357  ;
1358
1359kwd_pause:             KWD_PAUSE            { handle_token(KWD_PAUSE_INDEX); }
1360  ;
1361
1362kwd_pointer:           KWD_POINTER          { handle_token(KWD_POINTER_INDEX); }
1363  ;
1364
1365kwd_position:          KWD_POSITION         { handle_token(KWD_POSITION_INDEX); }
1366  ;
1367
1368kwd_precision:         KWD_PRECISION        { handle_token(KWD_PRECISION_INDEX); }
1369  ;
1370
1371kwd_print:             KWD_PRINT            { handle_token(KWD_PRINT_INDEX); }
1372  ;
1373
1374kwd_private:           KWD_PRIVATE          { handle_token(KWD_PRIVATE_INDEX); }
1375  ;
1376
1377kwd_procedure:         KWD_PROCEDURE        { handle_token(KWD_PROCEDURE_INDEX); }
1378  ;
1379
1380kwd_program:           KWD_PROGRAM          { handle_token(KWD_PROGRAM_INDEX); }
1381  ;
1382
1383kwd_protected:         KWD_PROTECTED        { handle_token(KWD_PROTECTED_INDEX); }
1384  ;
1385
1386kwd_public:            KWD_PUBLIC           { handle_token(KWD_PUBLIC_INDEX); }
1387  ;
1388
1389kwd_pure:              KWD_PURE             { handle_token(KWD_PURE_INDEX); }
1390  ;
1391
1392kwd_read:              KWD_READ             { handle_token(KWD_READ_INDEX); }
1393  ;
1394
1395kwd_read_formatted:    KWD_READ_FORMATTED   { handle_token(KWD_READ_FORMATTED_INDEX); }
1396  ;
1397
1398kwd_read_unformatted:  KWD_READ_UNFORMATTED { handle_token(KWD_READ_UNFORMATTED_INDEX); }
1399  ;
1400
1401kwd_real:              KWD_REAL             { handle_token(KWD_REAL_INDEX); }
1402  ;
1403
1404kwd_rec:               KWD_REC              { handle_token(KWD_REC_INDEX); }
1405  ;
1406
1407kwd_recl:              KWD_RECL             { handle_token(KWD_RECL_INDEX); }
1408  ;
1409
1410kwd_return:            KWD_RETURN           { handle_token(KWD_RETURN_INDEX); }
1411  ;
1412
1413kwd_rewind:            KWD_REWIND           { handle_token(KWD_REWIND_INDEX); }
1414  ;
1415
1416kwd_round:             KWD_ROUND            { handle_token(KWD_ROUND_INDEX); }
1417  ;
1418
1419kwd_save:              KWD_SAVE             { handle_token(KWD_SAVE_INDEX); }
1420  ;
1421
1422kwd_select_case:       KWD_SELECT_CASE      { handle_token(KWD_SELECT_CASE_INDEX); }
1423  ;
1424
1425kwd_select_type:       KWD_SELECT_TYPE      { handle_token(KWD_SELECT_TYPE_INDEX); }
1426  ;
1427
1428kwd_sequence:          KWD_SEQUENCE         { handle_token(KWD_SEQUENCE_INDEX); }
1429  ;
1430
1431kwd_sequential:        KWD_SEQUENTIAL       { handle_token(KWD_SEQUENTIAL_INDEX); }
1432  ;
1433
1434kwd_sign:              KWD_SIGN             { handle_token(KWD_SIGN_INDEX); }
1435  ;
1436
1437kwd_size:              KWD_SIZE             { handle_token(KWD_SIZE_INDEX); }
1438  ;
1439
1440kwd_source:            KWD_SOURCE           { handle_token(KWD_SOURCE_INDEX); }
1441  ;
1442
1443kwd_status:            KWD_STATUS           { handle_token(KWD_STATUS_INDEX); }
1444  ;
1445
1446kwd_stop:              KWD_STOP             { handle_token(KWD_STOP_INDEX); }
1447  ;
1448
1449kwd_subroutine:        KWD_SUBROUTINE       { handle_token(KWD_SUBROUTINE_INDEX); }
1450  ;
1451
1452kwd_target:            KWD_TARGET           { handle_token(KWD_TARGET_INDEX); }
1453  ;
1454
1455kwd_then:              KWD_THEN             { handle_token(KWD_THEN_INDEX); }
1456  ;
1457
1458kwd_true:              KWD_TRUE             { handle_token(KWD_TRUE_INDEX); }
1459  ;
1460
1461kwd_type:              KWD_TYPE             { handle_token(KWD_TYPE_INDEX); }
1462  ;
1463
1464kwd_unformatted:       KWD_UNFORMATTED      { handle_token(KWD_UNFORMATTED_INDEX); }
1465  ;
1466
1467kwd_unit:              KWD_UNIT             { handle_token(KWD_UNIT_INDEX); }
1468  ;
1469
1470kwd_use:               KWD_USE              { handle_token(KWD_USE_INDEX); }
1471  ;
1472
1473kwd_value:             KWD_VALUE            { handle_token(KWD_VALUE_INDEX); }
1474  ;
1475
1476kwd_volatile:          KWD_VOLATILE         { handle_token(KWD_VOLATILE_INDEX); }
1477  ;
1478
1479kwd_where:             KWD_WHERE            { handle_token(KWD_WHERE_INDEX); }
1480  ;
1481
1482kwd_write:             KWD_WRITE            { handle_token(KWD_WRITE_INDEX); }
1483  ;
1484
1485kwd_write_formatted:   KWD_WRITE_FORMATTED  { handle_token(KWD_WRITE_FORMATTED_INDEX); }
1486  ;
1487
1488kwd_write_unformatted: KWD_WRITE_UNFORMATTED  { handle_token(KWD_WRITE_UNFORMATTED_INDEX); }
1489  ;
1490
1491new_line: BCS_WHTSP_NEWLINE
1492  ;
1493
1494bcs_hash: BCS_PUNCT_HASH { handle_token(BCS_PUNCT_HASH_INDEX); }
1495  | ALT_PUNCT_HASH { handle_token(ALT_PUNCT_HASH_INDEX); }
1496  ;
1497
1498op_stringize: OP_STRINGIZE { handle_token(OP_STRINGIZE_INDEX); }
1499  ;
1500
1501token_splice: OP_TOKEN_SPLICE { handle_token(OP_TOKEN_SPLICE_INDEX); }
1502  | ALT_OP_TOKEN_SPLICE { handle_token(ALT_OP_TOKEN_SPLICE_INDEX); }
1503  ;
1504
1505mf_identifier: MACRO_FUNCTION_IDENTIFIER { handle_macro_open(function_macro_index /*MACRO_FUNCTION_IDENTIFIER_INDEX*/); }
1506  | INV_MFI_LOGICAL_AND  { handle_invalid_macro_id(OP_ALT_LOGICAL_AND_INDEX); }
1507  | INV_MFI_ASSIGN_BIT_AND  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_AND_INDEX); }
1508  | INV_MFI_BIT_AND  { handle_invalid_macro_id(OP_ALT_BIT_AND_INDEX); }
1509  | INV_MFI_BIT_OR  { handle_invalid_macro_id(OP_ALT_BIT_OR_INDEX); }
1510  | INV_MFI_BIT_NOT  { handle_invalid_macro_id(OP_ALT_BIT_NOT_INDEX); }
1511  | INV_MFI_LOGICAL_NOT  { handle_invalid_macro_id(OP_ALT_LOGICAL_NOT_INDEX); }
1512  | INV_MFI_NE  { handle_invalid_macro_id(OP_ALT_NE_INDEX); }
1513  | INV_MFI_LOGICAL_OR  { handle_invalid_macro_id(OP_ALT_LOGICAL_OR_INDEX); }
1514  | INV_MFI_ASSIGN_BIT_OR  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_OR_INDEX); }
1515  | INV_MFI_BIT_PLUS  { handle_invalid_macro_id(OP_ALT_BIT_PLUS_INDEX); }
1516  | INV_MFI_ASSIGN_BIT_PLUS  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_PLUS_INDEX); }
1517  ;
1518
1519mo_identifier: MACRO_OBJECT_IDENTIFIER { handle_macro_open(object_macro_index/*MACRO_OBJECT_IDENTIFIER_INDEX*/); }
1520  | invalid_macro_identifier
1521  ;
1522
1523mu_identifier: IDENTIFIER { handle_macro_undef(PPD_UNDEF_INDEX); }
1524  | invalid_macro_identifier { pop(); }
1525  ;
1526
1527invalid_ifdef_identifier: invalid_macro_identifier
1528  ;
1529
1530invalid_ifndef_identifier: invalid_macro_identifier
1531  ;
1532
1533invalid_macro_identifier: INV_ALT_LOGICAL_AND  { handle_invalid_macro_id(OP_ALT_LOGICAL_AND_INDEX); }
1534  | INV_ALT_ASSIGN_BIT_AND  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_AND_INDEX); }
1535  | INV_ALT_BIT_AND  { handle_invalid_macro_id(OP_ALT_BIT_AND_INDEX); }
1536  | INV_ALT_BIT_OR  { handle_invalid_macro_id(OP_ALT_BIT_OR_INDEX); }
1537  | INV_ALT_BIT_NOT  { handle_invalid_macro_id(OP_ALT_BIT_NOT_INDEX); }
1538  | INV_ALT_LOGICAL_NOT  { handle_invalid_macro_id(OP_ALT_LOGICAL_NOT_INDEX); }
1539  | INV_ALT_NE  { handle_invalid_macro_id(OP_ALT_NE_INDEX); }
1540  | INV_ALT_LOGICAL_OR  { handle_invalid_macro_id(OP_ALT_LOGICAL_OR_INDEX); }
1541  | INV_ALT_ASSIGN_BIT_OR  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_OR_INDEX); }
1542  | INV_ALT_BIT_PLUS  { handle_invalid_macro_id(OP_ALT_BIT_PLUS_INDEX); }
1543  | INV_ALT_ASSIGN_BIT_PLUS  { handle_invalid_macro_id(OP_ALT_ASSIGN_BIT_PLUS_INDEX); }
1544  ;
1545
1546bcs_exclamation: BCS_PUNCT_EXCLAMATION { handle_token(OP_LOGICAL_NOT_INDEX); }
1547  ;
1548
1549alt_truth_not: OP_ALT_LOGICAL_NOT { handle_token(OP_ALT_LOGICAL_NOT_INDEX); }
1550  ;
1551
1552pp_truth_not: BCS_PUNCT_EXCLAMATION
1553  | OP_ALT_LOGICAL_NOT
1554  ;
1555
1556ne: OP_NE { handle_token(OP_NE_INDEX); }
1557  | OP_ALT_NE { handle_token(OP_ALT_NE_INDEX); }
1558  ;
1559
1560pp_ne: OP_NE
1561  | OP_ALT_NE
1562  ;
1563
1564bcs_percent: member
1565  ;
1566
1567member: BCS_PUNCT_PERCENT { handle_token(OP_MEMBER_INDEX); }
1568  ;
1569
1570pp_modulo: BCS_PUNCT_PERCENT
1571  ;
1572
1573assign_modulo: OP_ASSIGN_MODULO  { handle_token(OP_ASSIGN_MODULO_INDEX); }
1574  ;
1575
1576bcs_ampersand: BCS_PUNCT_AMPERSAND { handle_token(BCS_PUNCT_AMPERSAND_INDEX); }
1577  ;
1578
1579alt_bit_and:  OP_ALT_BIT_AND { handle_token(OP_ALT_BIT_AND_INDEX); }
1580  ;
1581
1582pp_bit_and: BCS_PUNCT_AMPERSAND
1583  |  OP_ALT_BIT_AND
1584  ;
1585
1586truth_and: OP_LOGICAL_AND { handle_token(OP_LOGICAL_AND_INDEX); }
1587  |  OP_ALT_LOGICAL_AND { handle_token(OP_ALT_LOGICAL_AND_INDEX); }
1588  ;
1589
1590pp_truth_and: OP_LOGICAL_AND
1591  |  OP_ALT_LOGICAL_AND
1592  ;
1593
1594assign_bit_and: OP_ASSIGN_BIT_AND { handle_token(OP_ASSIGN_BIT_AND_INDEX); }
1595  |  OP_ALT_ASSIGN_BIT_AND { handle_token(OP_ALT_ASSIGN_BIT_AND_INDEX); }
1596  ;
1597
1598bcs_open_parenthesis: BCS_PUNCT_OPEN_PARENTHESIS { handle_token_open(BCS_PUNCT_OPEN_PARENTHESIS_INDEX); }
1599  ;
1600
1601bcs_close_parenthesis: BCS_PUNCT_CLOSE_PARENTHESIS { handle_token_close(BCS_PUNCT_CLOSE_PARENTHESIS_INDEX); }
1602  ;
1603
1604open_parenthesis_slash: OPEN_PARENTHESIS_SLASH { handle_token_open(OPEN_PARENTHESIS_SLASH_INDEX); }
1605  ;
1606
1607close_parenthesis_slash: CLOSE_PARENTHESIS_SLASH { handle_token_close(CLOSE_PARENTHESIS_SLASH_INDEX); }
1608  ;
1609
1610bcs_asterisk: BCS_PUNCT_ASTERISK { handle_token(BCS_PUNCT_ASTERISK_INDEX); }
1611  ;
1612
1613pp_multiply: BCS_PUNCT_ASTERISK
1614  ;
1615
1616assign_multiply: OP_ASSIGN_MULTIPLY  { handle_token(OP_ASSIGN_MULTIPLY_INDEX); }
1617  ;
1618
1619bcs_plus: BCS_PUNCT_PLUS { handle_token(BCS_PUNCT_PLUS_INDEX); }
1620  ;
1621
1622pp_plus: BCS_PUNCT_PLUS
1623  ;
1624
1625pp_unary_plus: BCS_PUNCT_PLUS
1626  ;
1627
1628increment: OP_INCREMENT { handle_token(OP_INCREMENT_INDEX); }
1629  ;
1630
1631assign_plus: OP_ASSIGN_PLUS { handle_token(OP_ASSIGN_PLUS_INDEX); }
1632  ;
1633
1634bcs_comma: BCS_PUNCT_COMMA { handle_token(BCS_PUNCT_COMMA_INDEX); }
1635  ;
1636
1637pp_comma_op: BCS_PUNCT_COMMA
1638  ;
1639
1640bcs_minus: BCS_PUNCT_MINUS { handle_token(BCS_PUNCT_MINUS_INDEX); }
1641  ;
1642
1643pp_minus: BCS_PUNCT_MINUS
1644  ;
1645
1646pp_unary_minus: BCS_PUNCT_MINUS
1647  ;
1648
1649decrement: OP_DECREMENT { handle_token(OP_DECREMENT_INDEX); }
1650  ;
1651
1652assign_minus: OP_ASSIGN_MINUS { handle_token(OP_ASSIGN_MINUS_INDEX); }
1653  ;
1654
1655pointer_member: OP_POINTER_MEMBER { handle_token(OP_POINTER_MEMBER_INDEX); }
1656  ;
1657
1658pointer_ptm: OP_POINTER_POINTER_TO_MEMBER { handle_token(OP_POINTER_POINTER_TO_MEMBER_INDEX); }
1659  ;
1660
1661bcs_period: BCS_PUNCT_PERIOD { handle_token(BCS_PUNCT_PERIOD_INDEX); }
1662  ;
1663
1664var_args: DECL_VAR_ARGS { handle_token(DECL_VAR_ARGS_INDEX); }
1665  ;
1666
1667object_ptm: OP_OBJECT_POINTER_TO_MEMBER  { handle_token(OP_OBJECT_POINTER_TO_MEMBER_INDEX); }
1668  ;
1669
1670bcs_slash: divide
1671  ;
1672
1673divide: BCS_PUNCT_SLASH { handle_token(OP_DIVIDE_INDEX); }
1674  ;
1675
1676pp_divide: BCS_PUNCT_SLASH
1677  ;
1678
1679assign_divide: OP_ASSIGN_DIVIDE { handle_token(OP_ASSIGN_DIVIDE_INDEX); }
1680  ;
1681
1682bcs_colon: BCS_PUNCT_COLON { handle_token(BCS_PUNCT_COLON_INDEX); }
1683  ;
1684
1685pp_conditional_separator: BCS_PUNCT_COLON
1686  ;
1687
1688dbl_colon: PUNC_DBL_COLON                 { handle_token(PUNC_DBL_COLON_INDEX); }
1689  ;
1690
1691arrow: PUNC_ARROW                 { handle_token(PUNC_ARROW_INDEX); }
1692  ;
1693
1694bcs_semicolon: BCS_PUNCT_SEMICOLON { handle_token(BCS_PUNCT_SEMICOLON_INDEX); }
1695  ;
1696
1697bcs_less_than: BCS_PUNCT_LESS_THAN { handle_token(BCS_PUNCT_LESS_THAN_INDEX); }
1698  ;
1699
1700pp_lt: BCS_PUNCT_LESS_THAN
1701  ;
1702
1703shift_left: OP_SHIFT_LEFT  { handle_token(OP_SHIFT_LEFT_INDEX); }
1704  ;
1705
1706pp_shift_left: OP_SHIFT_LEFT
1707  ;
1708
1709assign_shift_left: OP_ASSIGN_SHIFT_LEFT  { handle_token(OP_ASSIGN_SHIFT_LEFT_INDEX); }
1710  ;
1711
1712le: OP_LE { handle_token(OP_LE_INDEX); }
1713  ;
1714
1715pp_le: OP_LE
1716  ;
1717
1718bcs_equal: BCS_PUNCT_EQUAL { handle_token(BCS_PUNCT_EQUAL_INDEX); }
1719  ;
1720
1721eq: OP_EQ { handle_token(OP_EQ_INDEX); }
1722  ;
1723
1724pp_eq: OP_EQ
1725  ;
1726
1727bcs_greater_than: BCS_PUNCT_GREATER_THAN { handle_token(BCS_PUNCT_GREATER_THAN_INDEX); }
1728  ;
1729
1730pp_gt: BCS_PUNCT_GREATER_THAN
1731  ;
1732
1733ge: OP_GE { handle_token(OP_GE_INDEX); }
1734  ;
1735
1736pp_ge: OP_GE
1737  ;
1738
1739shift_right: OP_SHIFT_RIGHT { handle_token(OP_SHIFT_RIGHT_INDEX); }
1740  ;
1741
1742pp_shift_right: OP_SHIFT_RIGHT { handle_token(OP_SHIFT_RIGHT_INDEX); }
1743  ;
1744
1745assign_shift_right: OP_ASSIGN_SHIFT_RIGHT { handle_token(OP_ASSIGN_SHIFT_RIGHT_INDEX); }
1746  ;
1747
1748bcs_question: conditional_operator           
1749
1750conditional_operator: OP_CONDITIONAL  { handle_token(OP_CONDITIONAL_INDEX); }
1751  ;
1752
1753pp_conditional_operator: OP_CONDITIONAL
1754  ;
1755
1756bcs_open_bracket: BCS_PUNCT_OPEN_BRACKET { handle_token_open(BCS_PUNCT_OPEN_BRACKET_INDEX); }
1757  | ALT_PUNCT_OPEN_BRACKET { handle_token_open(ALT_PUNCT_OPEN_BRACKET_INDEX); }
1758  ;
1759
1760bcs_close_bracket: BCS_PUNCT_CLOSE_BRACKET { handle_token_close(BCS_PUNCT_CLOSE_BRACKET_INDEX); }
1761  | ALT_PUNCT_CLOSE_BRACKET { handle_token_close(ALT_PUNCT_CLOSE_BRACKET_INDEX); }
1762  ;
1763
1764bcs_caret: BCS_PUNCT_CARET  { handle_token(OP_BIT_PLUS_INDEX); }
1765  ;
1766
1767alt_bit_xor: OP_ALT_BIT_PLUS  { handle_token(OP_ALT_BIT_PLUS_INDEX); }
1768  ;
1769
1770pp_bit_xor: BCS_PUNCT_CARET
1771  | OP_ALT_BIT_PLUS
1772  ;
1773
1774assign_bit_xor: OP_ASSIGN_BIT_PLUS  { handle_token(OP_ASSIGN_BIT_PLUS_INDEX); }
1775  |  OP_ALT_ASSIGN_BIT_PLUS  { handle_token(OP_ALT_ASSIGN_BIT_PLUS_INDEX); }
1776  ;
1777
1778bcs_open_brace: BCS_PUNCT_OPEN_BRACE { handle_token_open(BCS_PUNCT_OPEN_BRACE_INDEX); }
1779  | ALT_PUNCT_OPEN_BRACE { handle_token_open(ALT_PUNCT_OPEN_BRACE_INDEX); }
1780  ;
1781
1782bcs_close_brace: BCS_PUNCT_CLOSE_BRACE { handle_token_close(BCS_PUNCT_CLOSE_BRACE_INDEX); }
1783  | ALT_PUNCT_CLOSE_BRACE { handle_token_close(ALT_PUNCT_CLOSE_BRACE_INDEX); }
1784  ;
1785
1786bcs_vertical_bar: BCS_PUNCT_VERTICAL_BAR { handle_token(OP_BIT_OR_INDEX); }
1787  ;
1788
1789alt_bit_or: OP_ALT_BIT_OR { handle_token(OP_BIT_OR_INDEX); }
1790  ;
1791
1792pp_bit_or: BCS_PUNCT_VERTICAL_BAR
1793  | OP_ALT_BIT_OR
1794  ;
1795
1796assign_bit_or: OP_ASSIGN_BIT_OR { handle_token(OP_ASSIGN_BIT_OR_INDEX); }
1797  |  OP_ALT_ASSIGN_BIT_OR { handle_token(OP_ALT_ASSIGN_BIT_OR_INDEX); }
1798  ;
1799
1800truth_or: OP_LOGICAL_OR { handle_token(OP_LOGICAL_OR_INDEX); }
1801  |  OP_ALT_LOGICAL_OR { handle_token(OP_ALT_LOGICAL_OR_INDEX); }
1802  ;
1803
1804pp_truth_or: OP_LOGICAL_OR
1805  |  OP_ALT_LOGICAL_OR
1806  ;
1807
1808bcs_tilde: BCS_PUNCT_TILDE { handle_token(OP_BIT_NOT_INDEX); }
1809  ;
1810
1811alt_bit_not: OP_ALT_BIT_NOT { handle_token(OP_ALT_BIT_NOT_INDEX); }
1812  ;
1813
1814pp_bit_not: BCS_PUNCT_TILDE
1815  | OP_ALT_BIT_NOT
1816  ;
1817
1818%%
1819
1820const char *get_yytname(int token) {
1821  return yytname[yytranslate[token]];
1822}
1823void yyerror(char const *s) {
1824  extern int error_count;
1825  extern int yychar;
1826  fprintf(stderr, "%s\n", s);
1827    if (yychar > 126) {
1828      fprintf(stderr, "File %s; line %d: yychar = %s(%d)\n",getCurrentFilename(), getCurrentLineNumber(), get_yytname(yychar), yychar);
1829    } else {
1830      fprintf(stderr, "File %s; line %d: yychar = %c\n",getCurrentFilename(),getCurrentLineNumber(), yychar);
1831    }
1832  error_count++;
1833}
1834