Commit 4ba800d
committed
refactor: restructure token handling with NonReservedWord() sentinels
Replace the manual updateKeywords task and hardcoded keyword whitelist
with a NonReservedWord() BNF production bracketed by MIN/MAX sentinel
tokens. Non-reserved keywords are now determined by O(1) range check
in isIdentifierAhead() instead of enumerating them in
RelObjectNameWithoutValue().
- Refactor ParserKeywordsUtils: derive keywords dynamically from
CCJSqlParserConstants + grammar file, remove hardcoded
ALL_RESERVED_KEYWORDS array and RESTRICTED_* flags
- Consolidate ConditionalKeywordsTest into KeywordsTest
- Simplify updateKeywords Gradle task (generates RST doc only)
- Update contribution.rst and usage.rst documentation
- allow nested comments
Fixes #1175
Signed-off-by: Andreas Reichel <andreas@manticore-projects.com>
Signed-off-by: manticore-projects <andreas@manticore-projects.com>1 parent 08d0bcc commit 4ba800d
File tree
17 files changed
+980
-983
lines changed- .github/workflows
- src
- main
- java/net/sf/jsqlparser
- expression
- parser
- jjtree/net/sf/jsqlparser/parser
- site/sphinx
- test
- java/net/sf/jsqlparser
- expression
- parser
- statement
- insert
- select
- resources/net/sf/jsqlparser/statement/select/oracle-tests
17 files changed
+980
-983
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
539 | 539 | | |
540 | 540 | | |
541 | 541 | | |
542 | | - | |
| 542 | + | |
543 | 543 | | |
544 | 544 | | |
545 | 545 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
Lines changed: 159 additions & 399 deletions
Large diffs are not rendered by default.
Lines changed: 395 additions & 124 deletions
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | | - | |
| 105 | + | |
104 | 106 | | |
105 | | - | |
106 | | - | |
107 | | - | |
| 107 | + | |
| 108 | + | |
108 | 109 | | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | | - | |
119 | | - | |
120 | | - | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
135 | | - | |
136 | | - | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 116 | + | |
141 | 117 | | |
142 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
143 | 121 | | |
144 | 122 | | |
145 | 123 | | |
| |||
196 | 174 | | |
197 | 175 | | |
198 | 176 | | |
199 | | - | |
| 177 | + | |
0 commit comments