[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/parser-generator 72796d0 408/434: Fixed bug with FIRST
From: |
ELPA Syncer |
Subject: |
[elpa] externals/parser-generator 72796d0 408/434: Fixed bug with FIRST calculation with multiple symbols and e-identifiers |
Date: |
Mon, 29 Nov 2021 16:00:26 -0500 (EST) |
branch: externals/parser-generator
commit 72796d0942812aa6272f4d5d4c0415bae1b404b1
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Fixed bug with FIRST calculation with multiple symbols and e-identifiers
---
parser-generator.el | 16 +++++++++++++++-
1 file changed, 15 insertions(+), 1 deletion(-)
diff --git a/parser-generator.el b/parser-generator.el
index 317cc72..37cd085 100644
--- a/parser-generator.el
+++ b/parser-generator.el
@@ -17,7 +17,7 @@
(defvar
parser-generator--debug
- nil
+ t
"Whether to print debug messages or not.")
(defvar
@@ -1690,12 +1690,26 @@
(cond
((parser-generator--valid-e-p symbol)
+
+ ;; When there a symbols left on stack, make
alternative trail by skipping this symbol
+ (unless (or
+ disallow-e-first
+ (= input-tape-index (1- input-tape-length)))
+ (parser-generator--debug
+ (message
+ "Pushed alternative trail to stack since symbol is
e-identifier: %s"
+ `(,(1+ input-tape-index) ,first-length ,first)))
+ (push
+ `(,(1+ input-tape-index) ,first-length ,first)
+ stack))
+
(if disallow-e-first
(when (> first-length 0)
(setq first (append first (list symbol)))
(setq first-length (1+ first-length)))
(setq first (append first (list symbol)))
(setq first-length (1+ first-length)))
+
(setq keep-looking nil))
((parser-generator--valid-eof-p symbol)
- [elpa] externals/parser-generator 2592481 361/434: Added TODO notes, (continued)
- [elpa] externals/parser-generator 2592481 361/434: Added TODO notes, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 18b2f7b 365/434: Added context-sensitive precedence to infix example, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 3170e8d 370/434: Context-sensitive precedence now avoids conflict-detection, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 1be5fda 374/434: More work on support for conflict resolution, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 8e462cf 378/434: Validated generated action and goto-tables after precedence modification, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 6a7343e 383/434: Started on refactoring precedence table generation, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 8013f69 384/434: Unit tests for testing precedence table generation now passes, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator e070522 396/434: Fixed broken link in documentation, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 5b95baf 401/434: More work on last feature, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 4da88bf 406/434: Added another test for e-identifier in middle of rule, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 72796d0 408/434: Fixed bug with FIRST calculation with multiple symbols and e-identifiers,
ELPA Syncer <=
- [elpa] externals/parser-generator 843bc57 398/434: Fixed invalid reference to parser-generator to fetch translation by production number, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 7eb8cab 397/434: Small fixes to documentation about syntax analysis, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 3a178ed 393/434: Exported LR parser now passes all tests, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator c606043 389/434: Passing all tests with new precedence generation, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator cfa9561 407/434: Added TODO item, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 21fef5c 388/434: Passing all tests for infix calculator, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 4fe014a 394/434: Updating documentation regarding operator precedence, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator aafb3cc 411/434: Passing test for grammar containing e-identifier in middle or a rule, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator b8de1c4 414/434: LR-exporter now supports optional header, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator e157091 413/434: Fixed error signaling in invalid LR-parser and generated LR-parser, ELPA Syncer, 2021/11/29