template/bison/yacc.c in lrama-0.5.6 vs template/bison/yacc.c in lrama-0.5.7
- old
+ new
@@ -99,83 +99,17 @@
# define YY_NULLPTR ((void*)0)
# endif
# endif
<%# b4_header_include_if -%>
+<%- if output.include_header -%>
+#include "<%= output.include_header %>"
+<%- else -%>
/* Use api.header.include to #include this header
instead of duplicating it here. */
-<%# b4_shared_declarations -%>
- <%-# b4_cpp_guard_open([b4_spec_mapped_header_file]) -%>
- <%- if output.spec_mapped_header_file -%>
-#ifndef <%= output.b4_cpp_guard__b4_spec_mapped_header_file %>
-# define <%= output.b4_cpp_guard__b4_spec_mapped_header_file %>
- <%- end -%>
- <%-# b4_declare_yydebug & b4_YYDEBUG_define -%>
-/* Debug traces. */
-#ifndef YYDEBUG
-# define YYDEBUG 0
-#endif
-#if YYDEBUG && !defined(yydebug)
-extern int yydebug;
-#endif
- <%-# b4_percent_code_get([[requires]]). %code is not supported -%>
-
- <%-# b4_token_enums_defines -%>
-/* Token kinds. */
-#ifndef YYTOKENTYPE
-# define YYTOKENTYPE
- enum yytokentype
- {
-<%= output.token_enums -%>
- };
- typedef enum yytokentype yytoken_kind_t;
-#endif
-
- <%-# b4_declare_yylstype -%>
- <%-# b4_value_type_define -%>
-/* Value type. */
-#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
-union YYSTYPE
-{
-#line <%= output.grammar.union.lineno %> "<%= output.grammar_file_path %>"
-<%= output.grammar.union.braces_less_code %>
-#line [@oline@] [@ofile@]
-
-};
-typedef union YYSTYPE YYSTYPE;
-# define YYSTYPE_IS_TRIVIAL 1
-# define YYSTYPE_IS_DECLARED 1
-#endif
-
- <%-# b4_location_type_define -%>
-/* Location type. */
-#if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED
-typedef struct YYLTYPE YYLTYPE;
-struct YYLTYPE
-{
- int first_line;
- int first_column;
- int last_line;
- int last_column;
-};
-# define YYLTYPE_IS_DECLARED 1
-# define YYLTYPE_IS_TRIVIAL 1
-#endif
-
-
-
-
- <%-# b4_declare_yyerror_and_yylex. Not supported -%>
- <%-# b4_declare_yyparse -%>
-int yyparse (<%= output.parse_param %>);
-
-
- <%-# b4_percent_code_get([[provides]]). %code is not supported -%>
- <%-# b4_cpp_guard_close([b4_spec_mapped_header_file]) -%>
- <%- if output.spec_mapped_header_file -%>
-#endif /* !<%= output.b4_cpp_guard__b4_spec_mapped_header_file %> */
- <%- end -%>
+<%= output.render_partial("bison/_yacc.h") %>
+<%- end -%>
<%# b4_declare_symbol_enum -%>
/* Symbol kind. */
enum yysymbol_kind_t
{
<%= output.symbol_enum -%>
@@ -2112,5 +2046,6 @@
<%# b4_percent_code_get([[epilogue]]) -%>
#line <%= output.aux.epilogue_first_lineno - 1 %> "<%= output.grammar_file_path %>"
<%= output.aux.epilogue -%>
+