Added file name + line number to symbols and use it for reasonable error handling now, added a version number to the compiled grammer

This commit is contained in:
Nathan Braswell
2016-04-05 03:14:56 -04:00
parent 0e9fff705b
commit 38ec4abc01
7 changed files with 111 additions and 54 deletions

View File

@@ -75,6 +75,8 @@ obj parser (Object) {
for (current_symbol = lex.next(); current_symbol != eof_symbol() && current_symbol != invalid_symbol(); current_symbol = lex.next();) {
/*println("current_symbol is ")*/
/*println(current_symbol.to_string())*/
if (current_symbol != eof_symbol() && current_symbol != invalid_symbol())
current_symbol.source = name
input.addEnd(current_symbol)
}
input.addEnd(current_symbol)