Skip to content

Best Practices

Paul McGuire edited this page Sep 7, 2021 · 6 revisions

The following steps and methods are helpful in writing robust pyparsing parsers.

(Under construction - more details to follow)

Write a BNF

Use results names

Use parse actions

Use pre-defined expressions

Prefer Keywords over Literals

Test your parser in pieces

Test your parser using runTests()

View your parsed results using pprint() and dump()

Clone this wiki locally