forked from linkeddata/swap
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathn3-selectors.n3-yacc.y
152 lines (117 loc) · 2 KB
/
n3-selectors.n3-yacc.y
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
%token N3_VARIABLE
%token N3_LANGCODE
%token N3_STRING
%token N3_QNAME
%token N3_EXPLICITURI
%token N3_NUMERICLITERAL
%token N3_BARENAME
%%
n3_document: _g0 _g1 _g2 n3_statements_optional eof
;
_g0: /* empty */
| n3_declaration _g0
;
_g1: /* empty */
| n3_universal _g1
;
_g2: /* empty */
| n3_existential _g2
;
n3_statements_optional: /* empty */
| n3_statement '.' n3_statements_optional
;
n3_declaration: '@prefix' N3_QNAME N3_EXPLICITURI '.'
| '@keywords' _g8
;
n3_universal: '@forAll' _g6
;
n3_existential: '@forSome' _g7
;
n3_statement: n3_subject n3_propertylist
;
_g8: '.'
| N3_BARENAME _g11
;
_g6: '.'
| n3_symbol _g9
;
_g7: '.'
| n3_symbol _g10
;
n3_subject: n3_path
;
n3_propertylist: /* empty */
| n3_verb n3_object n3_objecttail n3_propertylisttail
;
_g11: '.'
| ',' N3_BARENAME _g11
;
n3_symbol: N3_EXPLICITURI
| N3_QNAME
;
_g9: '.'
| ',' n3_symbol _g9
;
_g10: '.'
| ',' n3_symbol _g10
;
n3_path: n3_node n3_pathtail
;
n3_verb: n3_path
| '@has' n3_path
| '@is' n3_path '@of'
| '@a'
| '='
| '=>'
| '<='
;
n3_object: n3_path
;
n3_objecttail: /* empty */
| ',' n3_object n3_objecttail
;
n3_propertylisttail: /* empty */
| ';' n3_propertylist
;
n3_node: n3_symbol
| '{' n3_formulacontent '}'
| N3_VARIABLE
| N3_NUMERICLITERAL
| n3_literal
| '[' n3_propertylist ']'
| '(' n3_pathlist ')'
| '@this'
;
n3_pathtail: /* empty */
| '!' n3_path
| '^' n3_path
;
n3_formulacontent: /* empty */
| _g3 _g4 _g5 n3_statementlist
;
n3_literal: N3_STRING n3_dtlang
;
n3_pathlist: /* empty */
| n3_path n3_pathlist
;
_g3: /* empty */
| n3_declaration _g3
;
_g4: /* empty */
| n3_universal _g4
;
_g5: /* empty */
| n3_existential _g5
;
n3_statementlist: /* empty */
| n3_statement n3_statementtail
;
n3_dtlang: /* empty */
| '@' N3_LANGCODE
| '^^' n3_symbol
;
n3_statementtail: /* empty */
| '.' n3_statementlist
;
eof: /* empty */;
%%