Files
bison/tests
Akim Demaille 7c47598d4f glr2.cc: start the transition to using symbol_type
Currently glr2.cc uses three variables/struct members to denote the
symbols' kind (or state), value and location.  lalr1.cc has two types
for "complete" symbols: symbol_type and stack_symbol_type.  Let's use
that model in glr2.cc too.

For a start use yyla (a symbol_type) to denote the lookahead, instead
of the triple yytoken, yylval and yylloc.  This will make easier the
introduction of the "context" subclass, used in parse.error=custom.

It simplifies the code in several places.  For instance from:

    symbol_kind_type yytoken_current = this->yytoken;]b4_variant_if([[
    value_type yylval_current;
    ]b4_symbol_variant([this->yytoken],
                       [yylval_current], [move], [this->yylval])], [[
    value_type yylval_current = this->yylval;]])[]b4_locations_if([
    location_type yylloc_current = this->yylloc;])[

to:

    symbol_type yyla_current = std::move (this->yyla);

* data/skeletons/glr2.cc (yytoken, yylval, yylloc): Replace by...
(yyla): this.
Adjust all dependencies.
(yyloc_default): Remove, unused.
* tests/c++.at, tests/glr-regression.at, tests/types.at: C++11 is
required for glr2.cc.
Adjust to changes in glr2.cc.
2021-09-12 12:03:58 +02:00
..
2021-01-30 14:32:00 +01:00
2021-08-12 09:07:36 +02:00
2021-01-29 13:48:43 -08:00
2021-01-30 07:32:03 +01:00
2021-01-23 15:02:49 +01:00
2021-09-12 12:03:58 +02:00
2021-01-30 07:32:03 +01:00
2021-08-19 08:21:22 +02:00
2021-03-07 18:41:38 +01:00
2021-09-02 07:27:42 +02:00
2021-01-30 14:32:00 +01:00
2019-11-03 10:32:22 +01:00

AT_BISON_OPTION_PUSHDEFS/AT_BISON_OPTION_POPDEFS

These two macros must be given the (main) directives so that they define a number of other macros to:

  • what the language is (so what compiler tool chain to use, what definition of yylex/yyerror, etc.)
  • what skeleton is used

Keywords

The following keywords are used to label tests (with AT_KEYWORDS(category)). Please follow them and avoid creating synonyms.

  • action
  • api.value.type
  • c++: c++ language
  • cex: counterexamples.
  • d: d language
  • deprec: deprecated features.
  • diagnostics
  • glr
  • graph
  • html: html reports
  • java
  • lac
  • %merge
  • multistart
  • push
  • report: for automaton dumps
  • %union
  • variant
  • yacc: POSIX yacc (%yacc)

Calculator

The grammar features several special directives:

  • !! YYERROR
  • !+ YYACCEPT
  • !- YYABORT
  • !* YYNOMEM