From c1709249728cb9ad7011b0d39d18ad87d4636f4b Mon Sep 17 00:00:00 2001 From: sanine Date: Mon, 22 May 2023 23:43:39 -0500 Subject: begin testing and make grammar more spec-compliant --- src/parser/parser.js | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/parser/parser.js') diff --git a/src/parser/parser.js b/src/parser/parser.js index 8672832..3434fee 100644 --- a/src/parser/parser.js +++ b/src/parser/parser.js @@ -33,19 +33,19 @@ parser.yy = { }; -//if (process.argv[1] === 'parser.js' && process.argv.length >= 3) { - fs.readFile(process.argv[2], 'utf8', (err, data) => { - if (err) throw err; - let result = parser.parse(data.toUpperCase()); - if (typeof(result.start) === "string") { - result.start = parser.yy.line[result.start]; - } - for (let pc=0; pc