Skip to content

Instantly share code, notes, and snippets.

@skoji
Created April 18, 2014 07:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save skoji/11030160 to your computer and use it in GitHub Desktop.
Save skoji/11030160 to your computer and use it in GitHub Desktop.
start
= Document
Document
= l:TheLine LF d:Document { d.unshift(l); return d }
/ l:TheLine { return [l]; }
TheLine = DocumentLine / NotAllowedLine
NotAllowedLine = "not allowed" LF { return "not allowed but here."; }
DocumentLine
= !NotAllowedLine c:Character* { return c.join(''); }
Character = !LF c:. { return c; }
LF = "\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment