aslprimaries.y revision 1.1 1 1.1 christos NoEcho('
2 1.1 christos /******************************************************************************
3 1.1 christos *
4 1.1 christos * Module Name: aslprimaries.y - Rules for primary ASL operators
5 1.1 christos *
6 1.1 christos *****************************************************************************/
7 1.1 christos
8 1.1 christos /*
9 1.1 christos * Copyright (C) 2000 - 2016, Intel Corp.
10 1.1 christos * All rights reserved.
11 1.1 christos *
12 1.1 christos * Redistribution and use in source and binary forms, with or without
13 1.1 christos * modification, are permitted provided that the following conditions
14 1.1 christos * are met:
15 1.1 christos * 1. Redistributions of source code must retain the above copyright
16 1.1 christos * notice, this list of conditions, and the following disclaimer,
17 1.1 christos * without modification.
18 1.1 christos * 2. Redistributions in binary form must reproduce at minimum a disclaimer
19 1.1 christos * substantially similar to the "NO WARRANTY" disclaimer below
20 1.1 christos * ("Disclaimer") and any redistribution must be conditioned upon
21 1.1 christos * including a substantially similar Disclaimer requirement for further
22 1.1 christos * binary redistribution.
23 1.1 christos * 3. Neither the names of the above-listed copyright holders nor the names
24 1.1 christos * of any contributors may be used to endorse or promote products derived
25 1.1 christos * from this software without specific prior written permission.
26 1.1 christos *
27 1.1 christos * Alternatively, this software may be distributed under the terms of the
28 1.1 christos * GNU General Public License ("GPL") version 2 as published by the Free
29 1.1 christos * Software Foundation.
30 1.1 christos *
31 1.1 christos * NO WARRANTY
32 1.1 christos * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
33 1.1 christos * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
34 1.1 christos * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
35 1.1 christos * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
36 1.1 christos * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
37 1.1 christos * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
38 1.1 christos * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
39 1.1 christos * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
40 1.1 christos * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
41 1.1 christos * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 1.1 christos * POSSIBILITY OF SUCH DAMAGES.
43 1.1 christos */
44 1.1 christos
45 1.1 christos ')
46 1.1 christos
47 1.1 christos
48 1.1 christos /*******************************************************************************
49 1.1 christos *
50 1.1 christos * ASL Primary Terms
51 1.1 christos *
52 1.1 christos ******************************************************************************/
53 1.1 christos
54 1.1 christos AccessAsTerm
55 1.1 christos : PARSEOP_ACCESSAS '('
56 1.1 christos AccessTypeKeyword
57 1.1 christos OptionalAccessAttribTerm
58 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);}
59 1.1 christos | PARSEOP_ACCESSAS '('
60 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
61 1.1 christos ;
62 1.1 christos
63 1.1 christos AcquireTerm
64 1.1 christos : PARSEOP_ACQUIRE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ACQUIRE);}
65 1.1 christos SuperName
66 1.1 christos ',' WordConstExpr
67 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$6);}
68 1.1 christos | PARSEOP_ACQUIRE '('
69 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
70 1.1 christos ;
71 1.1 christos
72 1.1 christos AddTerm
73 1.1 christos : PARSEOP_ADD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ADD);}
74 1.1 christos TermArg
75 1.1 christos TermArgItem
76 1.1 christos Target
77 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
78 1.1 christos | PARSEOP_ADD '('
79 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
80 1.1 christos ;
81 1.1 christos
82 1.1 christos AliasTerm
83 1.1 christos : PARSEOP_ALIAS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ALIAS);}
84 1.1 christos NameString
85 1.1 christos NameStringItem
86 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,
87 1.1 christos TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));}
88 1.1 christos | PARSEOP_ALIAS '('
89 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
90 1.1 christos ;
91 1.1 christos
92 1.1 christos AndTerm
93 1.1 christos : PARSEOP_AND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_AND);}
94 1.1 christos TermArg
95 1.1 christos TermArgItem
96 1.1 christos Target
97 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
98 1.1 christos | PARSEOP_AND '('
99 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
100 1.1 christos ;
101 1.1 christos
102 1.1 christos ArgTerm
103 1.1 christos : PARSEOP_ARG0 {$$ = TrCreateLeafNode (PARSEOP_ARG0);}
104 1.1 christos | PARSEOP_ARG1 {$$ = TrCreateLeafNode (PARSEOP_ARG1);}
105 1.1 christos | PARSEOP_ARG2 {$$ = TrCreateLeafNode (PARSEOP_ARG2);}
106 1.1 christos | PARSEOP_ARG3 {$$ = TrCreateLeafNode (PARSEOP_ARG3);}
107 1.1 christos | PARSEOP_ARG4 {$$ = TrCreateLeafNode (PARSEOP_ARG4);}
108 1.1 christos | PARSEOP_ARG5 {$$ = TrCreateLeafNode (PARSEOP_ARG5);}
109 1.1 christos | PARSEOP_ARG6 {$$ = TrCreateLeafNode (PARSEOP_ARG6);}
110 1.1 christos ;
111 1.1 christos
112 1.1 christos BankFieldTerm
113 1.1 christos : PARSEOP_BANKFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_BANKFIELD);}
114 1.1 christos NameString
115 1.1 christos NameStringItem
116 1.1 christos TermArgItem
117 1.1 christos ',' AccessTypeKeyword
118 1.1 christos ',' LockRuleKeyword
119 1.1 christos ',' UpdateRuleKeyword
120 1.1 christos ')' '{'
121 1.1 christos FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,7,
122 1.1 christos $4,$5,$6,$8,$10,$12,$15);}
123 1.1 christos | PARSEOP_BANKFIELD '('
124 1.1 christos error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
125 1.1 christos ;
126 1.1 christos
127 1.1 christos BreakTerm
128 1.1 christos : PARSEOP_BREAK {$$ = TrCreateNode (PARSEOP_BREAK, 0);}
129 1.1 christos ;
130 1.1 christos
131 1.1 christos BreakPointTerm
132 1.1 christos : PARSEOP_BREAKPOINT {$$ = TrCreateNode (PARSEOP_BREAKPOINT, 0);}
133 1.1 christos ;
134 1.1 christos
135 1.1 christos BufferTerm
136 1.1 christos : PARSEOP_BUFFER {$<n>$ = TrCreateLeafNode (PARSEOP_BUFFER);}
137 1.1 christos OptionalDataCount
138 1.1 christos '{' BufferTermData '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
139 1.1 christos ;
140 1.1 christos
141 1.1 christos BufferTermData
142 1.1 christos : ByteList {}
143 1.1 christos | StringData {}
144 1.1 christos ;
145 1.1 christos
146 1.1 christos CaseTerm
147 1.1 christos : PARSEOP_CASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CASE);}
148 1.1 christos DataObject
149 1.1 christos ')' '{'
150 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
151 1.1 christos | PARSEOP_CASE '('
152 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
153 1.1 christos ;
154 1.1 christos
155 1.1 christos ConcatTerm
156 1.1 christos : PARSEOP_CONCATENATE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONCATENATE);}
157 1.1 christos TermArg
158 1.1 christos TermArgItem
159 1.1 christos Target
160 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
161 1.1 christos | PARSEOP_CONCATENATE '('
162 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
163 1.1 christos ;
164 1.1 christos
165 1.1 christos ConcatResTerm
166 1.1 christos : PARSEOP_CONCATENATERESTEMPLATE '(' {$<n>$ = TrCreateLeafNode (
167 1.1 christos PARSEOP_CONCATENATERESTEMPLATE);}
168 1.1 christos TermArg
169 1.1 christos TermArgItem
170 1.1 christos Target
171 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
172 1.1 christos | PARSEOP_CONCATENATERESTEMPLATE '('
173 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
174 1.1 christos ;
175 1.1 christos
176 1.1 christos ConnectionTerm
177 1.1 christos : PARSEOP_CONNECTION '('
178 1.1 christos NameString
179 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);}
180 1.1 christos | PARSEOP_CONNECTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONNECTION);}
181 1.1 christos ResourceMacroTerm
182 1.1 christos ')' {$$ = TrLinkChildren ($<n>3, 1,
183 1.1 christos TrLinkChildren (
184 1.1 christos TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3,
185 1.1 christos TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
186 1.1 christos TrCreateLeafNode (PARSEOP_DEFAULT_ARG),
187 1.1 christos $4));}
188 1.1 christos | PARSEOP_CONNECTION '('
189 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
190 1.1 christos ;
191 1.1 christos
192 1.1 christos CondRefOfTerm
193 1.1 christos : PARSEOP_CONDREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CONDREFOF);}
194 1.1 christos SuperName
195 1.1 christos Target
196 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
197 1.1 christos | PARSEOP_CONDREFOF '('
198 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
199 1.1 christos ;
200 1.1 christos
201 1.1 christos ContinueTerm
202 1.1 christos : PARSEOP_CONTINUE {$$ = TrCreateNode (PARSEOP_CONTINUE, 0);}
203 1.1 christos ;
204 1.1 christos
205 1.1 christos CopyObjectTerm
206 1.1 christos : PARSEOP_COPYOBJECT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);}
207 1.1 christos TermArg
208 1.1 christos ',' SimpleTarget
209 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,
210 1.1 christos TrSetNodeFlags ($6, NODE_IS_TARGET));}
211 1.1 christos | PARSEOP_COPYOBJECT '('
212 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
213 1.1 christos ;
214 1.1 christos
215 1.1 christos CreateBitFieldTerm
216 1.1 christos : PARSEOP_CREATEBITFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);}
217 1.1 christos TermArg
218 1.1 christos TermArgItem
219 1.1 christos NameStringItem
220 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
221 1.1 christos TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
222 1.1 christos | PARSEOP_CREATEBITFIELD '('
223 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
224 1.1 christos ;
225 1.1 christos
226 1.1 christos CreateByteFieldTerm
227 1.1 christos : PARSEOP_CREATEBYTEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);}
228 1.1 christos TermArg
229 1.1 christos TermArgItem
230 1.1 christos NameStringItem
231 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
232 1.1 christos TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
233 1.1 christos | PARSEOP_CREATEBYTEFIELD '('
234 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
235 1.1 christos ;
236 1.1 christos
237 1.1 christos CreateDWordFieldTerm
238 1.1 christos : PARSEOP_CREATEDWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);}
239 1.1 christos TermArg
240 1.1 christos TermArgItem
241 1.1 christos NameStringItem
242 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
243 1.1 christos TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
244 1.1 christos | PARSEOP_CREATEDWORDFIELD '('
245 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
246 1.1 christos ;
247 1.1 christos
248 1.1 christos CreateFieldTerm
249 1.1 christos : PARSEOP_CREATEFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);}
250 1.1 christos TermArg
251 1.1 christos TermArgItem
252 1.1 christos TermArgItem
253 1.1 christos NameStringItem
254 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,
255 1.1 christos TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));}
256 1.1 christos | PARSEOP_CREATEFIELD '('
257 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
258 1.1 christos ;
259 1.1 christos
260 1.1 christos CreateQWordFieldTerm
261 1.1 christos : PARSEOP_CREATEQWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);}
262 1.1 christos TermArg
263 1.1 christos TermArgItem
264 1.1 christos NameStringItem
265 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
266 1.1 christos TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
267 1.1 christos | PARSEOP_CREATEQWORDFIELD '('
268 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
269 1.1 christos ;
270 1.1 christos
271 1.1 christos CreateWordFieldTerm
272 1.1 christos : PARSEOP_CREATEWORDFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);}
273 1.1 christos TermArg
274 1.1 christos TermArgItem
275 1.1 christos NameStringItem
276 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,
277 1.1 christos TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));}
278 1.1 christos | PARSEOP_CREATEWORDFIELD '('
279 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
280 1.1 christos ;
281 1.1 christos
282 1.1 christos DataRegionTerm
283 1.1 christos : PARSEOP_DATATABLEREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);}
284 1.1 christos NameString
285 1.1 christos TermArgItem
286 1.1 christos TermArgItem
287 1.1 christos TermArgItem
288 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,4,
289 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$5,$6,$7);}
290 1.1 christos | PARSEOP_DATATABLEREGION '('
291 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
292 1.1 christos ;
293 1.1 christos
294 1.1 christos DebugTerm
295 1.1 christos : PARSEOP_DEBUG {$$ = TrCreateLeafNode (PARSEOP_DEBUG);}
296 1.1 christos ;
297 1.1 christos
298 1.1 christos DecTerm
299 1.1 christos : PARSEOP_DECREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DECREMENT);}
300 1.1 christos SuperName
301 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
302 1.1 christos | PARSEOP_DECREMENT '('
303 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
304 1.1 christos ;
305 1.1 christos
306 1.1 christos DefaultTerm
307 1.1 christos : PARSEOP_DEFAULT '{' {$<n>$ = TrCreateLeafNode (PARSEOP_DEFAULT);}
308 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
309 1.1 christos | PARSEOP_DEFAULT '{'
310 1.1 christos error '}' {$$ = AslDoError(); yyclearin;}
311 1.1 christos ;
312 1.1 christos
313 1.1 christos DerefOfTerm
314 1.1 christos : PARSEOP_DEREFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEREFOF);}
315 1.1 christos TermArg
316 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
317 1.1 christos | PARSEOP_DEREFOF '('
318 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
319 1.1 christos ;
320 1.1 christos
321 1.1 christos DeviceTerm
322 1.1 christos : PARSEOP_DEVICE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DEVICE);}
323 1.1 christos NameString
324 1.1 christos ')' '{'
325 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,2,
326 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
327 1.1 christos | PARSEOP_DEVICE '('
328 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
329 1.1 christos ;
330 1.1 christos
331 1.1 christos DivideTerm
332 1.1 christos : PARSEOP_DIVIDE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DIVIDE);}
333 1.1 christos TermArg
334 1.1 christos TermArgItem
335 1.1 christos Target
336 1.1 christos Target
337 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
338 1.1 christos | PARSEOP_DIVIDE '('
339 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
340 1.1 christos ;
341 1.1 christos
342 1.1 christos EISAIDTerm
343 1.1 christos : PARSEOP_EISAID '('
344 1.1 christos StringData ')' {$$ = TrUpdateNode (PARSEOP_EISAID, $3);}
345 1.1 christos | PARSEOP_EISAID '('
346 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
347 1.1 christos ;
348 1.1 christos
349 1.1 christos ElseIfTerm
350 1.1 christos : IfTerm ElseTerm {$$ = TrLinkPeerNode ($1,$2);}
351 1.1 christos ;
352 1.1 christos
353 1.1 christos ElseTerm
354 1.1 christos : {$$ = NULL;}
355 1.1 christos | PARSEOP_ELSE '{' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
356 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,1,$4);}
357 1.1 christos
358 1.1 christos | PARSEOP_ELSE '{'
359 1.1 christos error '}' {$$ = AslDoError(); yyclearin;}
360 1.1 christos
361 1.1 christos | PARSEOP_ELSE
362 1.1 christos error {$$ = AslDoError(); yyclearin;}
363 1.1 christos
364 1.1 christos | PARSEOP_ELSEIF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_ELSE);}
365 1.1 christos TermArg {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
366 1.1 christos ')' '{'
367 1.1 christos TermList '}' {TrLinkChildren ($<n>5,2,$4,$8);}
368 1.1 christos ElseTerm {TrLinkPeerNode ($<n>5,$11);}
369 1.1 christos {$$ = TrLinkChildren ($<n>3,1,$<n>5);}
370 1.1 christos
371 1.1 christos | PARSEOP_ELSEIF '('
372 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
373 1.1 christos
374 1.1 christos | PARSEOP_ELSEIF
375 1.1 christos error {$$ = AslDoError(); yyclearin;}
376 1.1 christos ;
377 1.1 christos
378 1.1 christos EventTerm
379 1.1 christos : PARSEOP_EVENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_EVENT);}
380 1.1 christos NameString
381 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,
382 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION));}
383 1.1 christos | PARSEOP_EVENT '('
384 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
385 1.1 christos ;
386 1.1 christos
387 1.1 christos ExternalTerm
388 1.1 christos : PARSEOP_EXTERNAL '('
389 1.1 christos NameString
390 1.1 christos OptionalObjectTypeKeyword
391 1.1 christos OptionalParameterTypePackage
392 1.1 christos OptionalParameterTypesPackage
393 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
394 1.1 christos | PARSEOP_EXTERNAL '('
395 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
396 1.1 christos ;
397 1.1 christos
398 1.1 christos FatalTerm
399 1.1 christos : PARSEOP_FATAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FATAL);}
400 1.1 christos ByteConstExpr
401 1.1 christos ',' DWordConstExpr
402 1.1 christos TermArgItem
403 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
404 1.1 christos | PARSEOP_FATAL '('
405 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
406 1.1 christos ;
407 1.1 christos
408 1.1 christos FieldTerm
409 1.1 christos : PARSEOP_FIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FIELD);}
410 1.1 christos NameString
411 1.1 christos ',' AccessTypeKeyword
412 1.1 christos ',' LockRuleKeyword
413 1.1 christos ',' UpdateRuleKeyword
414 1.1 christos ')' '{'
415 1.1 christos FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,5,$4,$6,$8,$10,$13);}
416 1.1 christos | PARSEOP_FIELD '('
417 1.1 christos error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
418 1.1 christos ;
419 1.1 christos
420 1.1 christos FindSetLeftBitTerm
421 1.1 christos : PARSEOP_FINDSETLEFTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETLEFTBIT);}
422 1.1 christos TermArg
423 1.1 christos Target
424 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
425 1.1 christos | PARSEOP_FINDSETLEFTBIT '('
426 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
427 1.1 christos ;
428 1.1 christos
429 1.1 christos FindSetRightBitTerm
430 1.1 christos : PARSEOP_FINDSETRIGHTBIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FINDSETRIGHTBIT);}
431 1.1 christos TermArg
432 1.1 christos Target
433 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
434 1.1 christos | PARSEOP_FINDSETRIGHTBIT '('
435 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
436 1.1 christos ;
437 1.1 christos
438 1.1 christos /* Convert a For() loop to a While() loop */
439 1.1 christos ForTerm
440 1.1 christos : PARSEOP_FOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
441 1.1 christos OptionalTermArg ',' {}
442 1.1 christos OptionalPredicate ','
443 1.1 christos OptionalTermArg {$<n>$ = TrLinkPeerNode ($4,$<n>3);
444 1.1 christos TrSetParent ($9,$<n>3);} /* New parent is WHILE */
445 1.1 christos ')' '{' TermList '}' {$<n>$ = TrLinkChildren ($<n>3,2,$7,$13);}
446 1.1 christos {$<n>$ = TrLinkPeerNode ($13,$9);
447 1.1 christos $$ = $<n>10;}
448 1.1 christos ;
449 1.1 christos
450 1.1 christos OptionalPredicate
451 1.1 christos : {$$ = TrCreateValuedLeafNode (PARSEOP_INTEGER, 1);}
452 1.1 christos | TermArg {$$ = $1;}
453 1.1 christos ;
454 1.1 christos
455 1.1 christos FprintfTerm
456 1.1 christos : PARSEOP_FPRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FPRINTF);}
457 1.1 christos TermArg ','
458 1.1 christos StringData
459 1.1 christos PrintfArgList
460 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$6,$7);}
461 1.1 christos | PARSEOP_FPRINTF '('
462 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
463 1.1 christos ;
464 1.1 christos
465 1.1 christos FromBCDTerm
466 1.1 christos : PARSEOP_FROMBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_FROMBCD);}
467 1.1 christos TermArg
468 1.1 christos Target
469 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
470 1.1 christos | PARSEOP_FROMBCD '('
471 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
472 1.1 christos ;
473 1.1 christos
474 1.1 christos FunctionTerm
475 1.1 christos : PARSEOP_FUNCTION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
476 1.1 christos NameString
477 1.1 christos OptionalParameterTypePackage
478 1.1 christos OptionalParameterTypesPackage
479 1.1 christos ')' '{'
480 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,7,
481 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
482 1.1 christos TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),
483 1.1 christos TrCreateLeafNode (PARSEOP_SERIALIZERULE_NOTSERIAL),
484 1.1 christos TrCreateValuedLeafNode (PARSEOP_BYTECONST, 0),$5,$6,$9);}
485 1.1 christos | PARSEOP_FUNCTION '('
486 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
487 1.1 christos ;
488 1.1 christos
489 1.1 christos IfTerm
490 1.1 christos : PARSEOP_IF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_IF);}
491 1.1 christos TermArg
492 1.1 christos ')' '{'
493 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
494 1.1 christos
495 1.1 christos | PARSEOP_IF '('
496 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
497 1.1 christos ;
498 1.1 christos
499 1.1 christos IncludeTerm
500 1.1 christos : PARSEOP_INCLUDE '('
501 1.1 christos String ')' {$$ = TrUpdateNode (PARSEOP_INCLUDE, $3);
502 1.1 christos FlOpenIncludeFile ($3);}
503 1.1 christos ;
504 1.1 christos
505 1.1 christos IncludeEndTerm
506 1.1 christos : PARSEOP_INCLUDE_END {$<n>$ = TrCreateLeafNode (PARSEOP_INCLUDE_END);
507 1.1 christos TrSetCurrentFilename ($$);}
508 1.1 christos ;
509 1.1 christos
510 1.1 christos IncTerm
511 1.1 christos : PARSEOP_INCREMENT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INCREMENT);}
512 1.1 christos SuperName
513 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
514 1.1 christos | PARSEOP_INCREMENT '('
515 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
516 1.1 christos ;
517 1.1 christos
518 1.1 christos IndexFieldTerm
519 1.1 christos : PARSEOP_INDEXFIELD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEXFIELD);}
520 1.1 christos NameString
521 1.1 christos NameStringItem
522 1.1 christos ',' AccessTypeKeyword
523 1.1 christos ',' LockRuleKeyword
524 1.1 christos ',' UpdateRuleKeyword
525 1.1 christos ')' '{'
526 1.1 christos FieldUnitList '}' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$7,$9,$11,$14);}
527 1.1 christos | PARSEOP_INDEXFIELD '('
528 1.1 christos error ')' '{' error '}' {$$ = AslDoError(); yyclearin;}
529 1.1 christos ;
530 1.1 christos
531 1.1 christos IndexTerm
532 1.1 christos : PARSEOP_INDEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_INDEX);}
533 1.1 christos TermArg
534 1.1 christos TermArgItem
535 1.1 christos Target
536 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
537 1.1 christos | PARSEOP_INDEX '('
538 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
539 1.1 christos ;
540 1.1 christos
541 1.1 christos LAndTerm
542 1.1 christos : PARSEOP_LAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LAND);}
543 1.1 christos TermArg
544 1.1 christos TermArgItem
545 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
546 1.1 christos | PARSEOP_LAND '('
547 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
548 1.1 christos ;
549 1.1 christos
550 1.1 christos LEqualTerm
551 1.1 christos : PARSEOP_LEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
552 1.1 christos TermArg
553 1.1 christos TermArgItem
554 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
555 1.1 christos | PARSEOP_LEQUAL '('
556 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
557 1.1 christos ;
558 1.1 christos
559 1.1 christos LGreaterEqualTerm
560 1.1 christos : PARSEOP_LGREATEREQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
561 1.1 christos TermArg
562 1.1 christos TermArgItem
563 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
564 1.1 christos TrLinkChildren ($<n>3,2,$4,$5));}
565 1.1 christos | PARSEOP_LGREATEREQUAL '('
566 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
567 1.1 christos ;
568 1.1 christos
569 1.1 christos LGreaterTerm
570 1.1 christos : PARSEOP_LGREATER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
571 1.1 christos TermArg
572 1.1 christos TermArgItem
573 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
574 1.1 christos | PARSEOP_LGREATER '('
575 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
576 1.1 christos ;
577 1.1 christos
578 1.1 christos LLessEqualTerm
579 1.1 christos : PARSEOP_LLESSEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LGREATER);}
580 1.1 christos TermArg
581 1.1 christos TermArgItem
582 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
583 1.1 christos TrLinkChildren ($<n>3,2,$4,$5));}
584 1.1 christos | PARSEOP_LLESSEQUAL '('
585 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
586 1.1 christos ;
587 1.1 christos
588 1.1 christos LLessTerm
589 1.1 christos : PARSEOP_LLESS '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LLESS);}
590 1.1 christos TermArg
591 1.1 christos TermArgItem
592 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
593 1.1 christos | PARSEOP_LLESS '('
594 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
595 1.1 christos ;
596 1.1 christos
597 1.1 christos LNotEqualTerm
598 1.1 christos : PARSEOP_LNOTEQUAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LEQUAL);}
599 1.1 christos TermArg
600 1.1 christos TermArgItem
601 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_LNOT, 1,
602 1.1 christos TrLinkChildren ($<n>3,2,$4,$5));}
603 1.1 christos | PARSEOP_LNOTEQUAL '('
604 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
605 1.1 christos ;
606 1.1 christos
607 1.1 christos LNotTerm
608 1.1 christos : PARSEOP_LNOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LNOT);}
609 1.1 christos TermArg
610 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
611 1.1 christos | PARSEOP_LNOT '('
612 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
613 1.1 christos ;
614 1.1 christos
615 1.1 christos LoadTableTerm
616 1.1 christos : PARSEOP_LOADTABLE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOADTABLE);}
617 1.1 christos TermArg
618 1.1 christos TermArgItem
619 1.1 christos TermArgItem
620 1.1 christos OptionalListString
621 1.1 christos OptionalListString
622 1.1 christos OptionalReference
623 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
624 1.1 christos | PARSEOP_LOADTABLE '('
625 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
626 1.1 christos ;
627 1.1 christos
628 1.1 christos LoadTerm
629 1.1 christos : PARSEOP_LOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOAD);}
630 1.1 christos NameString
631 1.1 christos RequiredTarget
632 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
633 1.1 christos | PARSEOP_LOAD '('
634 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
635 1.1 christos ;
636 1.1 christos
637 1.1 christos LocalTerm
638 1.1 christos : PARSEOP_LOCAL0 {$$ = TrCreateLeafNode (PARSEOP_LOCAL0);}
639 1.1 christos | PARSEOP_LOCAL1 {$$ = TrCreateLeafNode (PARSEOP_LOCAL1);}
640 1.1 christos | PARSEOP_LOCAL2 {$$ = TrCreateLeafNode (PARSEOP_LOCAL2);}
641 1.1 christos | PARSEOP_LOCAL3 {$$ = TrCreateLeafNode (PARSEOP_LOCAL3);}
642 1.1 christos | PARSEOP_LOCAL4 {$$ = TrCreateLeafNode (PARSEOP_LOCAL4);}
643 1.1 christos | PARSEOP_LOCAL5 {$$ = TrCreateLeafNode (PARSEOP_LOCAL5);}
644 1.1 christos | PARSEOP_LOCAL6 {$$ = TrCreateLeafNode (PARSEOP_LOCAL6);}
645 1.1 christos | PARSEOP_LOCAL7 {$$ = TrCreateLeafNode (PARSEOP_LOCAL7);}
646 1.1 christos ;
647 1.1 christos
648 1.1 christos LOrTerm
649 1.1 christos : PARSEOP_LOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_LOR);}
650 1.1 christos TermArg
651 1.1 christos TermArgItem
652 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
653 1.1 christos | PARSEOP_LOR '('
654 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
655 1.1 christos ;
656 1.1 christos
657 1.1 christos MatchTerm
658 1.1 christos : PARSEOP_MATCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MATCH);}
659 1.1 christos TermArg
660 1.1 christos ',' MatchOpKeyword
661 1.1 christos TermArgItem
662 1.1 christos ',' MatchOpKeyword
663 1.1 christos TermArgItem
664 1.1 christos TermArgItem
665 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
666 1.1 christos | PARSEOP_MATCH '('
667 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
668 1.1 christos ;
669 1.1 christos
670 1.1 christos MethodTerm
671 1.1 christos : PARSEOP_METHOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_METHOD);}
672 1.1 christos NameString
673 1.1 christos OptionalByteConstExpr {UtCheckIntegerRange ($5, 0, 7);}
674 1.1 christos OptionalSerializeRuleKeyword
675 1.1 christos OptionalByteConstExpr
676 1.1 christos OptionalParameterTypePackage
677 1.1 christos OptionalParameterTypesPackage
678 1.1 christos ')' '{'
679 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,7,
680 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
681 1.1 christos $5,$7,$8,$9,$10,$13);}
682 1.1 christos | PARSEOP_METHOD '('
683 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
684 1.1 christos ;
685 1.1 christos
686 1.1 christos MidTerm
687 1.1 christos : PARSEOP_MID '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MID);}
688 1.1 christos TermArg
689 1.1 christos TermArgItem
690 1.1 christos TermArgItem
691 1.1 christos Target
692 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,4,$4,$5,$6,$7);}
693 1.1 christos | PARSEOP_MID '('
694 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
695 1.1 christos ;
696 1.1 christos
697 1.1 christos ModTerm
698 1.1 christos : PARSEOP_MOD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MOD);}
699 1.1 christos TermArg
700 1.1 christos TermArgItem
701 1.1 christos Target
702 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
703 1.1 christos | PARSEOP_MOD '('
704 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
705 1.1 christos ;
706 1.1 christos
707 1.1 christos MultiplyTerm
708 1.1 christos : PARSEOP_MULTIPLY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MULTIPLY);}
709 1.1 christos TermArg
710 1.1 christos TermArgItem
711 1.1 christos Target
712 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
713 1.1 christos | PARSEOP_MULTIPLY '('
714 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
715 1.1 christos ;
716 1.1 christos
717 1.1 christos MutexTerm
718 1.1 christos : PARSEOP_MUTEX '(' {$<n>$ = TrCreateLeafNode (PARSEOP_MUTEX);}
719 1.1 christos NameString
720 1.1 christos ',' ByteConstExpr
721 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,
722 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
723 1.1 christos | PARSEOP_MUTEX '('
724 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
725 1.1 christos ;
726 1.1 christos
727 1.1 christos NameTerm
728 1.1 christos : PARSEOP_NAME '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAME);}
729 1.1 christos NameString
730 1.1 christos ',' DataObject
731 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,
732 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$6);}
733 1.1 christos | PARSEOP_NAME '('
734 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
735 1.1 christos ;
736 1.1 christos
737 1.1 christos NAndTerm
738 1.1 christos : PARSEOP_NAND '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NAND);}
739 1.1 christos TermArg
740 1.1 christos TermArgItem
741 1.1 christos Target
742 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
743 1.1 christos | PARSEOP_NAND '('
744 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
745 1.1 christos ;
746 1.1 christos
747 1.1 christos NoOpTerm
748 1.1 christos : PARSEOP_NOOP {$$ = TrCreateNode (PARSEOP_NOOP, 0);}
749 1.1 christos ;
750 1.1 christos
751 1.1 christos NOrTerm
752 1.1 christos : PARSEOP_NOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOR);}
753 1.1 christos TermArg
754 1.1 christos TermArgItem
755 1.1 christos Target
756 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
757 1.1 christos | PARSEOP_NOR '('
758 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
759 1.1 christos ;
760 1.1 christos
761 1.1 christos NotifyTerm
762 1.1 christos : PARSEOP_NOTIFY '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOTIFY);}
763 1.1 christos SuperName
764 1.1 christos TermArgItem
765 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
766 1.1 christos | PARSEOP_NOTIFY '('
767 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
768 1.1 christos ;
769 1.1 christos
770 1.1 christos NotTerm
771 1.1 christos : PARSEOP_NOT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_NOT);}
772 1.1 christos TermArg
773 1.1 christos Target
774 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
775 1.1 christos | PARSEOP_NOT '('
776 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
777 1.1 christos ;
778 1.1 christos
779 1.1 christos ObjectTypeTerm
780 1.1 christos : PARSEOP_OBJECTTYPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OBJECTTYPE);}
781 1.1 christos ObjectTypeName
782 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
783 1.1 christos | PARSEOP_OBJECTTYPE '('
784 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
785 1.1 christos ;
786 1.1 christos
787 1.1 christos OffsetTerm
788 1.1 christos : PARSEOP_OFFSET '('
789 1.1 christos AmlPackageLengthTerm
790 1.1 christos ')' {$$ = TrCreateNode (PARSEOP_OFFSET,1,$3);}
791 1.1 christos | PARSEOP_OFFSET '('
792 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
793 1.1 christos ;
794 1.1 christos
795 1.1 christos OpRegionTerm
796 1.1 christos : PARSEOP_OPERATIONREGION '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OPERATIONREGION);}
797 1.1 christos NameString
798 1.1 christos ',' OpRegionSpaceIdTerm
799 1.1 christos TermArgItem
800 1.1 christos TermArgItem
801 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,4,
802 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
803 1.1 christos $6,$7,$8);}
804 1.1 christos | PARSEOP_OPERATIONREGION '('
805 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
806 1.1 christos ;
807 1.1 christos
808 1.1 christos OpRegionSpaceIdTerm
809 1.1 christos : RegionSpaceKeyword {}
810 1.1 christos | ByteConst {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
811 1.1 christos ;
812 1.1 christos
813 1.1 christos OrTerm
814 1.1 christos : PARSEOP_OR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_OR);}
815 1.1 christos TermArg
816 1.1 christos TermArgItem
817 1.1 christos Target
818 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
819 1.1 christos | PARSEOP_OR '('
820 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
821 1.1 christos ;
822 1.1 christos
823 1.1 christos PackageTerm
824 1.1 christos : PARSEOP_PACKAGE {$<n>$ = TrCreateLeafNode (PARSEOP_VAR_PACKAGE);}
825 1.1 christos OptionalDataCount
826 1.1 christos '{' PackageList '}' {$$ = TrLinkChildren ($<n>2,2,$3,$5);}
827 1.1 christos
828 1.1 christos PowerResTerm
829 1.1 christos : PARSEOP_POWERRESOURCE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_POWERRESOURCE);}
830 1.1 christos NameString
831 1.1 christos ',' ByteConstExpr
832 1.1 christos ',' WordConstExpr
833 1.1 christos ')' '{'
834 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,4,
835 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
836 1.1 christos $6,$8,$11);}
837 1.1 christos | PARSEOP_POWERRESOURCE '('
838 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
839 1.1 christos ;
840 1.1 christos
841 1.1 christos PrintfTerm
842 1.1 christos : PARSEOP_PRINTF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PRINTF);}
843 1.1 christos StringData
844 1.1 christos PrintfArgList
845 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
846 1.1 christos | PARSEOP_PRINTF '('
847 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
848 1.1 christos ;
849 1.1 christos
850 1.1 christos PrintfArgList
851 1.1 christos : {$$ = NULL;}
852 1.1 christos | TermArg {$$ = $1;}
853 1.1 christos | PrintfArgList ','
854 1.1 christos TermArg {$$ = TrLinkPeerNode ($1, $3);}
855 1.1 christos ;
856 1.1 christos
857 1.1 christos ProcessorTerm
858 1.1 christos : PARSEOP_PROCESSOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_PROCESSOR);}
859 1.1 christos NameString
860 1.1 christos ',' ByteConstExpr
861 1.1 christos OptionalDWordConstExpr
862 1.1 christos OptionalByteConstExpr
863 1.1 christos ')' '{'
864 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,5,
865 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),
866 1.1 christos $6,$7,$8,$11);}
867 1.1 christos | PARSEOP_PROCESSOR '('
868 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
869 1.1 christos ;
870 1.1 christos
871 1.1 christos RawDataBufferTerm
872 1.1 christos : PARSEOP_DATABUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_DATABUFFER);}
873 1.1 christos OptionalWordConst
874 1.1 christos ')' '{'
875 1.1 christos ByteList '}' {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
876 1.1 christos | PARSEOP_DATABUFFER '('
877 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
878 1.1 christos ;
879 1.1 christos
880 1.1 christos /*
881 1.1 christos * In RefOf, the node isn't really a target, but we can't keep track of it after
882 1.1 christos * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
883 1.1 christos */
884 1.1 christos RefOfTerm
885 1.1 christos : PARSEOP_REFOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_REFOF);}
886 1.1 christos SuperName
887 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,
888 1.1 christos TrSetNodeFlags ($4, NODE_IS_TARGET));}
889 1.1 christos | PARSEOP_REFOF '('
890 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
891 1.1 christos ;
892 1.1 christos
893 1.1 christos ReleaseTerm
894 1.1 christos : PARSEOP_RELEASE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RELEASE);}
895 1.1 christos SuperName
896 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
897 1.1 christos | PARSEOP_RELEASE '('
898 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
899 1.1 christos ;
900 1.1 christos
901 1.1 christos ResetTerm
902 1.1 christos : PARSEOP_RESET '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RESET);}
903 1.1 christos SuperName
904 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
905 1.1 christos | PARSEOP_RESET '('
906 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
907 1.1 christos ;
908 1.1 christos
909 1.1 christos ReturnTerm
910 1.1 christos : PARSEOP_RETURN '(' {$<n>$ = TrCreateLeafNode (PARSEOP_RETURN);}
911 1.1 christos OptionalReturnArg
912 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
913 1.1 christos | PARSEOP_RETURN {$$ = TrLinkChildren (
914 1.1 christos TrCreateLeafNode (PARSEOP_RETURN),1,
915 1.1 christos TrSetNodeFlags (TrCreateLeafNode (PARSEOP_ZERO),
916 1.1 christos NODE_IS_NULL_RETURN));}
917 1.1 christos | PARSEOP_RETURN '('
918 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
919 1.1 christos ;
920 1.1 christos
921 1.1 christos ScopeTerm
922 1.1 christos : PARSEOP_SCOPE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SCOPE);}
923 1.1 christos NameString
924 1.1 christos ')' '{'
925 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,2,
926 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
927 1.1 christos | PARSEOP_SCOPE '('
928 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
929 1.1 christos ;
930 1.1 christos
931 1.1 christos ShiftLeftTerm
932 1.1 christos : PARSEOP_SHIFTLEFT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTLEFT);}
933 1.1 christos TermArg
934 1.1 christos TermArgItem
935 1.1 christos Target
936 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
937 1.1 christos | PARSEOP_SHIFTLEFT '('
938 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
939 1.1 christos ;
940 1.1 christos
941 1.1 christos ShiftRightTerm
942 1.1 christos : PARSEOP_SHIFTRIGHT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SHIFTRIGHT);}
943 1.1 christos TermArg
944 1.1 christos TermArgItem
945 1.1 christos Target
946 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
947 1.1 christos | PARSEOP_SHIFTRIGHT '('
948 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
949 1.1 christos ;
950 1.1 christos
951 1.1 christos SignalTerm
952 1.1 christos : PARSEOP_SIGNAL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIGNAL);}
953 1.1 christos SuperName
954 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
955 1.1 christos | PARSEOP_SIGNAL '('
956 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
957 1.1 christos ;
958 1.1 christos
959 1.1 christos SizeOfTerm
960 1.1 christos : PARSEOP_SIZEOF '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SIZEOF);}
961 1.1 christos SuperName
962 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
963 1.1 christos | PARSEOP_SIZEOF '('
964 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
965 1.1 christos ;
966 1.1 christos
967 1.1 christos SleepTerm
968 1.1 christos : PARSEOP_SLEEP '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SLEEP);}
969 1.1 christos TermArg
970 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
971 1.1 christos | PARSEOP_SLEEP '('
972 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
973 1.1 christos ;
974 1.1 christos
975 1.1 christos StallTerm
976 1.1 christos : PARSEOP_STALL '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STALL);}
977 1.1 christos TermArg
978 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
979 1.1 christos | PARSEOP_STALL '('
980 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
981 1.1 christos ;
982 1.1 christos
983 1.1 christos StoreTerm
984 1.1 christos : PARSEOP_STORE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_STORE);}
985 1.1 christos TermArg
986 1.1 christos ',' SuperName
987 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,
988 1.1 christos TrSetNodeFlags ($6, NODE_IS_TARGET));}
989 1.1 christos | PARSEOP_STORE '('
990 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
991 1.1 christos ;
992 1.1 christos
993 1.1 christos SubtractTerm
994 1.1 christos : PARSEOP_SUBTRACT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SUBTRACT);}
995 1.1 christos TermArg
996 1.1 christos TermArgItem
997 1.1 christos Target
998 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
999 1.1 christos | PARSEOP_SUBTRACT '('
1000 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1001 1.1 christos ;
1002 1.1 christos
1003 1.1 christos SwitchTerm
1004 1.1 christos : PARSEOP_SWITCH '(' {$<n>$ = TrCreateLeafNode (PARSEOP_SWITCH);}
1005 1.1 christos TermArg
1006 1.1 christos ')' '{'
1007 1.1 christos CaseDefaultTermList '}'
1008 1.1 christos {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1009 1.1 christos | PARSEOP_SWITCH '('
1010 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1011 1.1 christos ;
1012 1.1 christos
1013 1.1 christos ThermalZoneTerm
1014 1.1 christos : PARSEOP_THERMALZONE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_THERMALZONE);}
1015 1.1 christos NameString
1016 1.1 christos ')' '{'
1017 1.1 christos TermList '}' {$$ = TrLinkChildren ($<n>3,2,
1018 1.1 christos TrSetNodeFlags ($4, NODE_IS_NAME_DECLARATION),$7);}
1019 1.1 christos | PARSEOP_THERMALZONE '('
1020 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1021 1.1 christos ;
1022 1.1 christos
1023 1.1 christos TimerTerm
1024 1.1 christos : PARSEOP_TIMER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TIMER);}
1025 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,0);}
1026 1.1 christos | PARSEOP_TIMER {$$ = TrLinkChildren (
1027 1.1 christos TrCreateLeafNode (PARSEOP_TIMER),0);}
1028 1.1 christos | PARSEOP_TIMER '('
1029 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1030 1.1 christos ;
1031 1.1 christos
1032 1.1 christos ToBCDTerm
1033 1.1 christos : PARSEOP_TOBCD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBCD);}
1034 1.1 christos TermArg
1035 1.1 christos Target
1036 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1037 1.1 christos | PARSEOP_TOBCD '('
1038 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1039 1.1 christos ;
1040 1.1 christos
1041 1.1 christos ToBufferTerm
1042 1.1 christos : PARSEOP_TOBUFFER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOBUFFER);}
1043 1.1 christos TermArg
1044 1.1 christos Target
1045 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1046 1.1 christos | PARSEOP_TOBUFFER '('
1047 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1048 1.1 christos ;
1049 1.1 christos
1050 1.1 christos ToDecimalStringTerm
1051 1.1 christos : PARSEOP_TODECIMALSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TODECIMALSTRING);}
1052 1.1 christos TermArg
1053 1.1 christos Target
1054 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1055 1.1 christos | PARSEOP_TODECIMALSTRING '('
1056 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1057 1.1 christos ;
1058 1.1 christos
1059 1.1 christos ToHexStringTerm
1060 1.1 christos : PARSEOP_TOHEXSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOHEXSTRING);}
1061 1.1 christos TermArg
1062 1.1 christos Target
1063 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1064 1.1 christos | PARSEOP_TOHEXSTRING '('
1065 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1066 1.1 christos ;
1067 1.1 christos
1068 1.1 christos ToIntegerTerm
1069 1.1 christos : PARSEOP_TOINTEGER '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOINTEGER);}
1070 1.1 christos TermArg
1071 1.1 christos Target
1072 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1073 1.1 christos | PARSEOP_TOINTEGER '('
1074 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1075 1.1 christos ;
1076 1.1 christos
1077 1.1 christos ToPLDTerm
1078 1.1 christos : PARSEOP_TOPLD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOPLD);}
1079 1.1 christos PldKeywordList
1080 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1081 1.1 christos | PARSEOP_TOPLD '('
1082 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1083 1.1 christos ;
1084 1.1 christos
1085 1.1 christos PldKeywordList
1086 1.1 christos : {$$ = NULL;}
1087 1.1 christos | PldKeyword
1088 1.1 christos PARSEOP_EXP_EQUALS Integer {$$ = TrLinkChildren ($1,1,$3);}
1089 1.1 christos | PldKeyword
1090 1.1 christos PARSEOP_EXP_EQUALS String {$$ = TrLinkChildren ($1,1,$3);}
1091 1.1 christos | PldKeywordList ',' /* Allows a trailing comma at list end */
1092 1.1 christos | PldKeywordList ','
1093 1.1 christos PldKeyword
1094 1.1 christos PARSEOP_EXP_EQUALS Integer {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
1095 1.1 christos | PldKeywordList ','
1096 1.1 christos PldKeyword
1097 1.1 christos PARSEOP_EXP_EQUALS String {$$ = TrLinkPeerNode ($1,TrLinkChildren ($3,1,$5));}
1098 1.1 christos ;
1099 1.1 christos
1100 1.1 christos
1101 1.1 christos ToStringTerm
1102 1.1 christos : PARSEOP_TOSTRING '(' {$<n>$ = TrCreateLeafNode (PARSEOP_TOSTRING);}
1103 1.1 christos TermArg
1104 1.1 christos OptionalCount
1105 1.1 christos Target
1106 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1107 1.1 christos | PARSEOP_TOSTRING '('
1108 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1109 1.1 christos ;
1110 1.1 christos
1111 1.1 christos ToUUIDTerm
1112 1.1 christos : PARSEOP_TOUUID '('
1113 1.1 christos StringData ')' {$$ = TrUpdateNode (PARSEOP_TOUUID, $3);}
1114 1.1 christos | PARSEOP_TOUUID '('
1115 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1116 1.1 christos ;
1117 1.1 christos
1118 1.1 christos UnicodeTerm
1119 1.1 christos : PARSEOP_UNICODE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNICODE);}
1120 1.1 christos StringData
1121 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,0,$4);}
1122 1.1 christos | PARSEOP_UNICODE '('
1123 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1124 1.1 christos ;
1125 1.1 christos
1126 1.1 christos UnloadTerm
1127 1.1 christos : PARSEOP_UNLOAD '(' {$<n>$ = TrCreateLeafNode (PARSEOP_UNLOAD);}
1128 1.1 christos SuperName
1129 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,1,$4);}
1130 1.1 christos | PARSEOP_UNLOAD '('
1131 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1132 1.1 christos ;
1133 1.1 christos
1134 1.1 christos WaitTerm
1135 1.1 christos : PARSEOP_WAIT '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WAIT);}
1136 1.1 christos SuperName
1137 1.1 christos TermArgItem
1138 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,2,$4,$5);}
1139 1.1 christos | PARSEOP_WAIT '('
1140 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1141 1.1 christos ;
1142 1.1 christos
1143 1.1 christos XOrTerm
1144 1.1 christos : PARSEOP_XOR '(' {$<n>$ = TrCreateLeafNode (PARSEOP_XOR);}
1145 1.1 christos TermArg
1146 1.1 christos TermArgItem
1147 1.1 christos Target
1148 1.1 christos ')' {$$ = TrLinkChildren ($<n>3,3,$4,$5,$6);}
1149 1.1 christos | PARSEOP_XOR '('
1150 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1151 1.1 christos ;
1152 1.1 christos
1153 1.1 christos WhileTerm
1154 1.1 christos : PARSEOP_WHILE '(' {$<n>$ = TrCreateLeafNode (PARSEOP_WHILE);}
1155 1.1 christos TermArg
1156 1.1 christos ')' '{' TermList '}'
1157 1.1 christos {$$ = TrLinkChildren ($<n>3,2,$4,$7);}
1158 1.1 christos | PARSEOP_WHILE '('
1159 1.1 christos error ')' {$$ = AslDoError(); yyclearin;}
1160 1.1 christos ;
1161