[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/parser-generator f5a5801 421/434: Clarified lex-analyze
From: |
ELPA Syncer |
Subject: |
[elpa] externals/parser-generator f5a5801 421/434: Clarified lex-analyzer exporting necessities |
Date: |
Mon, 29 Nov 2021 16:00:29 -0500 (EST) |
branch: externals/parser-generator
commit f5a5801dd08edf8b5f4e536531af0db0586d75ba
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Clarified lex-analyzer exporting necessities
---
docs/Lexical-Analysis.md | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/docs/Lexical-Analysis.md b/docs/Lexical-Analysis.md
index 27d0722..00b617c 100644
--- a/docs/Lexical-Analysis.md
+++ b/docs/Lexical-Analysis.md
@@ -2,6 +2,10 @@
Set lexical analysis function by setting variable
`parser-generator-lex-analyzer--function`. Optionally set reset function by
setting variable `parser-generator-lex-analyzer--reset-function`. The lexical
analysis is indexed on variable `parser-generator-lex-analyzer--index`. All
parsers expect a list of tokens as response from lexical-analysis.
+If you detect that the pointer needs to move, set flag
`parser-generator-lex-analyzer--move-to-index-flag` to non-nil to move
lex-analyzer position.
+
+To enable exporting the functions need to be specified in a way that the
entire body is within the same block, do that using `(let)` or `(progn)` for
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:
@@ -54,7 +58,7 @@ Returns the look-ahead number of next terminals in stream, if
end of stream is r
## Pop token
-Returns the next token in stream and moves the lexical analyzer index one
point forward. If end of stream is reached return nil. The result is expected
to be a list containing each token popped.
+Returns the next token in stream and moves the lexical analyzer index one
point forwa<rd. If end of stream is reached return nil. The result is expected
to be a list containing each token popped.
``` emacs-lisp
(require 'ert)
- [elpa] externals/parser-generator b8de1c4 414/434: LR-exporter now supports optional header, (continued)
- [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
- [elpa] externals/parser-generator 827aa5c 433/434: Another bug for same thing, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator ee78a6c 430/434: LR-parser now passes terminal data to SDT for non-terminals containing only one symbol, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 3657a68 427/434: Merge branch 'master' of git.cvj.se:/home/git/emacs-parser-generator, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 2481361 425/434: Improved readme, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator e59baa8 416/434: Added move feature of lex-analyzer into exported LR lex-analyzer, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 29568c3 428/434: Added support for copyright text in exported LR-parser, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 4a3a51d 434/434: Added FSF copyright headers, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 24f3fb9 419/434: Lex-analyzer peek look-ahead does not affect global state, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator f5a5801 421/434: Clarified lex-analyzer exporting necessities,
ELPA Syncer <=
- [elpa] externals/parser-generator 9a3240b 314/434: Fixed bug with error throwing on false lr item sets, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 5f13406 319/434: More work on supporting LR-grammar with precedence attributes, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 989e79e 331/434: More debugging, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 8092c58 334/434: Added global declaration to unit test, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 778b96f 335/434: More work on global precedence declaration, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 0523eeb 336/434: More work on global precedence, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 0aed7b0 339/434: More work on global precedence in LR(k) parser, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator b84ed5e 342/434: Fixed issue with infix calculator translation test, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator f449039 346/434: More debugging, ELPA Syncer, 2021/11/29
- [elpa] externals/parser-generator 34f95b3 351/434: More debugging infix calculator, ELPA Syncer, 2021/11/29