Friday 15 May 2015

compiler construction - Is this the example of Lexical analysis error? -



compiler construction - Is this the example of Lexical analysis error? -

consider below statement.

char a=`a;

what kind of error it, lexical or syntax in case of compiler design?

it neither.

who says build not valid?

it depends solely on definitions.

for example, may have defined ` signs may occur in pairs, " describing string literals. lexical error.

otoh, ` predefined infix operator, *. syntax error, left hand side of look missing.

or ` unary operator on integers, type error, char.

compiler-construction

No comments:

Post a Comment