167 |
template < > |
template < > |
168 |
struct Traits< b4_name > |
struct Traits< b4_name > |
169 |
{ |
{ |
170 |
typedef b4_uint_type(b4_translate_max) TokenNumberType; |
typedef b4_int_type_for([b4_translate]) TokenNumberType; |
171 |
typedef b4_sint_type(b4_rhs_max) RhsNumberType; |
typedef b4_int_type_for([b4_rhs]) RhsNumberType; |
172 |
typedef int StateType; |
typedef int StateType; |
173 |
typedef yystype SemanticType; |
typedef yystype SemanticType; |
174 |
typedef b4_ltype LocationType; |
typedef b4_ltype LocationType; |
223 |
LocationStack location_stack_; |
LocationStack location_stack_; |
224 |
|
|
225 |
/* Tables. */ |
/* Tables. */ |
226 |
static const b4_sint_type(b4_pact_max) pact_[[]]; |
static const b4_int_type_for([b4_pact]) pact_[[]]; |
227 |
static const b4_sint_type(b4_pact_max) pact_ninf_; |
static const b4_int_type_for([b4_pact]) pact_ninf_; |
228 |
static const short defact_[[]]; |
static const b4_int_type_for([b4_defact]) defact_[[]]; |
229 |
static const short pgoto_[[]]; |
static const b4_int_type_for([b4_pgoto]) pgoto_[[]]; |
230 |
static const short defgoto_[[]]; |
static const b4_int_type_for([b4_defgoto]) defgoto_[[]]; |
231 |
static const b4_sint_type(b4_table_max) table_[[]]; |
static const b4_int_type_for([b4_table]) table_[[]]; |
232 |
static const b4_sint_type(b4_table_max) table_ninf_; |
static const b4_int_type_for([b4_table]) table_ninf_; |
233 |
static const short check_[[]]; |
static const b4_int_type_for([b4_check]) check_[[]]; |
234 |
static const b4_uint_type(b4_r1_max) r1_[[]]; |
static const b4_int_type_for([b4_r1]) r1_[[]]; |
235 |
static const b4_uint_type(b4_r2_max) r2_[[]]; |
static const b4_int_type_for([b4_r2]) r2_[[]]; |
236 |
|
|
237 |
#if YYDEBUG || YYERROR_VERBOSE |
#if YYDEBUG || YYERROR_VERBOSE |
238 |
static const char* const name_[[]]; |
static const char* const name_[[]]; |
241 |
/* More tables, for debugging. */ |
/* More tables, for debugging. */ |
242 |
#if YYDEBUG |
#if YYDEBUG |
243 |
static const RhsNumberType rhs_[[]]; |
static const RhsNumberType rhs_[[]]; |
244 |
static const b4_uint_type(b4_prhs_max) prhs_[[]]; |
static const b4_int_type_for([b4_prhs]) prhs_[[]]; |
245 |
static const b4_uint_type(b4_rline_max) rline_[[]]; |
static const b4_int_type_for([b4_rline]) rline_[[]]; |
246 |
static const b4_uint_type(b4_stos_max) stos_[[]]; |
static const b4_int_type_for([b4_stos]) stos_[[]]; |
247 |
static const short token_number_[[]]; |
static const b4_int_type_for([b4_toknum]) token_number_[[]]; |
248 |
#endif |
#endif |
249 |
|
|
250 |
/* Even more tables. */ |
/* Even more tables. */ |
436 |
{ |
{ |
437 |
YYCDEBUG << "Reducing via rule " << n_ - 1 |
YYCDEBUG << "Reducing via rule " << n_ - 1 |
438 |
<< " (line " << rline_[[n_]] << "), "; |
<< " (line " << rline_[[n_]] << "), "; |
439 |
for (b4_uint_type(b4_prhs_max) i = prhs_[[n_]]; |
for (b4_int_type_for([b4_prhs]) i = prhs_[[n_]]; |
440 |
rhs_[[i]] >= 0; ++i) |
rhs_[[i]] >= 0; ++i) |
441 |
YYCDEBUG << name_[[rhs_[i]]] << ' '; |
YYCDEBUG << name_[[rhs_[i]]] << ' '; |
442 |
YYCDEBUG << "-> " << name_[[r1_[n_]]] << std::endl; |
YYCDEBUG << "-> " << name_[[r1_[n_]]] << std::endl; |
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 b4_sint_type(b4_pact_max) yy::b4_name::pact_ninf_ = b4_pact_ninf; |
const b4_int_type_for([b4_pact]) yy::b4_name::pact_ninf_ = b4_pact_ninf; |
633 |
const b4_sint_type(b4_pact_max) |
const b4_int_type_for([b4_pact]) |
634 |
yy::b4_name::pact_[[]] = |
yy::b4_name::pact_[[]] = |
635 |
{ |
{ |
636 |
b4_pact |
b4_pact |
639 |
/* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE |
/* YYDEFACT[[S]] -- default rule to reduce with in state S when YYTABLE |
640 |
doesn't specify something else to do. Zero means the default is an |
doesn't specify something else to do. Zero means the default is an |
641 |
error. */ |
error. */ |
642 |
const short |
const b4_int_type_for([b4_defact]) |
643 |
yy::b4_name::defact_[[]] = |
yy::b4_name::defact_[[]] = |
644 |
{ |
{ |
645 |
b4_defact |
b4_defact |
646 |
}; |
}; |
647 |
|
|
648 |
/* YYPGOTO[[NTERM-NUM]]. */ |
/* YYPGOTO[[NTERM-NUM]]. */ |
649 |
const short |
const b4_int_type_for([b4_pgoto]) |
650 |
yy::b4_name::pgoto_[[]] = |
yy::b4_name::pgoto_[[]] = |
651 |
{ |
{ |
652 |
b4_pgoto |
b4_pgoto |
653 |
}; |
}; |
654 |
|
|
655 |
/* YYDEFGOTO[[NTERM-NUM]]. */ |
/* YYDEFGOTO[[NTERM-NUM]]. */ |
656 |
const short |
const b4_int_type_for([b4_defgoto]) |
657 |
yy::b4_name::defgoto_[[]] = |
yy::b4_name::defgoto_[[]] = |
658 |
{ |
{ |
659 |
b4_defgoto |
b4_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 b4_sint_type(b4_table_max) yy::b4_name::table_ninf_ = b4_table_ninf; |
const b4_int_type_for([b4_table]) yy::b4_name::table_ninf_ = b4_table_ninf; |
666 |
const b4_sint_type(b4_table_max) |
const b4_int_type_for([b4_table]) |
667 |
yy::b4_name::table_[[]] = |
yy::b4_name::table_[[]] = |
668 |
{ |
{ |
669 |
b4_table |
b4_table |
670 |
}; |
}; |
671 |
|
|
672 |
/* YYCHECK. */ |
/* YYCHECK. */ |
673 |
const short |
const b4_int_type_for([b4_check]) |
674 |
yy::b4_name::check_[[]] = |
yy::b4_name::check_[[]] = |
675 |
{ |
{ |
676 |
b4_check |
b4_check |
679 |
#if YYDEBUG |
#if YYDEBUG |
680 |
/* STOS_[[STATE-NUM]] -- The (internal number of the) accessing |
/* STOS_[[STATE-NUM]] -- The (internal number of the) accessing |
681 |
symbol of state STATE-NUM. */ |
symbol of state STATE-NUM. */ |
682 |
const b4_uint_type(b4_stos_max) |
const b4_int_type_for([b4_stos]) |
683 |
yy::b4_name::stos_[[]] = |
yy::b4_name::stos_[[]] = |
684 |
{ |
{ |
685 |
b4_stos |
b4_stos |
687 |
|
|
688 |
/* TOKEN_NUMBER_[[YYLEX-NUM]] -- Internal token number corresponding |
/* TOKEN_NUMBER_[[YYLEX-NUM]] -- Internal token number corresponding |
689 |
to YYLEX-NUM. */ |
to YYLEX-NUM. */ |
690 |
const short |
const b4_int_type_for([b4_toknum]) |
691 |
yy::b4_name::token_number_[[]] = |
yy::b4_name::token_number_[[]] = |
692 |
{ |
{ |
693 |
b4_toknum |
b4_toknum |
695 |
#endif |
#endif |
696 |
|
|
697 |
/* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */ |
/* YYR1[[YYN]] -- Symbol number of symbol that rule YYN derives. */ |
698 |
const b4_uint_type(b4_r1_max) |
const b4_int_type_for([b4_r1]) |
699 |
yy::b4_name::r1_[[]] = |
yy::b4_name::r1_[[]] = |
700 |
{ |
{ |
701 |
b4_r1 |
b4_r1 |
702 |
}; |
}; |
703 |
|
|
704 |
/* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */ |
/* YYR2[[YYN]] -- Number of symbols composing right hand side of rule YYN. */ |
705 |
const b4_uint_type(b4_r2_max) |
const b4_int_type_for([b4_r2]) |
706 |
yy::b4_name::r2_[[]] = |
yy::b4_name::r2_[[]] = |
707 |
{ |
{ |
708 |
b4_r2 |
b4_r2 |
728 |
|
|
729 |
/* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in |
/* YYPRHS[[YYN]] -- Index of the first RHS symbol of rule number YYN in |
730 |
YYRHS. */ |
YYRHS. */ |
731 |
const b4_uint_type(b4_prhs_max) |
const b4_int_type_for([b4_prhs]) |
732 |
yy::b4_name::prhs_[[]] = |
yy::b4_name::prhs_[[]] = |
733 |
{ |
{ |
734 |
b4_prhs |
b4_prhs |
735 |
}; |
}; |
736 |
|
|
737 |
/* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */ |
/* YYRLINE[[YYN]] -- source line where rule number YYN was defined. */ |
738 |
const b4_uint_type(b4_rline_max) |
const b4_int_type_for([b4_rline]) |
739 |
yy::b4_name::rline_[[]] = |
yy::b4_name::rline_[[]] = |
740 |
{ |
{ |
741 |
b4_rline |
b4_rline |