Skip to content

Instantly share code, notes, and snippets.

@poundifdef
Created December 26, 2023 23:03
Show Gist options
  • Save poundifdef/0ec68843fc911907e088e13f8b6287ff to your computer and use it in GitHub Desktop.
Save poundifdef/0ec68843fc911907e088e13f8b6287ff to your computer and use it in GitHub Desktop.
filter = identifier ,[not], ".", operator, [modifier] , operand;
identifier = quoted_identifier | plain_identifier;
quoted_identifier = '"',inside_quotes, '"';
plain_identifier = "[A-Za-z0-9_]+" ;
inside_quotes = '[!"\"".]+' ;
not = '.not';
operator = "[A-Za-z]+" ;
modifier = "(", plain_identifier, ")";
operand = element;
Element = QuotedString / UnquotedString / Number / Tuple / Set;
QuotedString = '"', inside_quotes, '"';
Number = Float / Integer;
Integer = '[0-9]+';
Float = '[0-9]+', "." ,'[0-9]+' ;
Tuple = "(", List, ")";
Set = "{" , List , "}";
List = Element, {",", Element};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment