227
edits
m (→Function) |
|||
Line 27: | Line 27: | ||
The following CFG evaluates to all possible syntactical correct "programs" (new & not yet public version): | The following CFG evaluates to all possible syntactical correct "programs" (new & not yet public version): | ||
START -> ASSIGN [COMMENT] '\n' START | ASSIGN [COMMENT] | |||
START -> [COMMENT|COMMENTBLOCK] '\n' START | [COMMENT|COMMENTBLOCK] '\n' | |||
ASSIGN -> (NAME ':=' )+ EXPRLST | NAME'(' [NAME (, NAME)* ] ')' | |||
EXPRLST -> [COMMENTBLOCK] (EXPR EXPRLST | EXPR) [COMMENTBLOCK] | |||
EXPR -> FIRSTAVAIL | IFTHENELSE | FUNCTION | VARIABLE | STRING | |||
FIRSTAVAIL -> '[' EXPRLST ( ',' EXPRLST )* ']' | |||
IFTHENELSE -> '{' EXPRLST '=' EXPRLST '?' EXPRLST ':' EXPRLST '}' | |||
FUNCTION -> '$'NAME'(' EXPRLST ( ',' EXPRLST )* ')' | |||
VARIABLE -> '%'NAME'%' | |||
STRING -> ('"'<Any string except ">'"') | ("'" <Any string except '> "'") | |||
NAME -> < Any String without the following characters := []'{}(),"%$? > | |||
COMMENT -> #< Any string > | |||
COMMENTBLOCK -> /*< Any string >*/ | |||
Note: | Note: |
edits