Add example grammar for state parameter
# Passing state parameter
+
+When building the AST, it might be useful to pass parameters to the parser.
+
+```rust
+use std::str::FromStr;
+use ast::{Expr, Opcode};
+
+grammar(scale: i32);
+
+pub Expr: Box<Expr> = { // (1)
+ Expr ExprOp Factor => Box::new(Expr::Op(<>)), // (2)
+ Factor,
+};
+
+ExprOp: Opcode = { // (3)
+ "+" => Opcode::Add,
+ "-" => Opcode::Sub,
+};
+
+Factor: Box<Expr> = {
+ Factor FactorOp Term => Box::new(Expr::Op(<>)),
+ Term,
+};
+
+FactorOp: Opcode = {
+ "*" => Opcode::Mul,
+ "/" => Opcode::Div,
+};
+
+Term: Box<Expr> = {
+ Num => Box::new(Expr::Number(<>)),
+ "(" <Expr> ")"
+};
+
+Num: i32 = {
+ r"[0-9]+" => i32::from_str(<>).unwrap()*scale,
+};
+```
+
+Here the parser will accept a scale parameter that will scale every number encountered.
+
+
