@precedence { div @left }

@top T { expr }

expr { RegExp | Symbol | BinOp }

BinOp { expr !div "/" expr }

@skip { whitespace }

@tokens {
  whitespace { @whitespace+ }

  Symbol { @asciiLetter+ }

  RegExp { "/" ![/]+ "/" }
}

# Disambiguates division from regexp

x / y / /foo/

==> T(BinOp(BinOp(Symbol,Symbol),RegExp))
