Jump to content
  • Advertisement
Sign in to follow this  
plywood

flex/lemon

This topic is 3986 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

(a) If I write a token-description file and run it through flex, what is the output? (b) If I write a grammar-descripion file (using the tokens described via flex) and run it through LEMON, what is the output? (c) Obviously, I need to work with flex first, as LEMON is dependent on the tokens being used. How do I specify my flex output from within the LEMON context? (How do I "link" the 2 together?)

Share this post


Link to post
Share on other sites
Advertisement
If LEMON is anything like yacc, then you end up with two files in the language of your choice (or that of the tools).

Links between them are inherent to the generators themself. They should know how to re-use each other's definitions. LEMON should then include your custom code and invoke it in the parsing process.

But generally, end result should be a piece of opaque code that you merely need to invoke. Everything else should be defined in input files - including the actions to be performed.

The files are linked in the compilation process. Before then, they shouldn't need any of each other's definitions.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!