| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
| |
Run "make update-copyright".
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* examples/c++/Makefile, examples/c++/calc++/Makefile,
* examples/c++/glr/Makefile, examples/c/bistromathic/Makefile,
* examples/c/calc/Makefile, examples/c/glr/Makefile,
* examples/c/lexcalc/Makefile, examples/c/mfcalc/Makefile,
* examples/c/pushcalc/Makefile, examples/c/reccalc/Makefile,
* examples/c/rpcalc/Makefile, examples/d/calc/Makefile,
* examples/d/simple/Makefile, examples/java/calc/Makefile,
* examples/java/simple/Makefile:
Use --html to generate *.html directly.
No longer demonstrate --xml.
No longer show rules for xml to html.
Use --header, not --defines.
Use --graph without specifying the output file now that we
generate *.gv by default.
|
| |
|
|
| |
Also, fix a few http: URLs that were no longer working.
|
| |
|
|
| |
Run 'make update-copyright'.
|
| |
|
|
|
|
|
|
|
| |
examples/java/calc/Calc.java:1531: warning: [deprecation] Integer(String) in Integer has been deprecated
yylval = new Integer(st.sval);
^
* examples/java/calc/Calc.y, examples/java/simple/Calc.y,
* tests/calc.at, tests/scanner.at: Use Integer.parseInt.
|
| |
|
|
|
|
|
|
|
|
| |
Shamelessly stolen from Adrian Vogelsgesang's implementation in
lalr1.cc.
* data/skeletons/lalr1.java (yycdebugNnl, yyLacCheck, yyLacEstablish)
(yyLacDiscard, yylacStack, yylacEstablished): New.
(Context): Use it.
* examples/java/calc/Calc.y: Enable LAC.
|
| |
|
|
|
|
|
|
|
| |
Reported by Dennis Clarke.
https://lists.gnu.org/r/bug-bison/2020-08/msg00013.html
* examples/d/local.mk, examples/java/calc/local.mk,
* examples/java/simple/local.mk: Pass bison's options before its
argument, in case we're in POSIX mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Prompted by Rici Lake.
https://stackoverflow.com/questions/62658368/#comment110853985_62661621
Discussed with Paul Eggert.
* doc/bison.texi, examples/c/bistromathic/parse.y,
* examples/c/lexcalc/parse.y, examples/c/lexcalc/scan.l,
* examples/c/pushcalc/calc.y, examples/c/reccalc/parse.y,
* examples/c/reccalc/scan.l, examples/d/calc.y,
* examples/java/calc/Calc.y, examples/java/simple/Calc.y:
Install the GPL3+ header.
|
| |
|
|
|
|
|
|
|
| |
* data/skeletons/lalr1.java (Location): Make it a static class.
(Lexer.yylex, Lexer.getLVal, Lexer.getStartPos, Lexer.getEndPos):
These are not needed in push parsers.
* examples/java/calc/Calc.y: Demonstrate push parsers in the Java.
* doc/bison.texi: Push parsers have been supported for a long time,
remove incorrect statements stating the opposite.
|
| |
|
|
| |
* data/skeletons/lalr1.java, examples/java/calc/Calc.y: here.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
From
public interface Lexer {
/* Token kinds. */
/** Token number, to be returned by the scanner. */
static final int YYEOF = 0;
/** Token number, to be returned by the scanner. */
static final int YYERRCODE = 256;
/** Token number, to be returned by the scanner. */
static final int YYUNDEF = 257;
/** Token number, to be returned by the scanner. */
static final int BANG = 258;
...
/** Deprecated, use b4_symbol(0, id) instead. */
public static final int EOF = YYEOF;
to
public interface Lexer {
/* Token kinds. */
/** Token "end of file", to be returned by the scanner. */
static final int YYEOF = 0;
/** Token error, to be returned by the scanner. */
static final int YYerror = 256;
/** Token "invalid token", to be returned by the scanner. */
static final int YYUNDEF = 257;
/** Token "!", to be returned by the scanner. */
static final int BANG = 258;
...
/** Deprecated, use YYEOF instead. */
public static final int EOF = YYEOF;
* data/skeletons/java.m4 (b4_token_enum): Display the symbol's tag in
comment.
* data/skeletons/lalr1.java: Address overquotation issue.
* examples/java/calc/Calc.y, examples/java/simple/Calc.y: Use YYEOF,
not EOF.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Why didn't I think about this before??? symbolName should be a method
of SymbolKind.
* data/skeletons/lalr1.java (YYParser::yysymbolName): Move as...
* data/skeletons/java.m4 (SymbolKind::getName): this.
Make the table a static final table, not a local variable.
Adjust dependencies.
* doc/bison.texi (Java Parser Interface): Document i18n.
(Java Parser Context Interface): Document SymbolKind.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
|
| |
|
|
| |
* examples/java/calc/Calc.y, examples/java/simple/Calc.y: here.
|
| |
|
|
|
|
|
|
| |
That's one nice benefit from using enums.
* data/skeletons/lalr1.java (YYSYMBOL_YYEMPTY): No longer define it.
Use 'null' instead.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
|
| |
|
|
|
| |
* data/skeletons/lalr1.java: here.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
|
| |
|
|
|
| |
* data/skeletons/lalr1.java, examples/java/calc/Calc.y, tests/local.at:
here.
|
| |
|
|
|
|
|
|
|
|
| |
See https://lists.gnu.org/r/bison-patches/2020-04/msg00031.html.
* data/skeletons/d.m4, data/skeletons/lalr1.d,
* data/skeletons/java.m4, data/skeletons/lalr1.java
(SymbolType): Rename as...
(SymbolKind): this.
Adjust dependencies.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
The Java enums are very different from the C model. As a consequence,
one cannot "build" an enum directly from an integer, we must retrieve
it. That's the purpose of the SymbolType.get class method.
* data/skeletons/java.m4 (b4_symbol_enum, b4_case_code_symbol)
(b4_declare_symbol_enum): New.
* data/skeletons/lalr1.java: Use SymbolType,
SymbolType.YYSYMBOL_YYEMPTY, etc.
* examples/java/calc/Calc.y, tests/local.at: Adjust.
|
| |
|
|
|
|
| |
* examples/java/calc/Calc.y: Declare all the tokens, so that we are
compatibile with api.token.raw.
* examples/java/calc/Calc.test: Adjust.
|
| |
|
|
|
|
|
|
|
|
| |
The "_" is becoming a keyword in Java, which causes tons of warnings
currently in our test suite. GNU Gettext is now using "i18n" instead
of "_"
(https://git.savannah.gnu.org/gitweb/?p=gettext.git;a=commitdiff;h=e89fea36545f27487d9652a13e6a0adbea1117d0).
* data/skeletons/java.m4: Use "i18n", not "_".
* examples/java/calc/Calc.y, tests/calc.at: Adjust.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Suggested by Adrian Vogelsgesang.
https://lists.gnu.org/archive/html/bison-patches/2020-02/msg00069.html
* data/skeletons/lalr1.java (Context.EMPTY, Context.getToken): New.
(Context.yyntokens): Rename as...
(Context.NTOKENS): this.
Because (i) all the Java coding styles recommend upper case for
constants, and (ii) the Java Skeleton exposes Lexer.EOF, not
Lexer.YYEOF.
* data/skeletons/yacc.c (yyparse_context_token): New.
* examples/c/bistromathic/parse.y (yyreport_syntax_error): Don't use
yysyntax_error_arguments.
* examples/java/calc/Calc.y (yyreportSyntaxError): Likewise.
|
| |
|
|
|
|
| |
* examples/java/calc/Calc.y, tests/calc.at, tests/local.at
(getStartPos, getEndPos): Always return a new object.
* doc/bison.texi: Clarify this.
|
| |
|
|
|
|
| |
* data/skeletons/lalr1.java (Context): Make data members private.
(Context.getLocation): New.
* examples/java/calc/Calc.y, tests/java.at, tests/local.at: Adjust.
|
| |
|
|
|
|
|
| |
* data/skeletons/lalr1.java (yyexpectedTokens)
(yysyntaxErrorArguments): Make them methods of Context.
(Context.yysymbolName): New.
* tests/local.at: Adjust.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
* data/skeletons/lalr1.java: Add support for custom parse errors.
(yyntokens_): Make it public. Under...
(yyntokens): this name.
(Context): Capture the location too.
* examples/c/bistromathic/parse.y,
* examples/c/bistromathic/bistromathic.test:
Improve error message.
* examples/java/calc/Calc.test, examples/java/calc/Calc.y: Use custom
error messages.
* tests/calc.at, tests/local.at: Check custom error messages.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Java there is no need for N_ and yytranslate_. So instead of
hard-coding the use of N_ in the table of the symbol names, rely on
b4_symbol_translate.
* src/output.c (prepare_symbol_names): Use b4_symbol_translate instead
of N_.
* data/skeletons/c.m4 (b4_symbol_translate): New.
* data/skeletons/lalr1.java (yysymbolName): New.
Use it.
* examples/java/calc/Calc.y: Use parse.error=detailed.
* tests/calc.at: Check parse.error=detailed.
|
| |
|
|
|
| |
* examples/java/calc/Calc.y, examples/java/simple/Calc.y,
* tests/calc.at, tests/local.at: here.
|
| |
|
|
|
|
|
|
| |
* examples/java/calc/Calc.y: The StreamTokenizer cannot "peek" for the
next character, it reads it, and keeps it for the next call. So the
current location is one passed the end of the current token. To avoid
this, keep the previous position, and use it to end the current token.
* examples/java/calc/Calc.test: Adjust.
|
| |
|
|
|
| |
* examples/java/calc/Calc.y, examples/java/simple/Calc.y: here.
* examples/java/simple/Calc.y: Use the tokenizer's handling of blanks.
|
| |
|
|
|
| |
* examples/java: Split in...
* examples/java/simple, examples/java/calc: these.
|
| |
|
|
|
|
|
|
|
| |
This example, so far, was tracking the current token number, not the
current column number. This is not nice for an example...
* examples/java/Calc.y (PositionReader): New.
Use it.
* examples/java/Calc.test: Check the output.
|
| |
|
|
|
| |
* examples/java/Calc.y: Propagate the exit status.
Support -p.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
AFAICT, autoboxing/unboxing was added in Java 5 (September 30, 2004).
I think we can afford to use it. It should help us merge some Java
tests with the main ones.
However, beware that != does not unbox: it compares the object
addresses.
* examples/java/Calc.y, tests/java.at: Simplify.
* examples/java/Calc.test, tests/java.at: Improve tests.
|
| |
|
|
| |
Run 'make update-copyright'.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
* data/skeletons/lalr1.java: Use more conventional function names for
Java.
Prefer < and <= to => and >.
Use the same approach for m4 quotation as in the other skeletons.
Fix indentation issues.
* tests/calc.at, tests/java.at, tests/javapush.at: Fix quotation style.
(main): Use 'args', not 'argv', the former seems more conventional and
is used elsewhere in Bison.
Prefer character literals to integers to denote characters.
* examples/java/Calc.y: Likewise.
|
| |
|
|
| |
* examples/d/local.mk, examples/java/local.mk: here.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
It works only in implicit rules (or with GNU Make, but not with
Solaris Make).
Reported by Bruno Haible.
http://lists.gnu.org/archive/html/bug-bison/2019-05/msg00009.html
Diagnosed thanks to Kiyoshi Kanazawa.
* examples/c/reccalc/local.mk, examples/d/local.mk,
* examples/java/local.mk: Don't use $< in non implicit rules.
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See 890ee8a1fd288b3cc1c21c49ea0ece696ef40565 and
https://lists.gnu.org/archive/html/bison-patches/2019-01/msg00024.html.
* data/skeletons/d.m4, data/skeletons/java.m4
(abstract, annotations, extends, final, implements, public, strictfp):
Rename as...
(api.parser.abstract, api.parser.annotations, api.parser.extends)
(api.parser.final, api.parser.implements, api.parser.public)
(api.parser.strictfp):
these.
* src/muscle-tab.c (muscle_percent_variable_update): Ensure backward
compatibility.
* doc/bison.texi, examples/d/calc.y, examples/java/Calc.y,
tests/input.at: Adjust.
|
| |
|
|
|
|
|
| |
* examples/java/Calc.y: Fix indentation.
Sort.
Don't use %name-prefix, since api.parser.class is already defined.
* examples/d/calc.y: Likewise.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous name was historical and inconsistent.
* src/muscle-tab.c (define_directive): Use the proper value passing
syntax, based on the muscle kind.
(muscle_percent_variable_update): Use the right value passing syntax.
Migrate from parser_class_name to api.parser.class.
* data/skeletons: Migrate from parser_class_name to api.parser.class.
* doc/bison.texi (%define Summary): Document both parser_class_name
and api.parser.class.
Promote the latter over the former.
|
| |
|
|
|
|
|
|
| |
Commit 112ccb5ed73ba5c64b0b5300d8b9b686f02f094c moved the skeletons
from dist_pkgdata_DATA to dist_skeletons_DATA, hence broke the dependencies.
* Makefile.am (dependencies): New.
Use it where appropriate.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert some of the READMEs to Markdown, which is now more common, and
nicely displayed in some git hosting services.
Add missing READMEs and Makefiles. Generate XML, HTML and Dot files. Be
sure to ship the test files. Complete CLEANFILES to remove all generated
files.
* examples/calc++: Move into...
* examples/c++: here.
* examples/mfcalc, examples/rpcalc: Move into...
* examples/c: here.
* examples/README.md, examples/c++/calc++/Makefile, examples/c/local.mk,
* examples/c/mfcalc/Makefile, examples/c/rpcalc/Makefile,
* examples/d/README.md, examples/java/README.md:
New files.
* examples/test (medir): Be robust to deeper directory nesting.
|
| |
|
|
| |
* examples/java/Makefile, examples/d/Makefile: New.
|
| |
|
|
| |
* examples/java/local.mk (%D%/Calc.java): here.
|
|
|
* examples/java/Calc.y: New, based on test 495: "Calculator
parse.error=verbose %locations".
* examples/java/Calc.test, examples/java/local.mk: New.
* configure.ac (ENABLE_JAVA): New.
* examples/test (prog): Be ready to run Java programs.
|