[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/parser-generator c992a54 093/434: Added info in README.

From: ELPA Syncer
Subject: [elpa] externals/parser-generator c992a54 093/434: Added info in README.md about LR-items
Date: Mon, 29 Nov 2021 15:59:16 -0500 (EST)

branch: externals/parser-generator
commit c992a542639a50d2f34b625afe5a0f97ff6ff327
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>

    Added info in README.md about LR-items
 README.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/README.md b/README.md
index aa3667c..66e088d 100644
--- a/README.md
+++ b/README.md
@@ -25,6 +25,23 @@ We use push down transducer (PDT) based algorithms:
 #### Deterministic Shift-Reduce Parsing
 #### LR(k)
 #### Deterministic Right Parser for LR(k) Grammars
+A valid LR-item for a viable prefix has this structure:
+``` emacs-lisp
+(A B C L)
+Example with grammar with production: S -> SaSb and S is non-terminal and a, b 
are terminals. Look-ahead number: 1
+``` emacs-lisp
+(S nil (S a S b) (a))
+* A is the production LHS
+* B, C is parts of the production RHS, if the dot is the left B is nil and C 
is the entire RHS. If the dot is at the right then B is the production RHS and 
C is nil, otherwise B and C contains parts of the RHS
+* L is the terminal look-ahead
 #### Formal Shift-Reduce Parsing Algorithms
 #### Simple Precedence Grammars
 #### Extended Precedence Grammars

reply via email to

[Prev in Thread] Current Thread [Next in Thread]