Parser Module

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Parser Module

Koen_Be3840
Does the parser module only deals with code lines that are correct or should it also detect incorrect lines and than issue a warning?

Or do we create a different one?

Typo's

/* commentcomment
comment

or

/**
* comment

*comment
*/

or

((LOOP)

or

D,JGT

or

@0PEN

Koen
Reply | Threaded
Open this post in threaded view
|

Re: Parser Module

cadet1620
Administrator
The supplied test files only use // comments and don't have any syntax errors.

You will want to handle /* */ comments in your compiler, so you might want to learn how to handle them now, but you don't have to.

The easiest way to handle errors is to keep an input line counter and just write a "syntax error on line #" message and halt.

--Mark