[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/parser-generator a18a23d 172/434: Updated info about SD
From: |
ELPA Syncer |
Subject: |
[elpa] externals/parser-generator a18a23d 172/434: Updated info about SDT and SA |
Date: |
Mon, 29 Nov 2021 15:59:34 -0500 (EST) |
branch: externals/parser-generator
commit a18a23df4f51c083ff6628baee7ab3c06badcedc
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Updated info about SDT and SA
---
docs/Syntax-Analysis.md | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/docs/Syntax-Analysis.md b/docs/Syntax-Analysis.md
index fc1b0f1a..f609665 100644
--- a/docs/Syntax-Analysis.md
+++ b/docs/Syntax-Analysis.md
@@ -78,11 +78,23 @@ Is a simple integer above zero. You set it like this:
`(parser-generator-set-loo
### Syntax-directed-translation (SDT)
-*WIP* Where should this be defined?
+A optional translation is defined as a lambda function as the last element of
a production right-hand-side, example:
+
+```
+(parser-generator-set-grammar '((Sp S) ("a" "b") ((Sp S) (S (S "a" S "b"
(lambda(args) (nreverse args)))) (S e)) Sp))
+```
+
+You cannot have a SDT+SA on the same production right-hand side, just one or
the other.
### Semantic-actions (SA)
-*WIP* Where should this be defined?
+A optional semantic-action is defined as a lambda function as the last element
of a production right-hand-side, example:
+
+```
+(parser-generator-set-grammar '((Sp S) ("a" "b") ((Sp S) (S (S "a" S "b"
(lambda(args) (nreverse args)))) (S e)) Sp))
+```
+
+You cannot have a SDT+SA on the same production right-hand side, just one or
the other.
## Functions
- [elpa] externals/parser-generator d14d427 140/434: Moved more about lex-analysis to separate document, (continued)
- [elpa] externals/parser-generator d14d427 140/434: Moved more about lex-analysis to separate document, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 1613e89 146/434: Added lex-analyzer get function, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 5c8a7a5 147/434: Preparations for SDT support, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 0e54a88 148/434: Optimized away one global variable, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 60e9c8a 153/434: Preparations for translation-support in LR-parser, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 7ba32ff 154/434: Only save translation if it produces anything, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator f621e77 161/434: Preparations for testing incremental parse, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 944819d 163/434: More debugging incremental parsing, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 668e738 164/434: More work on tests for incremental parse, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator ac7a9ab 168/434: Added TODO items, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator a18a23d 172/434: Updated info about SDT and SA,
ELPA Syncer <=
- [elpa] externals/parser-generator d6afd0b 180/434: Added TODO items, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator bbcb22f 182/434: Optimized memory usage for f-sets, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator e2f4347 183/434: More work on f-set generation with e-identifiers, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 046e239 187/434: Passing first 3 complex tests for first, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 4811521 185/434: Various tweakings, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 7b6c1dc 186/434: First function passing first complex grammar test, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 7e96f9d 188/434: Passing all unit tests for first function, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 7a90a75 190/434: Updated max interation count, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 796b41b 192/434: Passed unit tests for follow function, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 33634dd 193/434: Passing all tests after refactor, ELPA Syncer, 2021/11/29