[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ex & yacc, Second Edition, ch1-06
From: |
kkc |
Subject: |
ex & yacc, Second Edition, ch1-06 |
Date: |
Sat, 26 May 2007 11:57:13 -0700 (PDT) |
I'm currently working on chapter1-06, I can't get the parser to
a sentence properly. Do anyone know how to get it to work.
I'm using linux the '-ly' library don't work in yacc or gcc compiler. So
I have to use flex & bison instead.
This is the book:
http://www.oreilly.com/catalog/lex/
Please help!
Thank You!
By Kai
/*
$ flex http://www.nabble.com/file/p10818891/ch1-06.zip ch1-06.zip .l
$ bison -y -d ch1-06.y
$ cc -c lex.yy.c y.tab.c
$ cc -o ch1-06 lex.yy.o y.tab.o -lfl
$ ./ch1-06
noun kai
kai
Error message: syntax error
verb kong
kong
kong
Error message: syntax error
noun chan
chan
Error message: syntax error
kai kong chan
Error message: syntax error
Error message: syntax error
kong
$ ./ch1-06
noun kai
verb kong
noun chan
kaikongchan
kaikongchan: don't recognize
kai kong chan
Error message: syntax error
Error message: syntax error
Error message: syntax error
$ v
*/
--
View this message in context:
http://www.nabble.com/ex---yacc%2C-Second-Edition%2C-ch1-06-tf3821459.html#a10818891
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- ex & yacc, Second Edition, ch1-06,
kkc <=