Stefan Krah added the comment:
Larry has requested privately that I send the counter proposal PEP and
additional information, so here it is:
I've send the PEP draft to Nick. The patch that I uploaded contains
DSL examples, an ml-yacc grammar and token specifications.
Two prototype tools are available. Usage:
./printsemant Tools/preprocess/testcases/posix_stat.c
./preprocess Tools/preprocess/testcases/posix_stat.c
The first tool dumps the semantically checked parse tree to stdout,
the second tool dumps the preprocessed .c file to stdout.
These are *prototypes* written in Standard ML, since I'm not familiar
with the PLY toolchain.
Known deficiencies:
* The Python 'test' expression is not semantically checked. The syntax
however is checked since it is part of the grammar.
* The lexer does not handle triple quoted strings.
* C declarations are parsed in a primitive way. The final implementation
should utilize 'declarator' and 'init-declarator' from the C grammar.
* The *preprocess* tool does not emit code for the left-and-right optional
arguments case (addch.c). The *printsemant* tool can deal with this case.
* Since the *preprocess* tool generates the output from the parse
tree, the original indentation of the define block is lost.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue16612>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com