/[bison]/bison/src/scan-gram.l
ViewVC logotype

Diff of /bison/src/scan-gram.l

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.62 by hilfinger, Tue Jun 10 02:44:58 2003 UTC revision 1.63 by akim, Mon Aug 25 15:16:25 2003 UTC
# Line 190  splice  (\\[ \f\t\v]*\n)* Line 190  splice  (\\[ \f\t\v]*\n)*
190    "%expect"               return PERCENT_EXPECT;    "%expect"               return PERCENT_EXPECT;
191    "%file-prefix"          return PERCENT_FILE_PREFIX;    "%file-prefix"          return PERCENT_FILE_PREFIX;
192    "%fixed"[-_]"output"[-_]"files"   return PERCENT_YACC;    "%fixed"[-_]"output"[-_]"files"   return PERCENT_YACC;
193      "%initial-action"       token_type = PERCENT_INITIAL_ACTION; BEGIN SC_PRE_CODE;
194    "%glr-parser"           return PERCENT_GLR_PARSER;    "%glr-parser"           return PERCENT_GLR_PARSER;
195    "%left"                 return PERCENT_LEFT;    "%left"                 return PERCENT_LEFT;
196    "%lex-param"            token_type = PERCENT_LEX_PARAM; BEGIN SC_PRE_CODE;    "%lex-param"            token_type = PERCENT_LEX_PARAM; BEGIN SC_PRE_CODE;
# Line 649  splice  (\\[ \f\t\v]*\n)* Line 650  splice  (\\[ \f\t\v]*\n)*
650    
651  %%  %%
652    
653  /* Keeps track of the maximum number of semantic values to the left of  /* Keeps track of the maximum number of semantic values to the left of
654     a handle (those referenced by $0, $-1, etc.) are required by the     a handle (those referenced by $0, $-1, etc.) are required by the
655     semantic actions of this grammar. */     semantic actions of this grammar. */
656  int max_left_semantic_context = 0;  int max_left_semantic_context = 0;
657    
# Line 807  handle_action_dollar (char *text, locati Line 808  handle_action_dollar (char *text, locati
808  }  }
809    
810    
811  /*-----------------------------------------------------------------.  /*----------------------------------------------------------------.
812  | Dispatch onto handle_action_dollar, or handle_destructor_dollar, |  | Map `$?' onto the proper M4 symbol, depending on its TOKEN_TYPE |
813  | depending upon TOKEN_TYPE.                                       |  | (are we in an action?).                                         |
814  `-----------------------------------------------------------------*/  `----------------------------------------------------------------*/
815    
816  static void  static void
817  handle_dollar (int token_type, char *text, location loc)  handle_dollar (int token_type, char *text, location loc)
# Line 823  handle_dollar (int token_type, char *tex Line 824  handle_dollar (int token_type, char *tex
824        break;        break;
825    
826      case PERCENT_DESTRUCTOR:      case PERCENT_DESTRUCTOR:
827        case PERCENT_INITIAL_ACTION:
828      case PERCENT_PRINTER:      case PERCENT_PRINTER:
829        if (text[1] == '$')        if (text[1] == '$')
830          {          {
# Line 875  handle_action_at (char *text, location l Line 877  handle_action_at (char *text, location l
877  }  }
878    
879    
880  /*-------------------------------------------------------------------.  /*----------------------------------------------------------------.
881  | Dispatch onto handle_action_at, or handle_destructor_at, depending |  | Map `@?' onto the proper M4 symbol, depending on its TOKEN_TYPE |
882  | upon CODE_KIND.                                                    |  | (are we in an action?).                                         |
883  `-------------------------------------------------------------------*/  `----------------------------------------------------------------*/
884    
885  static void  static void
886  handle_at (int token_type, char *text, location loc)  handle_at (int token_type, char *text, location loc)
# Line 889  handle_at (int token_type, char *text, l Line 891  handle_at (int token_type, char *text, l
891        handle_action_at (text, loc);        handle_action_at (text, loc);
892        return;        return;
893    
894        case PERCENT_INITIAL_ACTION:
895      case PERCENT_DESTRUCTOR:      case PERCENT_DESTRUCTOR:
896      case PERCENT_PRINTER:      case PERCENT_PRINTER:
897        if (text[1] == '$')        if (text[1] == '$')

Legend:
Removed from v.1.62  
changed lines
  Added in v.1.63

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26