46 lines
888 B
Text
46 lines
888 B
Text
|
|
===============
|
||
|
|
Infix Operators
|
||
|
|
===============
|
||
|
|
|
||
|
|
infixl 20 +;
|
||
|
|
infixl 30 *;
|
||
|
|
infixr 40 ^;
|
||
|
|
|
||
|
|
def computation := one + two * four ^ three;
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
(program
|
||
|
|
(fixity
|
||
|
|
(precedence)
|
||
|
|
(symbol))
|
||
|
|
(fixity
|
||
|
|
(precedence)
|
||
|
|
(symbol))
|
||
|
|
(fixity
|
||
|
|
(precedence)
|
||
|
|
(symbol))
|
||
|
|
(definition
|
||
|
|
(identifier)
|
||
|
|
(expr
|
||
|
|
(app_term
|
||
|
|
(binex
|
||
|
|
(app
|
||
|
|
(term
|
||
|
|
(identifier)))
|
||
|
|
(symbol)
|
||
|
|
(binex
|
||
|
|
(app
|
||
|
|
(term
|
||
|
|
(identifier)))
|
||
|
|
(symbol)
|
||
|
|
(binex
|
||
|
|
(app
|
||
|
|
(term
|
||
|
|
(identifier)))
|
||
|
|
(symbol)
|
||
|
|
(binex
|
||
|
|
(app
|
||
|
|
(term
|
||
|
|
(identifier)))))))))))
|