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

StackOverflow https://stackoverflow.com/questions/19866618

  •  29-07-2022
  •  | 
  •  

Frage

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.

War es hilfreich?

Lösung

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

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top