branch: externals/parser-generator commit 1b9d8db4da2ebc229f588de922d5f1f47876f92c Author: Christian Johansson <christ...@cvj.se> Commit: Christian Johansson <christ...@cvj.se>
Improved wording about lexical analysis --- docs/Lexical-Analysis.md | 4 +--- test/parser-generator-lex-analyzer-test.el | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/docs/Lexical-Analysis.md b/docs/Lexical-Analysis.md index 44cf484..27d0722 100644 --- a/docs/Lexical-Analysis.md +++ b/docs/Lexical-Analysis.md @@ -4,7 +4,7 @@ Set lexical analysis function by setting variable `parser-generator-lex-analyzer ## Token -A token is defined as a list with 3 elements, first is a string or symbol, second is the start index of token in stream and third is the end index of token in stream, second and third element have a dot between them, this structure is to be compatible with Emacs Semantic system. Example token +A token is defined as a list with 3 elements, first is a string or symbol, second is the start index of token in stream and third is the end index of token in stream, second and third element have a dot between them, this structure is to be compatible with Emacs Semantic system. Example token: ``` emacs-lisp '("a" 1 . 2) @@ -34,7 +34,6 @@ Returns the look-ahead number of next terminals in stream, if end of stream is r (parser-generator-lex-analyzer--reset) (setq parser-generator--look-ahead-number 1) -(setq parser-generator--look-ahead-number 1) (should (equal '(("a" 1 . 2)) @@ -75,7 +74,6 @@ Returns the next token in stream and moves the lexical analyzer index one point (parser-generator-lex-analyzer--reset) (setq parser-generator--look-ahead-number 1) - (should (equal '(("a" 1 . 2)) diff --git a/test/parser-generator-lex-analyzer-test.el b/test/parser-generator-lex-analyzer-test.el index ea93b8f..4e2134f 100644 --- a/test/parser-generator-lex-analyzer-test.el +++ b/test/parser-generator-lex-analyzer-test.el @@ -113,6 +113,7 @@ (message "Passed failing lex analysis 2") + (parser-generator-lex-analyzer--reset) (setq parser-generator--look-ahead-number 1) (should