Last active
November 9, 2016 08:06
-
-
Save Fcmam5/e004493934400f8ac40f662ff24a8256 to your computer and use it in GitHub Desktop.
Compilation L3 analyseur syntaxique
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
%{ | |
#include <stdio.h> | |
%} | |
chiffre [0-9] | |
lettre [a-z]|[A-Z] | |
%% | |
{lettre}({chiffre}|{lettre})* {printf("Identifiant reconnu: %s de longuer %d\n", yytext, yyleng);} | |
({chiffre})+ {printf("Nombre reconnu:");ECHO;printf("\n");} | |
[^a-z]|[^A-Z]|[^0-9] | |
%% | |
int main(){ | |
yylex(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment