Monday, 5 June 2017

What is the use of yylex() function in Lex?


                  yylex() function actual starts the process of pattern matching. 
                  If we are writing standalone Lex program, then we have to call yylex() in main() function in Lex program.
                  If we are writing lex and yacc program together, there is no need to call yylex() since yyparse() in yacc program automatically calls yylex(). Thats why there in no need to call yylex() separately. 

No comments:

Post a comment