summaryrefslogtreecommitdiff
path: root/tests/scanner.at
Commit message (Collapse)AuthorAgeFilesLines
* maint: don’t use \] in BREs and EREsPaul Eggert2022-07-311-1/+1
| | | | | | | | | * .travis.yml (jobs): * doc/local.mk ($(top_srcdir)/%D%/bison.help): * tests/regression.at (Web2c Actions, Useless Tokens): * tests/scanner.at (Token numbers: $1): Use plain ], not \], in a POSIX regular expression, as POSIX says the interpretation of \] is undefined.
* package: bump copyrights to 2022Paul Eggert2022-01-151-1/+1
| | | | Run "make update-copyright".
* tests: factor iterating over skeletonsAkim Demaille2021-08-071-1/+1
| | | | | | | * tests/local.at (AT_FOR_EACH_SKEL): New. Use where appropriate. * data/skeletons/lalr1.d: Reject -d. * tests/input.at, tests/scanner.at: Also check D.
* d: tests: various style fixesAdela Vais2021-01-301-9/+4
| | | | | | * tests/calc.at, tests/scanner.at: Here. (yylex): Report values directly, without storing them to the union first.
* Update URLs to prefer https: to http:Paul Eggert2021-01-291-1/+1
| | | | Also, fix a few http: URLs that were no longer working.
* package: bump copyrights to 2021Akim Demaille2021-01-161-1/+1
| | | | Run 'make update-copyright'.
* style: rename semanticVal as valueAkim Demaille2020-12-261-3/+3
| | | | | | | | * data/skeletons/README-D.txt: Remove, now useless and obsolete. * data/skeletons/glr2.cc, examples/d/calc/calc.y, * tests/calc.at, tests/d.at, tests/scanner.at (semanticVal): Replace with... (value): this.
* d: remove unnecessary methods from the Lexer interfaceAdela Vais2020-12-211-4/+0
| | | | | | | | | | | The complete symbol approach in yylex removes the need for the methods semanticVal, startPos and endPos, which were used when the values were reported separately. * data/skeletons/lalr1.d: Here. * doc/bison.texi: Remove sections about the three methods. * examples/d/calc/calc.y, examples/d/simple/calc.y: Remove the unused methods. * tests/calc.at, tests/d.at, tests/scanner.at: Test it.
* d: create alias Value for YYSemanticTypeAdela Vais2020-12-211-2/+2
| | | | | | * data/skeletons/d.m4: Here. * data/skeletons/lalr1.d, examples/d/calc/calc.y, examples/d/simple/calc.y: Adjust. * tests/calc.at, tests/d.at, tests/scanner.at: Test it.
* d: create alias Symbol for YYParse.SymbolAdela Vais2020-12-211-9/+9
| | | | | | | * data/skeletons/lalr1.d: Here. * doc/bison.texi: Document it. * examples/d/calc/calc.y, examples/d/simple/calc.y: Adjust. * tests/calc.at, tests/d.at, tests/scanner.at: Test it.
* d: change the return value of yylex from TokenKind to YYParser.SymbolAdela Vais2020-11-201-9/+9
| | | | | | | | | | | | | | The complete symbol approach was deemed to be the right approach for Dlang. Now, the user can return from yylex() an instance of YYParser.Symbol structure, which binds together the TokenKind, the semantic value and the location. Before, the last two were reported separately to the parser. Only the user API is changed, Bisons's internal structure is kept the same. * data/skeletons/d.m4 (struct YYParser.Symbol): New. * data/skeletons/lalr1.d: Change the return value. * doc/bison.texi: Document it. * examples/d/calc/calc.y, examples/d/simple/calc.y: Demonstrate it. * tests/calc.at, tests/scanner.at: Test it.
* style: enforce java coding styleAkim Demaille2020-11-101-12/+10
| | | | * tests/scanner.at: here.
* java: avoid Integer(String), use parseIntAkim Demaille2020-11-031-4/+4
| | | | | | | | | 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.
* d: change api.token.raw default value to trueAdela Vais2020-10-031-1/+2
| | | | | | | | Generate consecutive values for enum TokenKind, as D's yylex() returns TokenKind and collisions can't happen. * data/skeletons/d.m4: Change default value. * tests/scanner.at, tests/d.at: Check it.
* d: change the return value of yylex from int to TokenKindAdela Vais2020-09-261-1/+1
| | | | | | | | | | | | * data/skeletons/lalr1.d: Change the return value. * examples/d/calc/calc.y, examples/d/simple/calc.y: Adjust. * tests/scanner.at: Adjust. * tests/calc.at (_AT_DATA_CALC_Y(d)): New, extracted from... (_AT_DATA_CALC_Y(c)): here. The two grammars have been sufficiently different to be separated. Still trying to be them together results in a maintenance burden. For the same reason, instead of specifying the results for D and for the rest, compute the expected results with D from the regular case.
* glr2.cc: fork glr.cc to a c++ versionValentin Tolmer2020-08-301-1/+1
| | | | | | | | | | | | | This is a fork of glr.cc to be c++-first instead of a wrapper around glr.c. * data/skeletons/glr2.cc: New. * data/skeletons/bison.m4, data/skeletons/c++.m4: Adjust. * data/skeletons/c.m4 (b4_user_args_no_comma): New. * src/reader.c (grammar_rule_check_and_complete): glr2.cc is C++. * tests/actions.at, tests/c++.at, tests/calc.at, tests/conflicts.at, * tests/input.at, tests/local.at, tests/regression.at, tests/scanner.at, * tests/synclines.at, tests/types.at: Also check glr2.cc.
* d: put YYEMPTY in the TokenKindAkim Demaille2020-04-131-8/+8
| | | | | | | * data/skeletons/d.m4, data/skeletons/lalr1.d (b4_token_enums): Rename YYTokenType as TokenKind. Define YYEMPTY. * examples/d/calc.y, tests/calc.at, tests/scanner.at: Adjust.
* java: check and fix support for api.token.rawAkim Demaille2020-04-041-8/+102
| | | | | | | | * tests/local.at (AT_LANG_MATCH, AT_YYERROR_DECLARE(java)) (AT_YYERROR_DECLARE_EXTERN(java), AT_PARSER_CLASS): New. (AT_MAIN_DEFINE(java)): Use AT_PARSER_CLASS. * tests/scanner.at: Add a test for Java. * data/skeletons/lalr1.java (yytranslate_): Cast the result.
* package: bump copyrights to 2020Akim Demaille2020-01-101-1/+1
| | | | Run 'make update-copyright'.
* api.token.raw: check it against api.token.constructorAkim Demaille2019-12-071-10/+49
| | | | * tests/scanner.at: here.
* tests: port to Solaris 10 grepPaul Eggert2019-10-171-1/+1
| | | | * tests/scanner.at (Token numbers: $1): Use $EGREP, not grep -E.
* api.token.raw: apply to the other skeletonsAkim Demaille2019-09-141-32/+123
| | | | | | | | * data/skeletons/c++.m4, data/skeletons/glr.c, * data/skeletons/lalr1.c, data/skeletons/lalr1.java: Add support for api.token.raw. * tests/scanner.at: Check them.
* api.token.raw: check itAkim Demaille2019-09-141-0/+120
* tests/local.at (AT_TOKEN_RAW_IF): New. * tests/local.mk: New. Use it.