From: "Luke A. Kanies" Date: 2003-11-09T06:04:58+09:00 Subject: Re: rlex and ryacc Okay, just to summarize... I'm still having problems, but I have at least made progress. Here's what I've found so far: rlex: Does not generate code that's valid for 1.8, but the code does run. Does not seem to like parsing strings, only files (I get an infinite (loop) ryacc: Does not generate a valid Parse.rb on any platform I've tested it on, and is therefore unusable at this point. racc: Does not give much info about what to do for a lexer. I've tried rlex, but they have incompatible means of specifying tokens, apparently, so I don't know how to use them together. Without a lexer, I can't really tell if this will work for me. slex: I could definitely be wrong here, but this seems to only function on one character at a time, which is great if you needs lots of control and have a complicated syntax, but neither case applies to me (yet). I have no idea how to make this work for me. So, I may have a valid parser, but I can't seem to find a good lexer. Am I down to writing my own (which I'd prefer not to do), or is there some way to integrate rlex and racc? How are other people solving this problem? I would especially like to see other people's real-life examples of their next_token/yyparse routines. If I end up using rlex, I'm fully willing to modify it to generate valid, 1.8 code. I've already emailed the author, but have gotten no response yet (it's only been a couple of days). Once again, any ideas would be greatly appreciated. And considering how often this seems to come up on this list (from looking through the archives) it might be a good idea to get this solved once and for all. :) Luke -- "Most people are born and years later die without really having lived at all. They play it safe and tiptoe through life with no aspiration other than to arrive at death safely." -- Tony Campolo, "Carpe Diem"