Skip to content

Commit

Permalink
d: remove the default prefix for SymbolKind's enum elements
Browse files Browse the repository at this point in the history
This is not needed in D, since the kinds are "scoped".

* data/skeletons/d.m4: Remove the default prefix.
* doc/bison.text: Document it.
  • Loading branch information
adelavais authored and akimd committed Oct 2, 2020
1 parent 4855b98 commit 4bbda69
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
2 changes: 0 additions & 2 deletions data/skeletons/d.m4
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,6 @@ b4_symbol_foreach([b4_token_enum])dnl
## Symbol kinds. ##
## -------------- ##

b4_percent_define_default([[api.symbol.prefix]], [[S_]])

# b4_symbol_kind(NUM)
# -------------------
m4_define([b4_symbol_kind],
Expand Down
5 changes: 3 additions & 2 deletions doc/bison.texi
Original file line number Diff line number Diff line change
Expand Up @@ -6420,7 +6420,7 @@ Any non empty string. Must be a valid identifier in the target language
(typically a non empty sequence of letters, underscores, and ---not at the
beginning--- digits).

The empty prefix is invalid:
The empty prefix is (generally) invalid:
@itemize
@item
in C it would create collision with the @code{YYERROR} macro, and
Expand All @@ -6436,7 +6436,8 @@ with other members of the @code{SymbolKind} class.


@item Default Value:
@code{YYSYMBOL_} in C. @code{S_} in C++, D and Java.
@code{YYSYMBOL_} in C. @code{S_} in C++ and Java. The default prefix is
removed from D.
@item History:
introduced in Bison 3.6.
@end itemize
Expand Down

0 comments on commit 4bbda69

Please sign in to comment.