Re: [PATCH for Dlang support] d: support api.symbol.prefix and api.token.prefix

Akim Demaille <[email protected]>
Newsgroups gmane.comp.parsers.bison.patches
Message-ID <[email protected]>

> Le 28 sept. 2020 à 14:30, Adela Vais <[email protected]> a écrit :
> 
> The D skeleton was not properly supporting them.
> 
> * data/skeletons/d.m4, data/skeletons/lalr1.d: Fix it.
> * tests/calc.at: Check it.

This commit also made me realize we were using CALC_EOF uselessly in D, EOF is fine.

commit a7daa63cb79446a62c99de2d9d9f83cac69528d1
Author: Akim Demaille <[email protected]>
Date:   Mon Sep 28 19:41:32 2020 +0200

    tests: remove useless prefix for EOF in D
    
    * tests/calc.at (CALC_EOF): Rename as...
    (EOF): this.
    Since there is no risk of a clash with #define EOF here...

diff --git a/TODO b/TODO
index 8d6de590..72af014b 100644
--- a/TODO
+++ b/TODO
@@ -256,6 +256,9 @@ are.  Keep the same variable names.  If you change the wording in one place,
 do it in the others too.  In other words: make sure to keep the
 maintenance *simple* by avoiding any gratuitous difference.
 
+** CI
+Check when gdc and ldc.
+
 ** Documentation
 Write documentation about D support in doc/bison.texi.  Imitate the Java
 documentation.  You should be more succinct IMHO.
diff --git a/tests/calc.at b/tests/calc.at
index ec8723c9..a96fc98a 100644
--- a/tests/calc.at
+++ b/tests/calc.at
@@ -606,7 +606,7 @@ class CalcLexer(R) : Lexer
 
     // EOF.
     if (input.empty)
-      return TokenKind.]AT_TOKEN_PREFIX[CALC_EOF;
+      return TokenKind.]AT_TOKEN_PREFIX[EOF;
 
     // Numbers.
     if (input.front.isNumber)
@@ -666,7 +666,7 @@ m4_define([_AT_DATA_CALC_Y(d)],
 %printer { fprintf (yyo, "%d", $$); } <ival>;
 
 /* Bison Declarations */
-%token CALC_EOF 0 ]AT_TOKEN_TRANSLATE_IF([_("end of input")], ["end of input"])[
+%token EOF 0 ]AT_TOKEN_TRANSLATE_IF([_("end of input")], ["end of input"])[
 %token <ival> NUM   "number"
 %type  <ival> exp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.