lex and yacc

Asked by safwaan

how to compile a lex and yacc program

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gnome-terminal Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Chetan (chetan.halappa) said :
#1

FOR LEX
create file using vi editor and save it with extension .l -example:file.l
and then run this

lex file.l
cc lex.yy.c -ll
./a.out

and for lex and yacc

lex.file1.l
yacc -d file2.y
cc lex.yy.c y.tab.c -ll
./a.out

Can you help with this problem?

Provide an answer of your own, or ask safwaan for more information if necessary.

To post a message you must log in.