Message184075
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. |
|
Date |
User |
Action |
Args |
2013-03-13 09:55:20 | skrah | set | recipients:
+ skrah, gvanrossum, barry, gregory.p.smith, jcea, mark.dickinson, ncoghlan, pitrou, scoder, larry, eric.smith, jkloth, ezio.melotti, Arfrever, v+python, alex, Trundle, asvetlov, dmalcolm, daniel.urban, chris.jerdonek, Jim.Jewett, serhiy.storchaka, bfroehle, david.villa |
2013-03-13 09:55:20 | skrah | set | messageid: <1363168520.25.0.207717987068.issue16612@psf.upfronthosting.co.za> |
2013-03-13 09:55:20 | skrah | link | issue16612 messages |
2013-03-13 09:55:19 | skrah | create | |
|