Menu

[r8]: / trunk / python / python.lime  Maximize  Restore  History

Download this file

26 lines (16 with data), 419 Bytes

%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 { foreach(array("a") as $c): } suite { endforeach; } .

exprlist = NAME .

testlist = NAME .
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.