Then will it be a lexical error stating Its not a valid keyword
No.
or will it be accepted as Identifier(variable)
Yes, and then there will be a syntax error from the parser.
as lexical analyzer do not consider whether the syntax is right or not ?
The lexical analyser doesn't know anything about syntax. That's the parser's job.