tok_val a tok_val b tok_val c -- 1+2 => Other -- 1+2*3 => Other -- 1*2+3 => Other -- (1+2)*3 => Other -- a+b+c+d => Other -- a*b*3*4 => Other -- 1 => Const 1 -- a => Var a -- ( => Parse error: Unexpected token -- ) => Parse error: Expected ( -- (a+b => Parse error: Expected ) -- => Parse error: Unexpected token -- $$ => Parse error: Unexpected token c.i -1 v.name '' b.op '' len(c) = 2 s1 = 'bar' c[1] = 'zz' s = 'foo' s = 'zz' len(c3) = 4 len(c4) = 4 len(strs) = 0 not null c4[0] = a len(strs) = 1 (expr.Binary op:"+" left:(expr.Const i:1) right:(expr.Const i:2)) (expr.Binary op:"+" left:(expr.Const i:1) right:(expr.Binary op:"*" left:(expr.Const i:2) right:(expr.Const i:3)) ) (expr.Binary op:"+" left:(expr.Binary op:"*" left:(expr.Const i:1) right:(expr.Const i:2)) right:(expr.Const i:3) ) (expr.Binary op:"*" left:(expr.Binary op:"+" left:(expr.Const i:1) right:(expr.Const i:2)) right:(expr.Const i:3) ) (expr.Binary op:"+" left:(expr.Binary op:"+" left:(expr.Binary op:"+" left:(expr.Var name:a) right:(expr.Var name:b)) right:(expr.Var name:c) ) right:(expr.Var name:d) ) (expr.Binary op:"*" left:(expr.Binary op:"*" left:(expr.Binary op:"*" left:(expr.Var name:a) right:(expr.Var name:b)) right:(expr.Const i:3) ) right:(expr.Const i:4) ) (expr.Const i:1) (expr.Var name:a) (expr.Binary op:"+" left:(expr.Const i:-1) right:(expr.Var name:"")) s = 'a' s = 'b' s = 'c' s = 'd' (MeasuredDoc s:s0 measure:(Measure_v a:0 b:1)) (MeasuredDoc s:s1 measure:(Measure_v a:1 b:2)) (MeasuredDoc s:s2 measure:(Measure_v a:2 b:3)) (MeasuredDoc s:s3 measure:(Measure_v a:3 b:4)) (MeasuredDoc s:s4 measure:(Measure_v a:4 b:5)) (MeasuredDoc s:s5 measure:(Measure_v a:5 b:6)) (MeasuredDoc s:s6 measure:(Measure_v a:6 b:7)) (MeasuredDoc s:s7 measure:(Measure_v a:7 b:8)) (MeasuredDoc s:s8 measure:(Measure_v a:8 b:9)) (MeasuredDoc s:s9 measure:(Measure_v a:9 b:10))