Professional Documents
Culture Documents
Grammar Design 162328
Grammar Design 162328
Grammar Design
Víctor A. Canales Lima 162328
Rules
<LOOP> ::= <LOOP>: <EXPR>
<LOOP> ::= for identifier in range(value, value)
<EXPR> ::= <EXPR> <LOOP>
<EXPR> ::= <LOOP>
<EXPR> ::= print( string )
<EXPR> ::= print( identifier )
Vocabulary
𝑣𝑎𝑙𝑢𝑒 ∈ ({1, … ,9}+ ∘ {0, … ,9}⋆ | 0)
𝑖𝑑𝑒𝑛𝑡𝑖𝑓𝑖𝑒𝑟 ∈ ({𝑎, … , 𝑧}+ ∘ ({𝑎, … , 𝑧}|{0, … ,9})⋆ )
𝑠𝑡𝑟𝑖𝑛𝑔 ∈ (" ∘ ({𝑎, … , 𝑧}|{0, … ,9})⋆ ∘ ")
Definition
LIS3042-1 Theory of Computation UDLAP - Autumn 2021
Examples