Search code examples
pascallexical

lexical errors, does the case Two sequential Symbols count as a lexical error?


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.


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).