This page provides a formal BNF (Backus-Naur Form) grammar for the Jira expressions language. This grammar can be useful for:
This grammar is derived from the current implementation of the Jira expressions language and aims to accurately represent its syntax and structure. While it has not undergone exhaustive formal verification, it should provide a solid foundation for understanding the language's grammar rules and available constructs.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122<program> ::= <top_level_let_in> <top_level_let_in> ::= <variable_declarations> ";" <body_expression> ";"? | <variable_declarations> ";" "return" <body_expression> ";"? | "return" <body_expression> ";"? | <body_expression> ";"? <variable_declarations> ::= <variable_declaration> (";" <variable_declaration>)* <variable_declaration> ::= ("let")? <identifier> "=" <expression> <body_expression> ::= <expression> | <if_statement> | <try_statement> <if_statement> ::= "if" "(" <expression> ")" <block> <else_if_clause>* <else_clause> <else_if_clause> ::= "else" "if" "(" <expression> ")" <block> <else_clause> ::= "else" <block> <try_statement> ::= "try" <block> "catch" "(" <identifier>? ")" <block> <block> ::= "{" <top_level_let_in> "}" <expression> ::= <conditional_expression> <conditional_expression> ::= <throw_expression> ("?" <expression> ":" <conditional_expression>)? <throw_expression> ::= "throw" <throw_expression> | <nullish_coalescing_expression> <nullish_coalescing_expression> ::= <logical_or_expression> ("??" <logical_or_expression>)* <logical_or_expression> ::= <logical_and_expression> ("||" <logical_and_expression>)* <logical_and_expression> ::= <equality_expression> ("&&" <equality_expression>)* <equality_expression> ::= <relational_expression> (("==" | "!=") <relational_expression>)* <relational_expression> ::= <additive_expression> (("<" | ">" | "<=" | ">=") <additive_expression>)* <additive_expression> ::= <multiplicative_expression> (("+" | "-") <multiplicative_expression>)* <multiplicative_expression> ::= <unary_expression> (("*" | "/" | "%") <unary_expression>)* <unary_expression> ::= ("!" | "-" | "typeof") <unary_expression> | <postfix_expression> <postfix_expression> ::= <primary_expression> <postfix_suffix>* <postfix_suffix> ::= "." <identifier> | "?." <identifier> | "[" <expression> "]" | "?.[" <expression> "]" | "(" <argument_list> ")" <primary_expression> ::= <literal> | <identifier> | <lambda_expression> | <constructor_call> | <array_literal> | <object_literal> | <template_literal> | "(" <expression> ")" <literal> ::= <number> | <string> | <boolean> | "null" <number> ::= [0-9]+ ("." [0-9]+)? <string> ::= "'" <single_string_content>* "'" | "\"" <double_string_content>* "\"" <character> ::= [a-z] | [A-Z] | [0-9] | " " | "!" | "#" | "$" | "%" | "&" | "(" | ")" | "*" | "+" | "," | "-" | "." | "/" | ":" | ";" | "<" | "=" | ">" | "?" | "@" | "[" | "]" | "^" | "_" | "`" | "{" | "|" | "}" | "~" <single_string_content> ::= <character> | "\"" <double_string_content> ::= <character> | "'" <boolean> ::= "true" | "false" <identifier> ::= <identifier_char>+ <identifier_char> ::= [a-z] | [A-Z] | "_" | "$" | [0-9] <template_literal> ::= "`" <template_part>* "`" <template_part> ::= <template_content> | "${" <expression> "}" <template_content> ::= <character> | "\"" | "'" <lambda_expression> ::= <lambda_params> "=>" <lambda_body> <lambda_params> ::= <identifier> | "(" <parameter_list> ")" <parameter_list> ::= <identifier> ("," <identifier>)* | E <lambda_body> ::= <expression> | <block> <constructor_call> ::= "new" <identifier> "(" <argument_list> ")" <argument_list> ::= <expression> ("," <expression>)* | E <array_literal> ::= "[" <element_list> "]" <element_list> ::= <expression> ("," <expression>)* | E <object_literal> ::= "{" <property_list> "}" <property_list> ::= <property> ("," <property>)* | E <property> ::= <identifier> ":" <expression>
Rate this page: