Ruby: tool/lrama/template/bison/_yacc.h Source File

Ruby 4.0.5p0 (2026-05-20 revision 64336ffd0ee9e1f4c05891695a3d7b49cb709721)

_yacc.h
1<%# b4_shared_declarations -%>
2 <%-# b4_cpp_guard_open([b4_spec_mapped_header_file]) -%>
3 <%- if output.spec_mapped_header_file -%>
4#ifndef <%= output.b4_cpp_guard__b4_spec_mapped_header_file %>
5# define <%= output.b4_cpp_guard__b4_spec_mapped_header_file %>
6 <%- end -%>
7 <%-# b4_declare_yydebug & b4_YYDEBUG_define -%>
8/* Debug traces. */
9#ifndef YYDEBUG
10# define YYDEBUG 0
11#endif
12#if YYDEBUG && !defined(yydebug)
13extern int yydebug;
14#endif
15<%= output.percent_code("requires") %>
16
17 <%-# b4_token_enums_defines -%>
18/* Token kinds. */
19#ifndef YYTOKENTYPE
20# define YYTOKENTYPE
21 enum yytokentype
22 {
23<%= output.token_enums -%>
24 };
25 typedef enum yytokentype yytoken_kind_t;
26#endif
27
28 <%-# b4_declare_yylstype -%>
29 <%-# b4_value_type_define -%>
30/* Value type. */
31<% if output.grammar.union %>
32#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
33union YYSTYPE
34{
35#line <%= output.grammar.union.lineno %> "<%= output.grammar_file_path %>"
36<%= output.grammar.union.braces_less_code %>
37#line [@oline@] [@ofile@]
38
39};
40typedef union YYSTYPE YYSTYPE;
41# define YYSTYPE_IS_TRIVIAL 1
42# define YYSTYPE_IS_DECLARED 1
43#endif
44<% else %>
45#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
46typedef int YYSTYPE;
47# define YYSTYPE_IS_TRIVIAL 1
48# define YYSTYPE_IS_DECLARED 1
49#endif
50<% end %>
51
52 <%-# b4_location_type_define -%>
53/* Location type. */
54#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
55typedef struct YYLTYPE YYLTYPE;
56struct YYLTYPE
57{
58 int first_line;
59 int first_column;
60 int last_line;
61 int last_column;
62};
63# define YYLTYPE_IS_DECLARED 1
64# define YYLTYPE_IS_TRIVIAL 1
65#endif
66
67
68
69
70 <%-# b4_declare_yyerror_and_yylex. Not supported -%>
71 <%-# b4_declare_yyparse -%>
72int yyparse (<%= output.parse_param %>);
73
74
75<%= output.percent_code("provides") %>
76 <%-# b4_cpp_guard_close([b4_spec_mapped_header_file]) -%>
77 <%- if output.spec_mapped_header_file -%>
78#endif /* !<%= output.b4_cpp_guard__b4_spec_mapped_header_file %> */
79 <%- end -%>
YYSTYPE
Definition parse.h:192