Created
May 23, 2014 10:05
-
-
Save nachivpn/e8177641f819e6b1eee9 to your computer and use it in GitHub Desktop.
Usage of yylex() in a LEX program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Declarations */ | |
%% | |
{number} {return atoi(yytext);} | |
%% | |
int main() | |
{ | |
int num = yylex(); | |
printf("Found: %d",num); | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment