Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Fixing broken code blocks

...

Let's first allow more complex expressions such as 1 or 1+2 or 1+2+3+4 This starts with a single number, then can add a plus sign and a number (possibly more than once):

{code
Code Block
titlerepeated addition

add: NUMBER (PLUS NUMBER)*


The

...

*

...

symbol

...

means

...

"zero

...

or

...

more

...

times".

...

If

...

you

...

want

...

to

...

implement

...

both

...

addition

...

and

...

subtraction,

...

you

...

can

...

make

...

a

...

small

...

adjustment:

...

:title=
Code Block
titleAddition and subtraction
add: NUMBER ((PLUS | MINUS) NUMBER)*

MINUS : '-';

...