dabeaz / ply

Python Lex-Yacc
http://www.dabeaz.com/ply/index.html
2.79k stars 465 forks source link

Import several module with lex() #300

Closed ClementRaynaud closed 6 months ago

ClementRaynaud commented 6 months ago

Hi !

I have just discovered PLY and I really like it. I am coding a simple parser and I have a question to which I can't find the answer.

Is it possible to import several modules when building a lexer ? For example :

Can I write a main.py in which I build a lexer using both lexer1 and lexer2 ?

This would be very usefull in complex projects.