> The parser actually recognizes keywords atm. > > We could change that so that each keyword is a token. > Then you would have something like: > > keyword_allowed_name: KEY1 | KEY2 | KEY3 | ... | KEYN | NAME > and then tweak func_def like so: > func_def: DEF keyword_allowed_name parameters ':' suite > > I haven't pondered whether or not this would cause the DFA to fall into a > degenerate case or not. This would be a good and simple approach. > Wondering where the metagrammer source file went to, It may not have existed; I may have handcrafted the metagrammar.c file. I believe the metagrammar was something like this: MSTART: RULE* RULE: NAME ':' RHS RHS: ITEM ('|' ITEM)* ITEM: (ATOM ['*' | '?'])+ ATOM: NAME | STRING | '(' RHS ')' | '[' RHS ']' --Guido van Rossum (home page: http://www.pythonlabs.com/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4