Menu

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

Download this file

32 lines (19 with data), 493 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 { python_for(); } suite { python_end_for(); } .

exprlist = NAME .

testlist = test .

test = expr .

expr = NAME RBO argslist RBC .

argslist = NUMBER COMMA NUMBER .
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.