-
Notifications
You must be signed in to change notification settings - Fork 0
/
brack.ast.ebnf
19 lines (19 loc) · 705 Bytes
/
brack.ast.ebnf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
document := (stmt newline newline+)* stmt? newline* EOF
stmt := expr (newline expr)*
expr := (text | square | angle)+
angle := angle_bracket_open (module | angle) dot (ident | angle) (expr (comma expr)*)? angle_bracket_close
curly := curly_bracket_open (module | angle) dot (ident | angle) (expr (comma expr)*)? curly_bracket_close
square := square_bracket_open (module | angle) dot (ident | angle) (expr (comma expr)*)? square_bracket_close
angle_bracket_open := "<"
angle_bracket_close := ">"
square_bracket_open := "["
square_bracket_close := "]"
curly_bracket_open := "{"
curly_bracket_close := "}"
module := text
ident := text
text := [^.]+
whitespace := " "
newline := "\n"
dot := "."
comma := ","