Skip to content

Commit

Permalink
Updates grammar and semantic analysis
Browse files Browse the repository at this point in the history
  • Loading branch information
ncordon committed Dec 3, 2024
1 parent 532ff90 commit 0228b95
Show file tree
Hide file tree
Showing 5 changed files with 206,840 additions and 279,231 deletions.
34 changes: 3 additions & 31 deletions modify-semantic-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,38 +20,10 @@ fs.readFile(file, 'utf8', function (err, data) {
);

result = result.replace(
` cnsa_Main_$callClinit();
var$1 = var$1.data;
cnsa_Main_updateSignatureResolver(null);
cnsa_Main_analyzeQuery(var$1[0]);
cnsa_Main_updateSignatureResolver(null);
cnsa_Main_analyzeQuery(var$1[0]);`,
` cnsa_Main_$callClinit();`,
);

result = result.replace(
` cnsa_Main_$callClinit();
var$1 = var$1.data;
cnsa_Main_updateSignatureResolver(null);
cnsa_Main_analyzeQuery(var$1[0]);
cnsa_Main_updateSignatureResolver(null);
cnsa_Main_analyzeQuery(var$1[0]);`,
` cnsa_Main_$callClinit();`,
);

result = result.replace(
`$rt_exports.main = $rt_export_main;`,
`export { $rt_export_main as main };`,
`
$rt_exports.main = $rt_export_main;
// Initialize everything
$rt_exports.main([]);
// Export the signature registry updater
$rt_exports.updateSignatureResolver = cnsa_Main_updateSignatureResolver;
// Export the analyze function as well
$rt_exports.semanticAnalysis = $rt_mainStarter(($args) => cnsa_Main_analyzeQuery($args.data[0]));`,
let semanticAnalysis = $rt_mainStarter(($args) => cnsa_Main_analyzeQuery($args.data[0]));
export { cnsa_Main_updateSignatureResolver as updateSignatureResolver, semanticAnalysis };`,
);
fs.writeFile(file, result, 'utf8', function (err) {
if (err) return console.log(err);
Expand Down
6 changes: 3 additions & 3 deletions packages/language-support/src/antlr-grammar/Cypher5Lexer.g4
Original file line number Diff line number Diff line change
Expand Up @@ -1295,15 +1295,15 @@ IDENTIFIER
;
ARROW_LINE
: [\-\u00AD\u2010\u2011\u2012\u2013\u2014\u2015\ufe58\ufe63\uff0d]
: [\-\u00AD‐‑‒–—―﹘﹣-]
;
ARROW_LEFT_HEAD
: [\u27e8\u3008\ufe64\uff1c\u003c]
: [⟨〈﹤<]
;
ARROW_RIGHT_HEAD
: [\u27e9\u3009\ufe65\uff1e]
: [⟩〉﹥>]
;
fragment LETTER
Expand Down
Loading

0 comments on commit 0228b95

Please sign in to comment.