Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,14 @@ jobs:
steps:
- name: Checkout (default branch)
uses: actions/checkout@v4
with:
submodules: recursive
if: ${{ github.event_name != 'schedule'}}
- name: Checkout (next branch)
uses: actions/checkout@v4
with:
ref: next
submodules: recursive
if: ${{ github.event_name == 'schedule'}}
- name: Prebuild - install node
uses: actions/setup-node@v3
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"lint": "vue-cli-service lint",
"build-lbug": "cd ladybug/tools/nodejs_api/ && npm i && cd ../.. && make nodejs NUM_THREADS=$(node -e \"console.log(require('os').cpus().length)\")",
"fetch-datasets": "node src/server/utils/FetchDatasets.js",
"generate-grammar-prod": "python3 node_modules/lbug/lbug-source/scripts/antlr4/keywordhandler.py node_modules/lbug/lbug-source/src/antlr4/Cypher.g4 node_modules/lbug/lbug-source/src/antlr4/keywords.txt ./Cypher.g4 /tmp/header.h && rm /tmp/header.h && rm -rf src/utils/CypherParser/ && npx antlr4ng-cli -o src/utils/CypherParser -Dlanguage=TypeScript -no-visitor -no-listener Cypher.g4 && rm Cypher.g4 && cd src/utils/CypherParser && mv CypherParser.ts CypherParserOld.ts && grep -v \"notify\" CypherParserOld.ts > CypherParser.ts && rm CypherParserOld.ts",
"generate-grammar-prod": "python3 ladybug/scripts/antlr4/keywordhandler.py ladybug/src/antlr4/Cypher.g4 ladybug/src/antlr4/keywords.txt ./Cypher.g4 /tmp/header.h && rm /tmp/header.h && rm -rf src/utils/CypherParser/ && npx antlr4ng-cli -o src/utils/CypherParser -Dlanguage=TypeScript -no-visitor -no-listener Cypher.g4 && rm Cypher.g4 && cd src/utils/CypherParser && mv CypherParser.ts CypherParserOld.ts && grep -v \"notify\" CypherParserOld.ts > CypherParser.ts && rm CypherParserOld.ts",
"generate-grammar": "python3 ladybug/scripts/antlr4/keywordhandler.py ladybug/src/antlr4/Cypher.g4 ladybug/src/antlr4/keywords.txt ./Cypher.g4 /tmp/header.h && rm /tmp/header.h && rm -rf src/utils/CypherParser/ && npx antlr4ng-cli -o src/utils/CypherParser -Dlanguage=TypeScript -no-visitor -no-listener Cypher.g4 && rm Cypher.g4 && cd src/utils/CypherParser && mv CypherParser.ts CypherParserOld.ts && grep -v \"notify\" CypherParserOld.ts > CypherParser.ts && rm CypherParserOld.ts",
"clean": "rm -rf node_modules dist datasets src/utils/CypherParser && git submodule deinit --all",
"eslint": "eslint --ext .js,.vue src",
Expand Down
19 changes: 15 additions & 4 deletions src/utils/CypherParser/Cypher.interp

Large diffs are not rendered by default.

361 changes: 182 additions & 179 deletions src/utils/CypherParser/Cypher.tokens
Original file line number Diff line number Diff line change
Expand Up @@ -42,145 +42,148 @@ T__40=41
T__41=42
T__42=43
T__43=44
T__44=45
ACYCLIC=46
ANY=47
ADD=48
ALL=49
ALTER=50
AND=51
AS=52
ASC=53
ASCENDING=54
ATTACH=55
BEGIN=56
BY=57
CALL=58
CASE=59
CAST=60
CHECKPOINT=61
COLUMN=62
COMMENT=63
COMMIT=64
COMMIT_SKIP_CHECKPOINT=65
CONTAINS=66
COPY=67
COUNT=68
CREATE=69
CYCLE=70
DATABASE=71
DBTYPE=72
DEFAULT=73
DELETE=74
DESC=75
DESCENDING=76
DETACH=77
DISTINCT=78
DROP=79
ELSE=80
END=81
ENDS=82
EXISTS=83
EXPLAIN=84
EXPORT=85
EXTENSION=86
FALSE=87
FROM=88
FORCE=89
GLOB=90
GRAPH=91
GROUP=92
HEADERS=93
HINT=94
IMPORT=95
IF=96
IN=97
INCREMENT=98
INSTALL=99
IS=100
JOIN=101
KEY=102
LIMIT=103
LOAD=104
LOGICAL=105
MACRO=106
MATCH=107
MAXVALUE=108
MERGE=109
MINVALUE=110
MULTI_JOIN=111
NO=112
NODE=113
NOT=114
NONE=115
NULL=116
ON=117
ONLY=118
OPTIONAL=119
OR=120
ORDER=121
PRIMARY=122
PROFILE=123
PROJECT=124
READ=125
REL=126
RENAME=127
RETURN=128
ROLLBACK=129
ROLLBACK_SKIP_CHECKPOINT=130
SEQUENCE=131
SET=132
SHORTEST=133
START=134
STARTS=135
STRUCT=136
TABLE=137
THEN=138
TO=139
TRAIL=140
TRANSACTION=141
TRUE=142
TYPE=143
UNION=144
UNWIND=145
UNINSTALL=146
UPDATE=147
USE=148
WHEN=149
WHERE=150
WITH=151
WRITE=152
WSHORTEST=153
XOR=154
SINGLE=155
YIELD=156
USER=157
DECIMAL=158
STAR=159
L_SKIP=160
INVALID_NOT_EQUAL=161
COLON=162
MINUS=163
FACTORIAL=164
StringLiteral=165
EscapedChar=166
DecimalInteger=167
HexLetter=168
HexDigit=169
Digit=170
NonZeroDigit=171
NonZeroOctDigit=172
ZeroDigit=173
ExponentDecimalReal=174
RegularDecimalReal=175
UnescapedSymbolicName=176
IdentifierStart=177
IdentifierPart=178
EscapedSymbolicName=179
SP=180
WHITESPACE=181
CypherComment=182
Unknown=183
ACYCLIC=45
ANY=46
ADD=47
ALL=48
ALTER=49
AND=50
AS=51
ASC=52
ASCENDING=53
ATTACH=54
BEGIN=55
BY=56
CALL=57
CASE=58
CAST=59
CHECKPOINT=60
COLUMN=61
COMMENT=62
COMMIT=63
COMMIT_SKIP_CHECKPOINT=64
CONTAINS=65
COPY=66
COUNT=67
CREATE=68
CYCLE=69
DATABASE=70
DBTYPE=71
DEFAULT=72
DELETE=73
DESC=74
DESCENDING=75
DETACH=76
DISTINCT=77
DROP=78
ELSE=79
END=80
ENDS=81
EXISTS=82
EXPLAIN=83
EXPORT=84
EXTENSION=85
FALSE=86
FROM=87
FORCE=88
GLOB=89
GRAPH=90
GROUP=91
HEADERS=92
HINT=93
IMPORT=94
IF=95
IN=96
INCREMENT=97
INSTALL=98
IS=99
JOIN=100
KEY=101
LIMIT=102
LOAD=103
LOGICAL=104
MACRO=105
MATCH=106
MAXVALUE=107
MERGE=108
MINVALUE=109
MULTI_JOIN=110
NO=111
NODE=112
NOT=113
NONE=114
NULL=115
ON=116
ONLY=117
OPTIONAL=118
OR=119
ORDER=120
PRIMARY=121
PROFILE=122
PROJECT=123
READ=124
REL=125
RENAME=126
RETURN=127
ROLLBACK=128
ROLLBACK_SKIP_CHECKPOINT=129
SEQUENCE=130
SET=131
SHORTEST=132
START=133
STARTS=134
STRUCT=135
TABLE=136
THEN=137
TO=138
TRAIL=139
TRANSACTION=140
TRUE=141
TYPE=142
UNION=143
UNWIND=144
UNINSTALL=145
UPDATE=146
USE=147
WHEN=148
WHERE=149
WITH=150
WRITE=151
WSHORTEST=152
XOR=153
SINGLE=154
YIELD=155
USER=156
PASSWORD=157
ROLE=158
MAP=159
DECIMAL=160
STAR=161
L_SKIP=162
INVALID_NOT_EQUAL=163
COLON=164
DOTDOT=165
MINUS=166
FACTORIAL=167
StringLiteral=168
EscapedChar=169
DecimalInteger=170
HexLetter=171
HexDigit=172
Digit=173
NonZeroDigit=174
NonZeroOctDigit=175
ZeroDigit=176
ExponentDecimalReal=177
RegularDecimalReal=178
UnescapedSymbolicName=179
IdentifierStart=180
IdentifierPart=181
EscapedSymbolicName=182
SP=183
WHITESPACE=184
CypherComment=185
Unknown=186
';'=1
'('=2
')'=3
Expand All @@ -192,43 +195,43 @@ Unknown=183
'{'=9
'}'=10
'|'=11
'..'=12
'<>'=13
'<'=14
'<='=15
'>'=16
'>='=17
'&'=18
'>>'=19
'<<'=20
'+'=21
'/'=22
'%'=23
'^'=24
'=~'=25
'$'=26
'\u27e8'=27
'\u3008'=28
'\ufe64'=29
'\uff1c'=30
'\u27e9'=31
'\u3009'=32
'\ufe65'=33
'\uff1e'=34
'\u00ad'=35
'\u2010'=36
'\u2011'=37
'\u2012'=38
'\u2013'=39
'\u2014'=40
'\u2015'=41
'\u2212'=42
'\ufe58'=43
'\ufe63'=44
'\uff0d'=45
'*'=159
'!='=161
':'=162
'-'=163
'!'=164
'0'=173
'<>'=12
'<'=13
'<='=14
'>'=15
'>='=16
'&'=17
'>>'=18
'<<'=19
'+'=20
'/'=21
'%'=22
'^'=23
'=~'=24
'$'=25
'\u27e8'=26
'\u3008'=27
'\ufe64'=28
'\uff1c'=29
'\u27e9'=30
'\u3009'=31
'\ufe65'=32
'\uff1e'=33
'\u00ad'=34
'\u2010'=35
'\u2011'=36
'\u2012'=37
'\u2013'=38
'\u2014'=39
'\u2015'=40
'\u2212'=41
'\ufe58'=42
'\ufe63'=43
'\uff0d'=44
'*'=161
'!='=163
':'=164
'..'=165
'-'=166
'!'=167
'0'=176
Loading
Loading