# Grammar ## Definitions Short description: - operator | denotes alternative, - operator * denotes iteration (zero or more), - operator + denotes iteration (one or more), ## Syntax Grammar

General

hurl-file
entry(used by hurl-file)
request(used by entry)
response(used by entry)
method(used by request)
 GET
|HEAD
|POST
|PUT
|DELETE
|CONNECT
|OPTIONS
|TRACE
|PATCH
version(used by response)
 HTTP/1.0
|HTTP/1.1
|HTTP/2
|HTTP/*
status(used by response)
[0-9]+
header(used by requestresponse)
body(used by requestresponse)

Sections

request-section(used by request)
response-section(used by response)
query-string-params-section(used by request-section)
lt*
[QueryStringParams] lt
key-value*
form-params-section(used by request-section)
lt*
[FormParams] lt
key-value*
multipart-form-data-section(used by request-section)
lt*
[MultipartFormData] lt
multipart-form-data-param*
cookies-section(used by request-section)
lt*
[Cookies] lt
key-value*
captures-section(used by response-section)
lt*
[Captures] lt
capture*
asserts-section(used by response-section)
lt*
[Asserts] lt
assert*
options-section(used by request-section)
lt*
[Options] lt
option*
multipart-form-data-param(used by multipart-form-data-section)
file-param(used by multipart-form-data-param)
file-value(used by file-param)
file-contenttype(used by file-value)
[a-zA-Z0-9/+-]+
capture(used by captures-section)
assert(used by asserts-section)
option(used by options-section)
ca-certificate-option(used by option)
cacert : filename lt
follow-redirect-option(used by option)
location : boolean lt
insecure-option(used by option)
insecure : boolean lt
max-redirs-option(used by option)
max-redirs : integer lt
retry-option(used by option)
retry : boolean lt
retry-interval-option(used by option)
retry-interval : integer lt
retry-max-count-option(used by option)
retry-max-count : integer lt
variable-option(used by option)
variable : variable-definition lt
verbose-option(used by option)
verbose : boolean lt
very-verbose-option(used by option)
very-verbose : boolean lt
variable-definition(used by variable-option)
variable-value(used by variable-definition)

Query

query(used by captureassert)
main-query(used by 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)
predicate-func(used by predicate)
equal-predicate(used by predicate-func)
(equals|==) sp predicate-value
not-equal-predicate(used by predicate-func)
(notEquals|!=) sp predicate-value
greater-predicate(used by predicate-func)
(greaterThan|>) sp (integer|float|quoted-string)
greater-or-equal-predicate(used by predicate-func)
(greaterThanOrEquals|>=) sp sp* (integer|float|quoted-string)
less-predicate(used by predicate-func)
(lessThan|<) sp (integer|float|quoted-string)
less-or-equal-predicate(used by predicate-func)
(lessThanOrEquals|<=) sp (integer|float|quoted-string)
start-with-predicate(used by predicate-func)
end-with-predicate(used by predicate-func)
contain-predicate(used by predicate-func)
contains sp quoted-string
match-predicate(used by predicate-func)
matches sp (quoted-string|regex)
exist-predicate(used by predicate-func)
exists
include-predicate(used by predicate-func)
includes sp predicate-value
integer-predicate(used by predicate-func)
isInteger
float-predicate(used by predicate-func)
isFloat
boolean-predicate(used by predicate-func)
isBoolean
string-predicate(used by predicate-func)
isString
collection-predicate(used by predicate-func)
isCollection

Bytes

bytes(used by body)
xml(used by bytes)
< To Be Defined >
base64, [A-Z0-9+-= \n]+ ;
oneline-file(used by predicate-valuebytes)
file, filename ;
hex, hexdigit* ;

Strings

quoted-string-content(used by quoted-string)
quoted-string-text(used by quoted-string-content)
~["\\]+
quoted-string-escaped-char(used by quoted-string-content)
\ ("|\|\b|\f|\n|\r|\t|\u unicode-char)
key-string(used by key-valuefile-paramcapturevariable-value)
key-string-content(used by key-string)
key-string-text(used by key-string-content)
~[#:\n\\]+
key-string-escaped-char(used by key-string-content)
\ (#|:|\|\b|\f|\n|\r|\t|\u unicode-char)
value-string(used by requestkey-value)
value-string-content(used by value-string)
value-string-text(used by value-string-content)
~[#\n\\]+
value-string-escaped-char(used by value-string-content)
\ (#|\|\b|\f|\n|\r|\t|\u unicode-char)
oneline-string(used by bytes)
oneline-string-content(used by oneline-string)
oneline-string-text(used by oneline-string-content)
~[#\n\\] ~```
oneline-string-escaped-char(used by oneline-string-content)
\ (#|\|b|f|u unicode-char)
multiline-string(used by predicate-valuebytes)
multiline-string-type(used by multiline-string)
 base64
|hex
|json
|xml
|graphql
multiline-string-content(used by multiline-string)
multiline-string-text(used by multiline-string-content)
~[\\]+ ~```
multiline-string-escaped-char(used by multiline-string-content)
\ (\|b|f|n|r|t|`|u unicode-char)
filename-content(used by filename)
filename-text(used by filename-content)
~[#; \n\\]+
filename-escaped-char(used by filename-content)
\ (;|#|[ ])
{ hexdigit+ }

JSON

json-value(used by bytesjson-key-valuejson-array)
json-object(used by json-value)
json-key-value(used by json-object)
json-array(used by json-value)
[ json-value (, json-value)* ]
json-string(used by json-valuejson-key-value)
json-string-content(used by json-string)
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 }}
expr(used by template)
variable-name(used by variable-definitionexpr)
[A-Za-z] [A-Za-z_-0-9]*

Filter

filter(used by queryexpr)
regex-filter(used by filter)
count-filter(used by filter)
count
escapeurl-filter(used by filter)
escapeUrl
unescapeurl-filter(used by filter)
unescapeUrl

Lexical Grammar

true|false
null
digit(used by integerfractionexponent)
[0-9]
[0-9A-Fa-f]
fraction(used by json-numberfloat)
. digit+
exponent(used by json-number)
(e|E) (+|-)? digit+
[ \t]
sp* comment? [\n]?
comment(used by lt)
# ~[\n]*
regex-content(used by regex)
regex-text(used by regex-content)
~[\n\/]+
regex-escaped-char(used by regex-content)
\ ~[\n]