forked from Deducteam/Dedukti
-
Notifications
You must be signed in to change notification settings - Fork 0
/
syntax.bnf
93 lines (76 loc) · 2.96 KB
/
syntax.bnf
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
<ident> ::= [a-zA-Z0-9_!?] [a-zA-Z0-9_!?']*
| '{|' <string> '|}'
<mident> ::= [a-zA-Z0-9_]*
<qident> ::= <mident> '.' <ident>
<line> ::= <ident> <param>* ':' <term> '.'
| 'private' <ident> <param>* ':' <term> '.'
| 'def' <ident> ':' <term> '.'
| 'private' 'def' <ident> ':' <term> '.'
| 'injective' <ident> ':' <term> '.'
| 'private' 'injective' <ident> ':' <term> '.'
| 'def'AC <ident> '[' <term> ']' '.'
| 'private' 'def'AC <ident> '[' <term> ']' '.'
| 'def'ACU <ident> '[' <term> ',' <term> ']' '.'
| 'private' 'def'ACU <ident> '[' <term> ',' <term> ']' '.'
| 'def' <ident> ':' <term> ':=' <term> '.'
| 'def' <ident> ':=' <term> '.'
| 'def' <ident> <param>+ ':' <term> ':=' <term> '.'
| 'def' <ident> <param>+ ':=' <term> '.'
| 'private' 'def' <ident> ':' <term> ':=' <term> '.'
| 'private' 'def' <ident> ':=' <term> '.'
| 'private' 'def' <ident> <param>+ ':' <term> ':=' <term> '.'
| 'private' 'def' <ident> <param>+ ':=' <term> '.'
| 'thm' <ident> ':' <term> ':=' <term> '.'
| 'thm' <ident> <param>+ ':' <term> ':=' <term> '.'
| <rule>+ '.'
| '#EVAL' <term> '.'
| '#EVAL' <eval_config> <term> '.'
| '#INFER' <term> '.'
| '#INFER' <eval_config> <term> '.'
| '#CHECK' <aterm> ':' <term> '.'
| '#CHECKNOT' <aterm> ':' <term> '.'
| '#ASSERT' <aterm> ':' <term> '.'
| '#ASSERTNOT' <aterm> ':' <term> '.'
| '#CHECK' <aterm> '=' <term> '.'
| '#CHECKNOT' <aterm> '=' <term> '.'
| '#ASSERT' <aterm> '=' <term> '.'
| '#ASSERTNOT' <aterm> '=' <term> '.'
| '#PRINT' '"' <string> '"' '.'
| '#GDT' <ident> '.'
| '#GDT' <qident> '.'
| '#NAME' '.'
| '#REQUIRE' '.'
| EOF
<eval_config> ::= '[' <ident> (',' <ident>)* ']'
<param> ::= '(' <ident> ':' <term> ')'
<rule> ::= '[' <context> ']' <top_pattern> '-->' <term>
| '{' <ident> '}' '[' <context> ']' <top_pattern>
'-->' <term>
| '{' <qident> '}' '[' <context> ']' <top_pattern>
'-->' <term>
<decl> ::= <ident> ':' <term>
| <ident>
<context> ::= [<decl> (',' <decl>)*]
<top_pattern> ::= <ident> <pattern_wp>*
| <qident> <pattern_wp>*
<pid> ::= '_'
| <ident>
<pattern_wp> ::= <ident>
| <qident>
| '_'
| '{' <term> '}'
| '(' <pattern> ')'
<pattern> ::= <pid> '=>' <pattern>
| <pattern_wp>+
<sterm> ::= <qident>
| <ident>
| '(' <term> ')'
| 'Type'
<aterm> ::= <sterm> <sterm>*
<term> ::= <aterm>
| <pid> ':' <aterm> '->' <term>
| '(' <ident> ':' <aterm> ')' '->' <term>
| <aterm> '->' <term>
| <pid> '=>' <term>
| <pid> ':' <aterm> '=>' <term>
| '(' <pid> ':' <aterm> ':=' <aterm> ')' '=>' <term>