shnewto / bnf

Parse BNF grammar definitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Allow comments in grammars

shnewto opened this issue · comments

We need a way to allow incorporating comments into a grammar. It seems somewhat standard to
use the ; to indicate the start of a comment and a \n to close it. It'd be a good add I think to make that work.

A couple initial questions:

  • Do we look for the ; all along the way?
  • Do we make a "first pass" that strips all comments before parsing?