Hello,

I want to conclude these discussions:
http://groups.google.com/group/ply-hack/browse_frm/thread/22685d1b7fb728fe/f09ce65cf3a04e3a?lnk=gst&q=lex+optimized#f09ce65cf3a04e3a
http://groups.google.com/group/ply-hack/browse_frm/thread/a799e10f9c200444/edd49473b4aca366?lnk=gst&q=lex+optimized#edd49473b4aca366

With some insights gathered while attempting to build a PLY based
grammar for distribution into some kind of a FAQ.

If I understand correctly, this is the logic for the optimize modes of
yacc and lex:


yacc optimization:
- If parsetab.py/pyc doesn't exist in the path, the table will be
reconstructed anyway, regardless of the optimize parameter
- If it doesn't exist:
  - If optimize=True, the table will be loaded unconditionally
  - If optimize=False, the table will be loaded only if it's older
than the grammar

lex optimization:
- If optimize=False, the lexical table is re-computed and is not saved
to a lextab file
- If optimize=True:
  - If lextab.py/pyc exists in the path, it will be loaded
unconditionally
  - If lextab.py/pyc doesn't exist, it will be created and loaded


Please correct me if I'm wrong. Thanks !

Eli

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ply-hack" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/ply-hack?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to