Skip to content

Instantly share code, notes, and snippets.

@PollRobots
Created January 20, 2013 22:24
Show Gist options
  • Select an option

  • Save PollRobots/4582245 to your computer and use it in GitHub Desktop.

Select an option

Save PollRobots/4582245 to your computer and use it in GitHub Desktop.
| NonTerminal x ->
let rule = grammar.[x]
match parse offset rule.Prod with
| (Unmatched, _) as y -> y
| (parsed, endOffset) -> (rule.Func input.[offset..endOffset - 1] parsed, endOffset)
// ...
parse 0 <| NonTerminal start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment