Content deleted Content added
Bringing "External links" and "See also" sections in line with the Manual of Style using AWB |
→Example parser: fmt (EBNF grammar example) (spacing and 4-space indent) |
||
Line 15:
[[Algorithms + Data Structures = Programs]]) is in [[LL parser|LL(1)]] form:
▲ program = block "." .
["const" ident "=" number {"," ident "=" number} ";"]
▲ block =
[
▲ statement =
| "
| "
] .▼
▲ | "while" condition "do" statement
▲ ].
"odd" expression
▲ condition =
| expression ("
.▼
▲ .
▲ expression = [ "+"|"-"] term { ("+"|"-") term} .
▲ term = factor {("*"|"/") factor} .
factor = ident | number | "(" expression ")" .
▲ factor = ident | number | "(" expression ")" .
[[Terminal symbol|Terminals]] are expressed in quotes (except for the well defined ''ident''
|