/[bison]/bison/data/lalr1.cc
ViewVC logotype

Diff of /bison/data/lalr1.cc

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

revision 1.3 by akim, Wed Jul 3 12:51:30 2002 UTC revision 1.4 by akim, Thu Jul 25 17:30:44 2002 UTC
# Line 223  namespace yy Line 223  namespace yy
223      LocationStack location_stack_;      LocationStack location_stack_;
224    
225      /* Tables.  */      /* Tables.  */
226      static const short pact_[[]];      static const b4_sint_type(b4_pact_max) pact_[[]];
227        static const b4_sint_type(b4_pact_max) pact_ninf_;
228      static const short defact_[[]];      static const short defact_[[]];
229      static const short pgoto_[[]];      static const short pgoto_[[]];
230      static const short defgoto_[[]];      static const short defgoto_[[]];
231      static const short table_[[]];      static const b4_sint_type(b4_table_max) table_[[]];
232        static const b4_sint_type(b4_table_max) table_ninf_;
233      static const short check_[[]];      static const short check_[[]];
234      static const b4_uint_type(b4_r1_max) r1_[[]];      static const b4_uint_type(b4_r1_max) r1_[[]];
235      static const b4_uint_type(b4_r2_max) r2_[[]];      static const b4_uint_type(b4_r2_max) r2_[[]];
# Line 251  namespace yy Line 253  namespace yy
253      /* Constants.  */      /* Constants.  */
254      static const int eof_;      static const int eof_;
255      static const int last_;      static const int last_;
     static const int flag_;  
256      static const int nnts_;      static const int nnts_;
257      static const int empty_;      static const int empty_;
258      static const int final_;      static const int final_;
# Line 336  yy::b4_name::parse () Line 337  yy::b4_name::parse ()
337    
338    /* Try to take a decision without lookahead.  */    /* Try to take a decision without lookahead.  */
339    n_ = pact_[[state_]];    n_ = pact_[[state_]];
340    if (n_ == flag_)    if (n_ == pact_ninf_)
341      goto yydefault;      goto yydefault;
342    
343    /* Read a lookahead token.  */    /* Read a lookahead token.  */
# Line 375  yy::b4_name::parse () Line 376  yy::b4_name::parse ()
376    n_ = table_[[n_]];    n_ = table_[[n_]];
377    if (n_ < 0)    if (n_ < 0)
378      {      {
379        if (n_ == flag_)        if (n_ == table_ninf_)
380          goto yyerrlab;          goto yyerrlab;
381        else        else
382          {          {
# Line 492  yy::b4_name::parse () Line 493  yy::b4_name::parse ()
493    
494  #if YYERROR_VERBOSE  #if YYERROR_VERBOSE
495        n_ = pact_[[state_]];        n_ = pact_[[state_]];
496        if (n_ > flag_ && n_ < last_)        if (pact_ninf_ < n_ && n_ < last_)
497          {          {
498            message = "parse error, unexpected ";            message = "parse error, unexpected ";
499            message += name_[[ilooka_]];            message += name_[[ilooka_]];
# Line 543  yy::b4_name::parse () Line 544  yy::b4_name::parse ()
544    for (;;)    for (;;)
545      {      {
546        n_ = pact_[[state_]];        n_ = pact_[[state_]];
547        if (n_ != flag_)        if (n_ != pact_ninf_)
548          {          {
549            n_ += terror_;            n_ += terror_;
550            if (0 <= n_ && n_ <= last_ && check_[[n_]] == terror_)            if (0 <= n_ && n_ <= last_ && check_[[n_]] == terror_)
# Line 628  yy::b4_name::lex_ () Line 629  yy::b4_name::lex_ ()
629    
630  /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing  /* YYPACT[[STATE-NUM]] -- Index in YYTABLE of the portion describing
631     STATE-NUM.  */     STATE-NUM.  */
632  const short  const b4_sint_type(b4_pact_max) yy::b4_name::pact_ninf_ = b4_pact_ninf;
633    const b4_sint_type(b4_pact_max)
634  yy::b4_name::pact_[[]] =  yy::b4_name::pact_[[]] =
635  {  {
636    b4_pact    b4_pact
# Line 660  yy::b4_name::defgoto_[[]] = Line 662  yy::b4_name::defgoto_[[]] =
662  /* YYTABLE[[YYPACT[STATE-NUM]]].  What to do in state STATE-NUM.  If  /* YYTABLE[[YYPACT[STATE-NUM]]].  What to do in state STATE-NUM.  If
663     positive, shift that token.  If negative, reduce the rule which     positive, shift that token.  If negative, reduce the rule which
664     number is the opposite.  If zero, do what YYDEFACT says.  */     number is the opposite.  If zero, do what YYDEFACT says.  */
665  const short  const b4_sint_type(b4_table_max) yy::b4_name::table_ninf_ = b4_table_ninf;
666    const b4_sint_type(b4_table_max)
667  yy::b4_name::table_[[]] =  yy::b4_name::table_[[]] =
668  {  {
669    b4_table    b4_table
# Line 757  yy::b4_name::translate_ (int token) Line 760  yy::b4_name::translate_ (int token)
760    
761  const int yy::b4_name::eof_ = 0;  const int yy::b4_name::eof_ = 0;
762  const int yy::b4_name::last_ = b4_last;  const int yy::b4_name::last_ = b4_last;
 const int yy::b4_name::flag_ = b4_flag;  
763  const int yy::b4_name::nnts_ = b4_nterms_number;  const int yy::b4_name::nnts_ = b4_nterms_number;
764  const int yy::b4_name::empty_ = -2;  const int yy::b4_name::empty_ = -2;
765  const int yy::b4_name::final_ = b4_final_state_number;  const int yy::b4_name::final_ = b4_final_state_number;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

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