User Tools

Site Tools


info:jimpi

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
info:jimpi [2010/05/04 10:29] – grammar moritzinfo:jimpi [2010/05/04 10:35] – if, skip added moritz
Line 10: Line 10:
 File: Procedure* Statement*; File: Procedure* Statement*;
 Procedure: 'procedure' Symbol '(' (symbol (',' symbol)*)? ';' (symbol (',' symbol)*)? ')' 'begin' Statement* 'end'; Procedure: 'procedure' Symbol '(' (symbol (',' symbol)*)? ';' (symbol (',' symbol)*)? ')' 'begin' Statement* 'end';
-Statement: While | Until | For | Scope | Assign;+Statement: While | Until | For | Scope | Assign | If | Skip;
 While: 'while' Expression 'do' Statement* 'end'; While: 'while' Expression 'do' Statement* 'end';
 Until: 'repeat' Statement* 'until' Expression; Until: 'repeat' Statement* 'until' Expression;
Line 16: Line 16:
 Scope: 'var' Assign 'in' Statement* 'end'; Scope: 'var' Assign 'in' Statement* 'end';
 Assign: Symbol ':=' Expression; Assign: Symbol ':=' Expression;
 +If: 'if' Expression 'then' Statement* ('else' Statement*)? 'end';
 +Skip: 'skip';
  
-Expression: '(' Expression BinOp Expression ')' | Number | Symbol+Expression: '(' Expression BinOp Expression ')' | Number | Symbol | Symbol '(' (Expression (',' Expression)*)? ';' (symbol (',' symbol)*)? ')'
 BinOp: '+' | '-' | '*' | '=' | '#' | '>' | '>' | '>=' | '<=' | 'and' | 'or'; BinOp: '+' | '-' | '*' | '=' | '#' | '>' | '>' | '>=' | '<=' | 'and' | 'or';
 </code> </code>
info/jimpi.txt · Last modified: 2010/05/16 18:15 by moritz

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki