Mixin: Build_RD

Eleven~ Build_RD

Class actions to represent an arithmetic expression as a tree using recursive descent.

Source:
See:

Methods


add()

add: '+' product; returns [ 'add' null product ]

Source:

divide()

divide: '/' signed; returns [ 'divide' null signed ]

Source:

list()

list: sum [{ ',' sum }]; returns [ 'list' sum ... ]

Source:

multiply()

multiply: '*' signed; returns [ 'multiply' null signed ]

Source:

number()

number: Number; returns [ 'number' number ]

Source:

product()

product: signed [{ multiply | divide }]; returns tree

Source:

signed()

signed: [ '-' ] term; returns term or [ 'minus' term ]

Source:

subtract()

subtract: '-' product; returns [ 'subtract' null product ]

Source:

sum()

sum: product [{ add | subtract }]; returns tree

Source:

term()

term: number | name | '(' sum ')'; returns tree

Source: