{"name":"Extended Backus-Naur Form","scopeName":"source.ebnf","patterns":[{"include":"#main"}],"repository":{"comment":{"name":"comment.block.ebnf","begin":"\\(\\*","end":"\\*\\)","beginCaptures":{"0":{"name":"punctuation.definition.comment.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.comment.end.ebnf"}}},"lhs":{"patterns":[{"name":"meta.lhs.ebnf","match":"(?x)\n(?:    \\s++\n|      ^|\\G\n| (?=  ^|\\G    )\n| (?\u003c= ;|\\*\\) )\n)\n\n# Exclude leading whitespace\n\\s*\n\n([A-Za-z][A-Za-z0-9_-]*+)","captures":{"1":{"name":"entity.name.rule.identifier.ebnf"}}},{"name":"meta.lhs.non-standard.ebnf","contentName":"entity.name.rule.identifier.non-standard.ebnf","begin":"(?x)\n(?:    \\s++\n|      ^|\\G\n| (?=  ^|\\G  )\n| (?\u003c= \\*\\) )\n)\n\n# Exclude leading whitespace\n\\s*\n\n# Check for at least one “invalid” character\n(?=\n\t# Starts with a digit\n\t[0-9]\n\t|\n\t\n\t# Contains at least one non-“word” character\n\t[A-Za-z0-9_-]*  # Skip any legal characters\n\t(?: [^:;=()]    # Don't swallow symbols for comments, terminators, or assignments\n\t|   \\((?!\\*)  # Permit open brackets if they don't introduce a comment\n\t)\n)","end":"(?x)\n# Exclude trailing whitespace\n\\s*\n\n# Stop before an...\n(?= :*=      # Assignment operator separating `#lhs` from `#rhs`\n|   ;        # Unexpected terminator\n|   \\(\\*   # Embedded comment\n)","patterns":[{"include":"#comment"}]},{"include":"#comment"}]},"main":{"patterns":[{"include":"#comment"},{"include":"#semicolon"},{"include":"#lhs"},{"include":"#rhs"},{"include":"#special"}]},"rhs":{"name":"meta.rhs.ebnf","begin":"(::=)|(:=)|(=)","end":"(?=;|^\\s*(?:\u003c?[A-Za-z][A-Za-z0-9_-]*\u003e?\\s*)?:*=)","patterns":[{"include":"#rhs-innards"}],"beginCaptures":{"1":{"name":"keyword.operator.assignment.non-standard.double-colon.ebnf"},"2":{"name":"keyword.operator.assignment.non-standard.single-colon.ebnf"},"3":{"name":"keyword.operator.assignment.ebnf"}}},"rhs-innards":{"patterns":[{"name":"punctuation.delimiter.comma.ebnf","match":","},{"name":"keyword.operator.logical.or.alternation.pipe.ebnf","match":"\\|"},{"name":"keyword.operator.logical.minus.hyphen.exception.ebnf","match":"-"},{"name":"keyword.operator.logical.repetition.asterisk.star.ebnf","match":"\\*"},{"include":"#special"},{"name":"string.quoted.double.ebnf","begin":"\"","end":"\"","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.ebnf"}}},{"name":"string.quoted.single.ebnf","begin":"'","end":"'","beginCaptures":{"0":{"name":"punctuation.definition.string.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.ebnf"}}},{"name":"meta.optional.ebnf","begin":"\\[","end":"\\]","patterns":[{"include":"#rhs-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.square.bracket.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.square.bracket.end.ebnf"}}},{"name":"meta.repetition.ebnf","begin":"{","end":"}","patterns":[{"include":"#rhs-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.curly.bracket.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.curly.bracket.end.ebnf"}}},{"name":"meta.group.ebnf","begin":"\\(","end":"\\)","patterns":[{"include":"#rhs-innards"}],"beginCaptures":{"0":{"name":"punctuation.definition.round.bracket.begin.ebnf"}},"endCaptures":{"0":{"name":"punctuation.definition.round.bracket.end.ebnf"}}},{"include":"#comment"},{"name":"variable.parameter.argument.identifier.reference.ebnf","match":"[A-Za-z][A-Za-z0-9_-]*"},{"name":"keyword.operator.logical.not.negation.non-standard.ebnf","match":"!"},{"include":"source.lex.regexp#quantifier"}]},"semicolon":{"name":"punctuation.terminator.statement.ebnf","match":";"},"special":{"name":"meta.pragma.directive.special.ebnf","contentName":"support.constant.language.pragma.ebnf","begin":"\\?","end":"\\?","beginCaptures":{"0":{"name":"keyword.operator.pragma.begin.ebnf"}},"endCaptures":{"0":{"name":"keyword.operator.pragma.end.ebnf"}}}}}
