Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Expr ¶
func Parse ¶
Parse parses the input string as an arithmetic expression.
expr = num a literal number, e.g., 3.14159
| id a variable name, e.g., x
| id '(' expr ',' ... ')' a function call
| id "++" or "--" a postfix operator (++ or --)
| '-' expr a unary operator (+-)
| expr '+' expr a binary operator (+-*/)
Click to show internal directories.
Click to hide internal directories.