diff --git a/docs/grammar.md b/docs/grammar.md index 07ed5bdbcc6..9a8c1645af5 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -20,7 +20,7 @@ Short description: request-section*
body?
response(used by entry)
lt*
-version sp status lt
+HTTP version? sp status lt
header*
response-section*
body?
@@ -33,10 +33,9 @@ Short description: |OPTIONS
|TRACE
|PATCH -
version(used by response)
 HTTP/1.0
-|HTTP/1.1
-|HTTP/2
-|HTTP
+
version(used by response)
 /1.0
+|/1.1
+|/2
status(used by response)
[0-9]+
header(used by requestresponse)
lt*
key-value lt
@@ -77,9 +76,9 @@ Short description:
file-value(used by file-param)
file, filename ; (file-contenttype)?
file-contenttype(used by file-value)
[a-zA-Z0-9/+-]+
capture(used by captures-section)
lt*
-key-string : query lt
+key-string : query (sp filter)* lt
assert(used by asserts-section)
lt*
-query sp predicate lt
+query (sp filter)* sp predicate lt
option(used by options-section)
lt*
(ca-certificate-option|follow-redirect-option|insecure-option|max-redirs-option|retry-option|retry-interval-option|retry-max-count-option|variable-option|verbose-option|very-verbose-option)
ca-certificate-option(used by option)
cacert : filename lt
@@ -99,8 +98,7 @@ Short description: |float
|key-string
|quoted-string -

Query

query(used by captureassert)
-
main-query(used by query)

Query

query(used by captureassert)
 status-query
|url-query
|header-query
|cookie-query
@@ -113,20 +111,20 @@ Short description: |bytes-query
|sha256-query
|md5-query
-
status-query(used by main-query)
status
-
url-query(used by main-query)
url
-
header-query(used by main-query)
header sp quoted-string
-
cookie-query(used by main-query)
cookie sp quoted-string
-
body-query(used by main-query)
body
-
xpath-query(used by main-query)
-
jsonpath-query(used by main-query)
jsonpath sp quoted-string
-
regex-query(used by main-query)
-
variable-query(used by main-query)
variable sp quoted-string
-
duration-query(used by main-query)
duration
-
sha256-query(used by main-query)
sha256
-
md5-query(used by main-query)
md5
-
bytes-query(used by main-query)
bytes
-

Predicates

predicate(used by assert)
+
status-query(used by query)
status
+
url-query(used by query)
url
+
header-query(used by query)
header sp quoted-string
+
cookie-query(used by query)
cookie sp quoted-string
+
body-query(used by query)
body
+
xpath-query(used by query)
+
jsonpath-query(used by query)
jsonpath sp quoted-string
+
regex-query(used by query)
+
variable-query(used by query)
variable sp quoted-string
+
duration-query(used by query)
duration
+
sha256-query(used by query)
sha256
+
md5-query(used by query)
md5
+
bytes-query(used by query)
bytes
+

Predicates id="predicates"

predicate(used by assert)
predicate-func(used by predicate)
 equal-predicate
|not-equal-predicate
|greater-predicate
@@ -229,17 +227,17 @@ Short description:
json-string-text(used by json-string-content)
~["\\]
json-string-escaped-char(used by json-string-content)
\ ("|\|b|f|n|r|t|u hexdigit hexdigit hexdigit hexdigit)
json-number(used by json-value)
-

Template / Expression

expr(used by template)
variable-name(used by variable-definitionexpr)
[A-Za-z] [A-Za-z_-0-9]*
-

Filter

regex-filter(used by filter)
count-filter(used by filter)
count
-
escapeurl-filter(used by filter)
escapeUrl
-
unescapeurl-filter(used by filter)
unescapeUrl
+
url-encode-filter(used by filter)
urlEncode
+
url-decode-filter(used by filter)
urlDecode

Lexical Grammar

@@ -248,7 +246,7 @@ Short description:
[0-9A-Fa-f]
fraction(used by json-numberfloat)
. digit+
exponent(used by json-number)
(e|E) (+|-)? digit+
- +
comment(used by lt)
# ~[\n]*
diff --git a/docs/spec/hurl.grammar b/docs/spec/hurl.grammar index ea58dcf3af7..917e5a36f0d 100644 --- a/docs/spec/hurl.grammar +++ b/docs/spec/hurl.grammar @@ -15,11 +15,12 @@ request: response: lt* - version sp status lt + "HTTP" version? sp status lt header* response-section* body? + method: "GET" | "HEAD" @@ -31,12 +32,10 @@ method: | "TRACE" | "PATCH" - version: - "HTTP/1.0" - | "HTTP/1.1" - | "HTTP/2" - | "HTTP" + "/1.0" + | "/1.1" + | "/2" status: [0-9]+