// BNF of Enhanced PL/0 by Descartes Language

<program>	{<Comment>}
		<block>  
		{<Comment>}
		;
<block>		[ "const" <ident> "=" <number> {"," <ident> "=" <number>} ";"]
		{<Comment>}
		[ "var" <ident> {"," <ident>} ";"]
		{<Comment>}
		{ "function" <ident> "(" [<ident> {"," <ident> }] ")" ";" 
							<block> ";" } 
		{<Comment>}
		<statement> ;
<statement>	{<Comment>}
		[ <ident> "=" <expression> ";" | 
		 <ident> "(" [<expresssion> {"," <exporession>}] ")" ";" |
		 "return" <expression> ";" |
		 "begin" <statement> {";" <statement> } "end" |
		 "if" <condition> "then" <statement> ["else" <statement>] |
		 "for" <ident> "=" <expression> ";" <condition> ";"
				<ident> = <exporession> "do" <statement> |
		 "while" <condition> "do" <statement> |
		 "print" [(<ident #id> | <number #s #n> | <strings #str>)
		    { ","  (<ident #id2> | <number #s2 #n2>| <strings #str2>)}]";"];
<condition>	"odd" <expression> |
		<expression> ("="|"#"|"<"|"<="|">"|">=") <expression> ;
<expression>	[ "+"|"-"] <term> { ("+"|"-") <term>};
<term>		<factor> {("*"|"/") <factor>};
<factor>	<ident> "(" [<expression> { "," <expression>}] ")" |
		<ident> | <number> | "(" <expression> ")";

<ident>		<ID>;
<number>	<NUM>;
<strings>	<STRINGS>;

<Comment>	"//" <SKIPCR>
		;

