[bitc-dev] OCaml syntax question

Jonathan S. Shapiro shap at eros-os.com
Wed Mar 4 17:45:15 EST 2009


I'm looking at the OCaml syntax. The syntax for expressions includes:

  expr :=  expr ';' expr      # sequencing
  expr := let BINDING in EXPR

which means that

  let BINDING in EXPR ; let BINDING in EXPR

is legal but ambiguous. It is either:

  let BINDING in (EXPR ; let BINDING in EXPR)
  (let BINDING in EXPR ); let BINDING in EXPR

what means does the compiler use to resolve this ambiguity?

Thanks


More information about the bitc-dev mailing list