20 lines
550 B
Text
20 lines
550 B
Text
prog: ignore(<< >>)
|
|
parse(line)\prog
|
|
parse(error)\prog;
|
|
line: number *;
|
|
number: ignore(none)
|
|
sign float (exp | ={})
|
|
= { < True: > 3 2 1 * };
|
|
sign: <+>={} | <->={<->} | ={};
|
|
float: int ( <.> decim = { 2 <.> 1 } | = { 1 } )
|
|
| <.> int = { <.> 1 };
|
|
int: smark any(digit) string(digit) scopy;
|
|
decim: smark string(digit) scopy;
|
|
exp: any(<<eE>>) sign int = { <e> 2 1 };
|
|
|
|
error: smark any(nonl) ignore(none) string(nonl) scopy * = { <False: > 1 * };
|
|
|
|
digit: <<0123456789>>;
|
|
none: <<>>;
|
|
nonl: !<<
|
|
>>;
|