Opened 17 years ago

Closed 16 years ago

#96 closed defect (fixed)

parser should quit when syntax error encountered

Reported by: Stephen Siegel Owned by: ywei
Priority: major Milestone:
Component: front Version: 1.0
Keywords: parse, syntax error Cc:

Description

The parser does not always give up when it encounters a syntax error. Instead it tries to build a tree anyway and proceed the best it can. It should always throw an exception with a nice description to the user when it cannot parse a file correctly. Someone should look at the ANTLR book to figure this out.

Change History (2)

comment:1 by ywei, 16 years ago

Owner: set to ywei
Status: newaccepted

comment:2 by ywei, 16 years ago

Resolution: fixed
Status: acceptedclosed

Fixed. The parser now returns an AST only when the program can be parsed correctly, i.e, when there is no syntax errors begin thrown by ANTLR. Otherwise it will print an error message along with the syntax errors and shut down the program.

Note: See TracTickets for help on using tickets.