Question

I looked over the internet for the lexical errors for Pascal programming language and there still this case which I don't know whether it's lexical error or semantic.

does the case two symbols (operators) after each other count as a lexical error or as a semantic error ?

example: "+-", "<>", ";;" or something like that.

thanks in advance.

Was it helpful?

Solution

I would say it is part of the parsing process, semantic check comes only after that. (if you assume the basic sequence lexing,parsing,semantic check).

Btw, <> is a valid operation oin Pascal. (not equal).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top