cvignal / 42sh

[42 project] Last project of the Unix branch
3 stars 2 forks source link

Syntax checker #20

Closed MarinPostma closed 5 years ago

MarinPostma commented 5 years ago

Due to many issues with syntax checking in various part, I suggest that a syntax check occurs between lexing and parsing phases. It will use a simple automaton to determine if the syntax is correct and if more input is needed.

This will make things easier for later as the parser will now receive only syntactically correct + as a bonus feature we will be easily able to provide accurate error messages.