![]() In the rest of this page you can find a description of the main functionalities of ply. ![]() ![]() In summary, PLY consists of two separate modules: lex.py and yacc.py. yacc.py calls this repeatedly to retrieve tokens and invoke grammar rules.įinally the PLY parser will generate an LALR(1) parsing table. Interface in the form of a token() function that returns the next valid token on the Specifically, lex.py provides an external The two tools are meant to work together. Ply.lex - A re-implementation of Lex for lexical analysis ply.yacc - A re-implementation of Yacc for parser creation The classes used to develop the Laboratories (myLexer.py and myParser.py) as we’ll see PLY has two main modules which are part of the ply package these modules are used to extend It includes support for empty productions, precedence rules, error recovery, and ambiguous PLY uses the same LALR parsing technique as Lex and Yacc. It is a re-implementation of Lex and Yacc PLY is a parsing tool written purely in Python.
0 Comments
Leave a Reply. |