#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12

    Lex and yacc? (or flex and bison)


    Hey all,

    I'm really annoyed with lex and yacc. I'm attempting to do lex and yacc stuff, but I can't even compile it!

    I don't understand how to compile it, as documentation says "go to directory and type build". bah, thanks, now roughly translated, how do you do that on Windows? :D

    Anyway, if anybody's done it before, I'd appreciate help.

    Thanks!

    Regards,
    Someonewhois
  2. #2
  3. Contributing User
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2003
    Location
    USA
    Posts
    7,161
    Rep Power
    2222
    Here is what the O'Reilly "Lex and Yacc" says on page 21:
    We called our various lexers ch1-N.l, where N corresponded to a particular lex specification example. Similarly, we called our parsers ch1-M.y, where M is the number of an example. Then, to build the output, we did the following in UNIX:


    % lex ch1-n.l
    % yacc -d ch1-m.y
    % cc -c lex.yy.c y.tab.c
    % cc -o example-m.n lex.yy.o y.tab.o -ll
    Is that any help at all?
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    88
    Rep Power
    12
    Hi,

    Not really, hm, thanks anyway, I recall reading that page earlier.. hm, I'll keep looking on google, just posted here in hopes somebody had used it. :)

    Thanks for your response, more feedback from anybody is welcome!

    Regards,
    Someonewhois

IMN logo majestic logo threadwatch logo seochat tools logo