Hi all,
I am trying to learn Lex-Yacc and trying to write a small C-Parser that parses the line #include<stdio.h>.
For this i have written the grammer as
sentence : hash include openbrace stdio closed brace
The above grammer works fine if i give the input #include<stdio.h>
The problem is if i give only "#" as input i doesnt give any syntax error. But, if i enter the same "#" then it says syntax error. Can someone tell me why it is not giving the syntax error first time only ?!!!
thanks in advance
Vikram