diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2025-05-15 23:20:23 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2025-05-15 23:20:23 -0700 |
commit | c1c1b6ae1b89d4ebbc79c234af8a5d31770516ae (patch) | |
tree | 484834a6f1a255e045940f246e802db50273e019 | |
parent | ef753a4410b575e7411d4dceb574a986f175ab60 (diff) | |
download | txr-c1c1b6ae1b89d4ebbc79c234af8a5d31770516ae.tar.gz txr-c1c1b6ae1b89d4ebbc79c234af8a5d31770516ae.tar.bz2 txr-c1c1b6ae1b89d4ebbc79c234af8a5d31770516ae.zip |
parser: distinguish lambda dot token.
* parser.y (yybadtoken): Map the LAMBDOT token code
to the name "lambda dot" to distinguish it from
CONSDOT in error situations.
* txr.1: Change the Consing Dot section to Lambda Dot.
* y.tab.c.shipped: Regenerated.
-rw-r--r-- | parser.y | 4 | ||||
-rw-r--r-- | txr.1 | 10 | ||||
-rw-r--r-- | y.tab.c.shipped | 4 |
3 files changed, 11 insertions, 7 deletions
@@ -2157,8 +2157,8 @@ void yybadtoken(parser_t *parser, int tok, val context) case LITCHAR: problem = lit("string literal character"); break; case SPLICE: problem = lit("*"); break; case JSPLICE: problem = lit("~*"); break; - case CONSDOT: - case LAMBDOT: problem = lit("consing dot"); break; + case CONSDOT: problem = lit("consing dot"); break; + case LAMBDOT: problem = lit("lambda dot"); break; case DOTDOT: problem = lit(".."); break; case OLD_DOTDOT: problem = lit(".."); break; case UREFDOT: problem = lit("referencing dot"); break; @@ -12253,11 +12253,12 @@ even though the unprefixed character sequence .code 1.E3 is otherwise a floating-point constant. -.NP* Consing Dot +.NP* Lambda Dot Unlike other major Lisp dialects, \*(TL allows a consing dot with no forms -preceding it. This construct simply denotes the form which follows the dot. -That is to say, the parser implements the following transformation: +preceding it. This construct simply denotes the form which follows the dot, +and is called the Lambda Dot. That is to say, the parser implements the +following transformation: .verb (. expr) -> expr @@ -12295,6 +12296,9 @@ or an atom as .codn "(. sym)" . +Note: it is due to its use in parameter lists that it is given the name +Lambda Dot. + This notation is implemented for the square brackets, according to this transformation: diff --git a/y.tab.c.shipped b/y.tab.c.shipped index b4185de4..61904671 100644 --- a/y.tab.c.shipped +++ b/y.tab.c.shipped @@ -7877,8 +7877,8 @@ void yybadtoken(parser_t *parser, int tok, val context) case LITCHAR: problem = lit("string literal character"); break; case SPLICE: problem = lit("*"); break; case JSPLICE: problem = lit("~*"); break; - case CONSDOT: - case LAMBDOT: problem = lit("consing dot"); break; + case CONSDOT: problem = lit("consing dot"); break; + case LAMBDOT: problem = lit("lambda dot"); break; case DOTDOT: problem = lit(".."); break; case OLD_DOTDOT: problem = lit(".."); break; case UREFDOT: problem = lit("referencing dot"); break; |