Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions lib/lrama/grammar/stdlib.y
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

**********************************************************************/

%%

// -------------------------------------------------------------------
// Options

Expand Down Expand Up @@ -138,7 +140,3 @@
%rule separated_list(separator, X)
: option(separated_nonempty_list(separator, X))
;

%%

%union{};
8 changes: 8 additions & 0 deletions template/bison/_yacc.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ extern int yydebug;
<%-# b4_declare_yylstype -%>
<%-# b4_value_type_define -%>
/* Value type. */
<% if output.grammar.union %>
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
union YYSTYPE
{
Expand All @@ -40,6 +41,13 @@ typedef union YYSTYPE YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
<% else %>
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define YYSTYPE_IS_TRIVIAL 1
# define YYSTYPE_IS_DECLARED 1
#endif
<% end %>

<%-# b4_location_type_define -%>
/* Location type. */
Expand Down