Skip to content

Commit 08f37b5

Browse files
Clean up GRAMMAR documentation syntax (#37)
* Create GRAMMAR * Copy in all grammar documentation. Documentation can be easily parsed out to generate html. list-filter-expr was fixed from what was posted on the website numerous typos were also corrected smart quotes were converted to their ascii counterparts * Clean up GRAMMAR documentation syntax
1 parent 1f691c3 commit 08f37b5

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

GRAMMAR

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ sub-expression = expression "." ( identifier / multi-select-list / multi-sele
8585
;; search(foo.bar.baz, {"foo": {"bar": {"baz": "value"}}}) -> "value"
8686
;; ```
8787

88-
pipe-expression = expression "|" expression ;; # Pipe Expressions \
88+
pipe-expression = expression "|" expression ;; # Pipe Expressions
8989
;; A pipe expression combines two expressions, separated by the `|` character. It is similar to a sub-expression with two
9090
;; important distinctions:
9191
;;
@@ -384,8 +384,7 @@ bracket-specifier = "[" "*" "]"
384384

385385
list-filter-expr = "[?" expression "]" ;; # Filter Expressions \
386386
comparator-expression = expression comparator expression ;; \
387-
comparator = "<" / "<=" / "==" / ">=" / ">" / "!=" ;; \
388-
387+
comparator = "<" / "<=" / "==" / ">=" / ">" / "!="
389388
;; A filter expression provides a way to select JSON elements based on a comparison to another expression. A filter
390389
;; expression is evaluated as follows: for each element in an array evaluate the expression against the element. If the
391390
;; expression evaluates to a truth-like value, the item (in its entirety) is added to the result list. Otherwise it is
@@ -440,7 +439,6 @@ comparator = "<" / "<=" / "==" / ">=" / ">" / "!=" ;; \
440439
;; search(foo[?a==b], {"foo": [{"a": 1, "b": 2}, {"a": 2, "b": 2}]}) -> [{"a": 2, "b": 2}]
441440
;; ```
442441

443-
444442
function-expression = unquoted-string ( no-args / one-or-more-args ) ;; # Functions Expressions \
445443
no-args = "(" ")" ;; \
446444
one-or-more-args = "(" ( function-arg *( "," function-arg ) ) ")" ;; \

0 commit comments

Comments
 (0)