phpython Code
a python interpreter written in php
Status: Pre-Alpha
Brought to you by:
francescobianco
%class python %start stmt %left '+' '-' %left '*' '/' stmt = simple_stmt | compound_stmt . simple_stmt = small_stmt NEWLINE simple_stmt | small_stmt NEWLINE . small_stmt = cmd_stmt . compound_stmt = for_stmt . cmd_stmt = NAME DSTRING {python_command($1,$2);} . for_stmt = FOR exprlist IN testlist COLON { python_for(); } suite { python_end_for(); } . exprlist = NAME . testlist = test . test = expr . expr = NAME RBO argslist RBC . argslist = NUMBER COMMA NUMBER .