Resources for lexing, tokenising and parsing in python

后端 未结 8 2569
鱼传尺愫
鱼传尺愫 2020-12-04 06:41

Can people point me to resources on lexing, parsing and tokenising with Python?

I\'m doing a little hacking on an open source project (hotwire) and wanted to do a fe

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 07:33

    I suggest http://www.canonware.com/Parsing/, since it is pure python and you don't need to learn a grammar, but it isn't widely used, and has comparatively little documentation. The heavyweight is ANTLR and PyParsing. ANTLR can generate java and C++ parsers too, and AST walkers but you will have to learn what amounts to a new language.

提交回复
热议问题