Add README.md

parent 9179f0d8
Exemple tiré du cours de Compilation 2.
```
$ git clone https://git.p-fb.net/pef/lex_et_yacc.git
$ cd lex_et_yacc
$ make
bison -d syntaxique.y
syntaxique.y: warning: 10 shift/reduce conflicts [-Wconflicts-sr]
mv syntaxique.tab.c syntaxique.c
mv syntaxique.tab.h syntaxique.h
gcc -c syntaxique.c
syntaxique.tab.c: In function ‘yyparse’:
syntaxique.tab.c:1156:16: warning: implicit declaration of function ‘yylex’ [-Wimplicit-function-declaration]
syntaxique.tab.c:1338:7: warning: implicit declaration of function ‘yyerror’; did you mean ‘yyerrok’? [-Wimplicit-function-declaration]
flex lexical.l
mv lex.yy.c lexical.c
gcc -c lexical.c
gcc -o mon_analyseur syntaxique.o lexical.o -lfl -lm
rm lexical.c syntaxique.c
$ ./mon_analyseur pef@cube
42 + 42
Resultat:84.000000
```
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment