What Can a Parser Return? Six Output Forms, LL vs LR
Output Type 1: Boolean (i.e. acceptance only)
Output Type 1: Boolean (i.e. acceptance only)
ast module (vs deprecated parser module for parse trees)
Parse Trees vs ASTs
tokenize module
tokenize module
keyword Module
Docs: keyword — Testing for Python keywords Source Code: cpython/Lib/keyword.py
token module (with intro to globals())
1. Python token module
本文是对 Josh Haberman 的 LL and LR in Context: Why Parsing Tools Are Hard 的总结。
参考:Practical GeneralTop-down Parsers, by Ali Afroozeh and Anastasia Izmaylova
Reference: SLR and LR(1) Parsing Online Tool: JSMachines LR(1) Parser Generator