[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/phps-mode ec18c1e 22/96: Using parser to be able to imp
From: |
Christian Johansson |
Subject: |
[elpa] externals/phps-mode ec18c1e 22/96: Using parser to be able to implement incremental parser |
Date: |
Fri, 29 Oct 2021 11:14:36 -0400 (EDT) |
branch: externals/phps-mode
commit ec18c1ec226117be2611e1bd70a402552d1a843d
Author: Christian Johansson <christian@cvj.se>
Commit: Christian Johansson <christian@cvj.se>
Using parser to be able to implement incremental parser
---
phps-mode-lex-analyzer.el | 15 ++++++++-------
test/phps-mode-test-lex-analyzer.el | 10 +++++-----
2 files changed, 13 insertions(+), 12 deletions(-)
diff --git a/phps-mode-lex-analyzer.el b/phps-mode-lex-analyzer.el
index 918c147..e83cadd 100644
--- a/phps-mode-lex-analyzer.el
+++ b/phps-mode-lex-analyzer.el
@@ -410,7 +410,7 @@
(progn
(setq
after-parser-parse
- (phps-mode-parser-parse))
+ (phps-mode-parser--parse))
(setq got-error nil))
(when got-error
(kill-buffer)))
@@ -424,12 +424,13 @@
(after-lexer-heredoc-label-stack
phps-mode-lexer--heredoc-label-stack))
(kill-buffer)
(list
- after-lexer-tokens
- after-lexer-states
- after-lexer-state
- after-lexer-state-stack
- after-lexer-heredoc-label
- after-lexer-heredoc-label-stack
+ (list
+ after-lexer-tokens
+ after-lexer-states
+ after-lexer-state
+ after-lexer-state-stack
+ after-lexer-heredoc-label
+ after-lexer-heredoc-label-stack)
after-parser-parse)))))))
(defun phps-mode-lex-analyzer--re2c-run (&optional force-synchronous)
diff --git a/test/phps-mode-test-lex-analyzer.el
b/test/phps-mode-test-lex-analyzer.el
index a1c9c5b..e673430 100644
--- a/test/phps-mode-test-lex-analyzer.el
+++ b/test/phps-mode-test-lex-analyzer.el
@@ -1611,14 +1611,14 @@
)
-(defun phps-mode-test-lex-analyzer--parse ()
+(defun phps-mode-test-lex-analyzer--parse-string ()
"Test the parser."
(should
(equal
- '(((T_OPEN_TAG 1 . 7) (T_ECHO 7 . 11) (T_CONSTANT_ENCAPSED_STRING 12 . 17)
(";" 17 . 18)) ((17 18 ST_IN_SCRIPTING nil nil nil nil) (12 17 ST_IN_SCRIPTING
nil nil nil nil) (7 11 ST_IN_SCRIPTING nil nil nil nil) (1 7 ST_IN_SCRIPTING
nil nil nil nil)) ST_IN_SCRIPTING nil nil nil (80 459 466 411 333 332 154 102
79))
- (phps-mode-lex-analyzer--parse-string
- "<?php echo 'abc';")))
+ '(80 459 466 411 333 332 154 102 79)
+ (car (car (cdr (phps-mode-lex-analyzer--parse-string
+ "<?php echo 'abc';"))))))
(message "Passed valid parse test")
(should-error
@@ -1648,7 +1648,7 @@
(phps-mode-test-lex-analyzer--get-moved-imenu)
(phps-mode-test-lex-analyzer--comment-uncomment-region)
(phps-mode-test-lex-analyzer--move-lines-indent)
- (phps-mode-test-lex-analyzer--parse))
+ (phps-mode-test-lex-analyzer--parse-string))
(phps-mode-test-lex-analyzer)
- [elpa] externals/phps-mode 3f5c008 09/96: Optimization for lexer to only need to execute once per index, (continued)
- [elpa] externals/phps-mode 3f5c008 09/96: Optimization for lexer to only need to execute once per index, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 2b167f3 08/96: Fixes for parsing start and end, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 376e690 15/96: Verified parse, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 2a9fb96 16/96: Added more tests for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 5c7c6f4 14/96: Parser passes basic lexing test, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 569505e 17/96: Added parser header and fixed byte-compilation for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 0d1843f 20/96: Started on parser integration, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode b714471 21/96: Added parse function in lex-analyzer and a test for it, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 50a014a 18/96: Using same lexer buffer for parser as the lex-analyzer is using, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode fb9905f 19/96: Added basic translation test, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode ec18c1e 22/96: Using parser to be able to implement incremental parser,
Christian Johansson <=
- [elpa] externals/phps-mode 1ee3094 28/96: More refactoring of the parsers lex-analyzer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 2ceb6e5 23/96: Added potential support for incremental parsing, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode e59d30e 26/96: Improvements in lex-analyzer for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c62ec64 27/96: Started refactor of parsers lex-analyzer, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 9acda54 33/96: Added more passing tests for parser, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode c470e37 38/96: More work on grammar parser generator, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 6b9c1a4 40/96: More pasing of grammar, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 3fa1b13 41/96: Translation of productions now working, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode b0ad204 44/96: Improved YACC grammar parser for productions, Christian Johansson, 2021/10/29
- [elpa] externals/phps-mode 3824d7d 46/96: More work on automatically parsing YACC grammar, Christian Johansson, 2021/10/29