Skip to content

Instantly share code, notes, and snippets.

@mdarse
Last active August 29, 2015 14:08
Show Gist options
  • Save mdarse/1d9a3998f8b6e9c543aa to your computer and use it in GitHub Desktop.
Save mdarse/1d9a3998f8b6e9c543aa to your computer and use it in GitHub Desktop.
IN syntax grammar
%skip space \s
%token in IN
%token word \S+
#query:
in_expression() | text() | unrestricted_text()
#in_expression:
text() ::in:: field()
#field:
<word>
#text:
<word>+
#unrestricted_text:
( <word> | <in> )+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment