xref: /freebsd/sys/contrib/dev/acpica/compiler/aslprimaries.y (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1 NoEcho('
2 /******************************************************************************
3  *
4  * Module Name: aslprimaries.y - Rules for primary ASL operators
5  *                             - Keep this file synched with the
6  *                               CvParseOpBlockType function in cvcompiler.c
7  *
8  *****************************************************************************/
9 
10 /******************************************************************************
11  *
12  * 1. Copyright Notice
13  *
14  * Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
15  * All rights reserved.
16  *
17  * 2. License
18  *
19  * 2.1. This is your license from Intel Corp. under its intellectual property
20  * rights. You may have additional license terms from the party that provided
21  * you this software, covering your right to use that party's intellectual
22  * property rights.
23  *
24  * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a
25  * copy of the source code appearing in this file ("Covered Code") an
26  * irrevocable, perpetual, worldwide license under Intel's copyrights in the
27  * base code distributed originally by Intel ("Original Intel Code") to copy,
28  * make derivatives, distribute, use and display any portion of the Covered
29  * Code in any form, with the right to sublicense such rights; and
30  *
31  * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent
32  * license (with the right to sublicense), under only those claims of Intel
33  * patents that are infringed by the Original Intel Code, to make, use, sell,
34  * offer to sell, and import the Covered Code and derivative works thereof
35  * solely to the minimum extent necessary to exercise the above copyright
36  * license, and in no event shall the patent license extend to any additions
37  * to or modifications of the Original Intel Code. No other license or right
38  * is granted directly or by implication, estoppel or otherwise;
39  *
40  * The above copyright and patent license is granted only if the following
41  * conditions are met:
42  *
43  * 3. Conditions
44  *
45  * 3.1. Redistribution of Source with Rights to Further Distribute Source.
46  * Redistribution of source code of any substantial portion of the Covered
47  * Code or modification with rights to further distribute source must include
48  * the above Copyright Notice, the above License, this list of Conditions,
49  * and the following Disclaimer and Export Compliance provision. In addition,
50  * Licensee must cause all Covered Code to which Licensee contributes to
51  * contain a file documenting the changes Licensee made to create that Covered
52  * Code and the date of any change. Licensee must include in that file the
53  * documentation of any changes made by any predecessor Licensee. Licensee
54  * must include a prominent statement that the modification is derived,
55  * directly or indirectly, from Original Intel Code.
56  *
57  * 3.2. Redistribution of Source with no Rights to Further Distribute Source.
58  * Redistribution of source code of any substantial portion of the Covered
59  * Code or modification without rights to further distribute source must
60  * include the following Disclaimer and Export Compliance provision in the
61  * documentation and/or other materials provided with distribution. In
62  * addition, Licensee may not authorize further sublicense of source of any
63  * portion of the Covered Code, and must include terms to the effect that the
64  * license from Licensee to its licensee is limited to the intellectual
65  * property embodied in the software Licensee provides to its licensee, and
66  * not to intellectual property embodied in modifications its licensee may
67  * make.
68  *
69  * 3.3. Redistribution of Executable. Redistribution in executable form of any
70  * substantial portion of the Covered Code or modification must reproduce the
71  * above Copyright Notice, and the following Disclaimer and Export Compliance
72  * provision in the documentation and/or other materials provided with the
73  * distribution.
74  *
75  * 3.4. Intel retains all right, title, and interest in and to the Original
76  * Intel Code.
77  *
78  * 3.5. Neither the name Intel nor any other trademark owned or controlled by
79  * Intel shall be used in advertising or otherwise to promote the sale, use or
80  * other dealings in products derived from or relating to the Covered Code
81  * without prior written authorization from Intel.
82  *
83  * 4. Disclaimer and Export Compliance
84  *
85  * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED
86  * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE
87  * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE,
88  * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY
89  * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY
90  * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A
91  * PARTICULAR PURPOSE.
92  *
93  * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES
94  * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR
95  * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT,
96  * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY
97  * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL
98  * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS
99  * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY
100  * LIMITED REMEDY.
101  *
102  * 4.3. Licensee shall not export, either directly or indirectly, any of this
103  * software or system incorporating such software without first obtaining any
104  * required license or other approval from the U. S. Department of Commerce or
105  * any other agency or department of the United States Government. In the
106  * event Licensee exports any such software from the United States or
107  * re-exports any such software from a foreign destination, Licensee shall
108  * ensure that the distribution and export/re-export of the software is in
109  * compliance with all laws, regulations, orders, or other restrictions of the
110  * U.S. Export Administration Regulations. Licensee agrees that neither it nor
111  * any of its subsidiaries will export/re-export any technical data, process,
112  * software, or service, directly or indirectly, to any country for which the
113  * United States government or any agency thereof requires an export license,
114  * other governmental approval, or letter of assurance, without first obtaining
115  * such license, approval or letter.
116  *
117  *****************************************************************************
118  *
119  * Alternatively, you may choose to be licensed under the terms of the
120  * following license:
121  *
122  * Redistribution and use in source and binary forms, with or without
123  * modification, are permitted provided that the following conditions
124  * are met:
125  * 1. Redistributions of source code must retain the above copyright
126  *    notice, this list of conditions, and the following disclaimer,
127  *    without modification.
128  * 2. Redistributions in binary form must reproduce at minimum a disclaimer
129  *    substantially similar to the "NO WARRANTY" disclaimer below
130  *    ("Disclaimer") and any redistribution must be conditioned upon
131  *    including a substantially similar Disclaimer requirement for further
132  *    binary redistribution.
133  * 3. Neither the names of the above-listed copyright holders nor the names
134  *    of any contributors may be used to endorse or promote products derived
135  *    from this software without specific prior written permission.
136  *
137  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
138  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
139  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
140  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
141  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
142  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
143  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
144  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
145  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
146  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
147  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
148  *
149  * Alternatively, you may choose to be licensed under the terms of the
150  * GNU General Public License ("GPL") version 2 as published by the Free
151  * Software Foundation.
152  *
153  *****************************************************************************/
154 
155 ')
156 
157 
158 /*******************************************************************************
159  *
160  * ASL Primary Terms
161  *
162  ******************************************************************************/
163 
164 AccessAsTerm
165     : PARSEOP_ACCESSAS
166         PARSEOP_OPEN_PAREN
167         AccessTypeKeyword
168         OptionalAccessAttribTerm
169         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_ACCESSAS,2,$3,$4);}
170     | PARSEOP_ACCESSAS
171         PARSEOP_OPEN_PAREN
172         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
173     ;
174 
175 AcquireTerm
176     : PARSEOP_ACQUIRE
177         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp(PARSEOP_ACQUIRE);}
178         SuperName
179         ',' WordConstExpr
180         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$6);}
181     | PARSEOP_ACQUIRE
182         PARSEOP_OPEN_PAREN
183         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
184     ;
185 
186 AddTerm
187     : PARSEOP_ADD
188         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_ADD);}
189         TermArg
190         TermArgItem
191         Target
192         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
193     | PARSEOP_ADD
194         PARSEOP_OPEN_PAREN
195         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
196     ;
197 
198 AliasTerm
199     : PARSEOP_ALIAS
200         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_ALIAS);}
201         NameString
202         NameStringItem
203         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,
204                                         TrSetOpFlags ($5, OP_IS_NAME_DECLARATION));}
205     | PARSEOP_ALIAS
206         PARSEOP_OPEN_PAREN
207         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
208     ;
209 
210 AndTerm
211     : PARSEOP_AND
212         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_AND);}
213         TermArg
214         TermArgItem
215         Target
216         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
217     | PARSEOP_AND
218         PARSEOP_OPEN_PAREN
219         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
220     ;
221 
222 ArgTerm
223     : PARSEOP_ARG0                  {$$ = TrCreateLeafOp (PARSEOP_ARG0);}
224     | PARSEOP_ARG1                  {$$ = TrCreateLeafOp (PARSEOP_ARG1);}
225     | PARSEOP_ARG2                  {$$ = TrCreateLeafOp (PARSEOP_ARG2);}
226     | PARSEOP_ARG3                  {$$ = TrCreateLeafOp (PARSEOP_ARG3);}
227     | PARSEOP_ARG4                  {$$ = TrCreateLeafOp (PARSEOP_ARG4);}
228     | PARSEOP_ARG5                  {$$ = TrCreateLeafOp (PARSEOP_ARG5);}
229     | PARSEOP_ARG6                  {$$ = TrCreateLeafOp (PARSEOP_ARG6);}
230     ;
231 
232 BankFieldTerm
233     : PARSEOP_BANKFIELD
234         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_BANKFIELD);}
235         NameString
236         NameStringItem
237         TermArgItem
238         OptionalAccessTypeKeyword
239         OptionalLockRuleKeyword
240         OptionalUpdateRuleKeyword
241         PARSEOP_CLOSE_PAREN '{'
242             FieldUnitList '}'       {$$ = TrLinkOpChildren ($<n>3,7,
243                                         $4,$5,$6,$7,$8,$9,$12);}
244     | PARSEOP_BANKFIELD
245         PARSEOP_OPEN_PAREN
246         error PARSEOP_CLOSE_PAREN
247         '{' error '}'               {$$ = AslDoError(); yyclearin;}
248     ;
249 
250 BreakTerm
251     : PARSEOP_BREAK                 {$$ = TrCreateOp (PARSEOP_BREAK, 0);}
252     ;
253 
254 BreakPointTerm
255     : PARSEOP_BREAKPOINT            {$$ = TrCreateOp (PARSEOP_BREAKPOINT, 0);}
256     ;
257 
258 BufferTerm
259     : PARSEOP_BUFFER                {$<n>$ = TrCreateLeafOp (PARSEOP_BUFFER); COMMENT_CAPTURE_OFF; }
260         OptionalDataCount
261         '{' BufferTermData '}'      {$$ = TrLinkOpChildren ($<n>2,2,$3,$5); COMMENT_CAPTURE_ON;}
262     ;
263 
264 BufferTermData
265     : ByteList                      {}
266     | StringData                    {}
267     ;
268 
269 CaseTerm
270     : PARSEOP_CASE
271         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CASE);}
272         DataObject
273         PARSEOP_CLOSE_PAREN '{'
274             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
275     | PARSEOP_CASE
276         PARSEOP_OPEN_PAREN
277         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
278     ;
279 
280 ConcatTerm
281     : PARSEOP_CONCATENATE
282         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CONCATENATE);}
283         TermArg
284         TermArgItem
285         Target
286         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
287     | PARSEOP_CONCATENATE
288         PARSEOP_OPEN_PAREN
289         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
290     ;
291 
292 ConcatResTerm
293     : PARSEOP_CONCATENATERESTEMPLATE
294         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (
295                                         PARSEOP_CONCATENATERESTEMPLATE);}
296         TermArg
297         TermArgItem
298         Target
299         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
300     | PARSEOP_CONCATENATERESTEMPLATE
301         PARSEOP_OPEN_PAREN
302         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
303     ;
304 
305 CondRefOfTerm
306     : PARSEOP_CONDREFOF
307         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CONDREFOF);}
308         CondRefOfSource
309         Target
310         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
311     | PARSEOP_CONDREFOF
312         PARSEOP_OPEN_PAREN
313         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
314     ;
315 
316 ConnectionTerm
317     : PARSEOP_CONNECTION
318         PARSEOP_OPEN_PAREN
319         NameString
320         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_CONNECTION,1,$3);}
321     | PARSEOP_CONNECTION
322         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CONNECTION);}
323         ResourceMacroTerm
324         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3, 1,
325                                         TrLinkOpChildren (
326                                             TrCreateLeafOp (PARSEOP_RESOURCETEMPLATE), 3,
327                                             TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
328                                             TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
329                                             $4));}
330     | PARSEOP_CONNECTION
331         PARSEOP_OPEN_PAREN
332         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
333     ;
334 
335 ContinueTerm
336     : PARSEOP_CONTINUE              {$$ = TrCreateOp (PARSEOP_CONTINUE, 0);}
337     ;
338 
339 CopyObjectTerm
340     : PARSEOP_COPYOBJECT
341         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_COPYOBJECT);}
342         TermArg
343         ',' SimpleName
344         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,
345                                         TrSetOpFlags ($6, OP_IS_TARGET));}
346     | PARSEOP_COPYOBJECT
347         PARSEOP_OPEN_PAREN
348         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
349     ;
350 
351 CreateBitFieldTerm
352     : PARSEOP_CREATEBITFIELD
353         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBITFIELD);}
354         TermArg
355         TermArgItem
356         NameStringItem
357         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
358                                         TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
359     | PARSEOP_CREATEBITFIELD
360         PARSEOP_OPEN_PAREN
361         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
362     ;
363 
364 CreateByteFieldTerm
365     : PARSEOP_CREATEBYTEFIELD
366         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEBYTEFIELD);}
367         TermArg
368         TermArgItem
369         NameStringItem
370         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
371                                         TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
372     | PARSEOP_CREATEBYTEFIELD
373         PARSEOP_OPEN_PAREN
374         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
375     ;
376 
377 CreateDWordFieldTerm
378     : PARSEOP_CREATEDWORDFIELD
379         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEDWORDFIELD);}
380         TermArg
381         TermArgItem
382         NameStringItem
383         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
384                                         TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
385     | PARSEOP_CREATEDWORDFIELD
386         PARSEOP_OPEN_PAREN
387         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
388     ;
389 
390 CreateFieldTerm
391     : PARSEOP_CREATEFIELD
392         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEFIELD);}
393         TermArg
394         TermArgItem
395         TermArgItem
396         NameStringItem
397         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,
398                                         TrSetOpFlags ($7, OP_IS_NAME_DECLARATION));}
399     | PARSEOP_CREATEFIELD
400         PARSEOP_OPEN_PAREN
401         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
402     ;
403 
404 CreateQWordFieldTerm
405     : PARSEOP_CREATEQWORDFIELD
406         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEQWORDFIELD);}
407         TermArg
408         TermArgItem
409         NameStringItem
410         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
411                                         TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
412     | PARSEOP_CREATEQWORDFIELD
413         PARSEOP_OPEN_PAREN
414         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
415     ;
416 
417 CreateWordFieldTerm
418     : PARSEOP_CREATEWORDFIELD
419         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CREATEWORDFIELD);}
420         TermArg
421         TermArgItem
422         NameStringItem
423         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,
424                                         TrSetOpFlags ($6, OP_IS_NAME_DECLARATION));}
425     | PARSEOP_CREATEWORDFIELD
426         PARSEOP_OPEN_PAREN
427         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
428     ;
429 
430 DataRegionTerm
431     : PARSEOP_DATATABLEREGION
432         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DATATABLEREGION);}
433         NameString
434         TermArgItem
435         TermArgItem
436         TermArgItem
437         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,
438                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5,$6,$7);}
439     | PARSEOP_DATATABLEREGION
440         PARSEOP_OPEN_PAREN
441         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
442     ;
443 
444 DebugTerm
445     : PARSEOP_DEBUG                 {$$ = TrCreateLeafOp (PARSEOP_DEBUG);}
446     ;
447 
448 DecTerm
449     : PARSEOP_DECREMENT
450         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DECREMENT);}
451         SuperName
452         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
453     | PARSEOP_DECREMENT
454         PARSEOP_OPEN_PAREN
455         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
456     ;
457 
458 DefaultTerm
459     : PARSEOP_DEFAULT '{'           {$<n>$ = TrCreateLeafOp (PARSEOP_DEFAULT);}
460         TermList '}'                {$$ = TrLinkOpChildren ($<n>3,1,$4);}
461     | PARSEOP_DEFAULT '{'
462         error '}'                   {$$ = AslDoError(); yyclearin;}
463     ;
464 
465 DerefOfTerm
466     : PARSEOP_DEREFOF
467         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DEREFOF);}
468         DerefOfSource
469         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
470     | PARSEOP_DEREFOF
471         PARSEOP_OPEN_PAREN
472         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
473     ;
474 
475 DeviceTerm
476     : PARSEOP_DEVICE
477         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DEVICE);}
478         NameString
479         PARSEOP_CLOSE_PAREN '{'
480             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,2,
481                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
482     | PARSEOP_DEVICE
483         PARSEOP_OPEN_PAREN
484         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
485     ;
486 
487 DivideTerm
488     : PARSEOP_DIVIDE
489         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DIVIDE);}
490         TermArg
491         TermArgItem
492         Target
493         Target
494         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
495     | PARSEOP_DIVIDE
496         PARSEOP_OPEN_PAREN
497         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
498     ;
499 
500 EISAIDTerm
501     : PARSEOP_EISAID
502         PARSEOP_OPEN_PAREN
503         StringLiteral
504         PARSEOP_CLOSE_PAREN         {$$ = TrSetOpIntegerValue (PARSEOP_EISAID, $3);}
505     | PARSEOP_EISAID
506         PARSEOP_OPEN_PAREN
507         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
508     ;
509 
510 ElseIfTerm
511     : IfTerm ElseTerm               {$$ = TrLinkPeerOp ($1,$2);}
512     ;
513 
514 ElseTerm
515     :                               {$$ = NULL;}
516     | PARSEOP_ELSE '{'
517         TermList           {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
518         '}'                {$$ = TrLinkOpChildren ($<n>4,1,$3);}
519 
520     | PARSEOP_ELSE '{'
521         error '}'                   {$$ = AslDoError(); yyclearin;}
522 
523     | PARSEOP_ELSE
524         error                       {$$ = AslDoError(); yyclearin;}
525 
526     | PARSEOP_ELSEIF
527         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_ELSE);}
528         TermArg                     {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
529         PARSEOP_CLOSE_PAREN '{'
530             TermList '}'            {TrLinkOpChildren ($<n>5,2,$4,$8);}
531         ElseTerm                    {TrLinkPeerOp ($<n>5,$11);}
532                                     {$$ = TrLinkOpChildren ($<n>3,1,$<n>5);}
533 
534     | PARSEOP_ELSEIF
535         PARSEOP_OPEN_PAREN
536         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
537 
538     | PARSEOP_ELSEIF
539         error                       {$$ = AslDoError(); yyclearin;}
540     ;
541 
542 EventTerm
543     : PARSEOP_EVENT
544         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_EVENT);}
545         NameString
546         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,
547                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION));}
548     | PARSEOP_EVENT
549         PARSEOP_OPEN_PAREN
550         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
551     ;
552 
553 ExternalTerm
554     : PARSEOP_EXTERNAL
555         PARSEOP_OPEN_PAREN
556         NameString
557         OptionalObjectTypeKeyword
558         OptionalParameterTypePackage
559         OptionalParameterTypesPackage
560         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_EXTERNAL,4,$3,$4,$5,$6);}
561     | PARSEOP_EXTERNAL
562         PARSEOP_OPEN_PAREN
563         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
564     ;
565 
566 FatalTerm
567     : PARSEOP_FATAL
568         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FATAL);}
569         ByteConstExpr
570         ',' DWordConstExpr
571         TermArgItem
572         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
573     | PARSEOP_FATAL
574         PARSEOP_OPEN_PAREN
575         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
576     ;
577 
578 FieldTerm
579     : PARSEOP_FIELD
580         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FIELD);}
581         NameString
582         OptionalAccessTypeKeyword
583         OptionalLockRuleKeyword
584         OptionalUpdateRuleKeyword
585         PARSEOP_CLOSE_PAREN '{'
586             FieldUnitList '}'       {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
587     | PARSEOP_FIELD
588         PARSEOP_OPEN_PAREN
589         error PARSEOP_CLOSE_PAREN
590         '{' error '}'               {$$ = AslDoError(); yyclearin;}
591     ;
592 
593 FindSetLeftBitTerm
594     : PARSEOP_FINDSETLEFTBIT
595         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETLEFTBIT);}
596         TermArg
597         Target
598         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
599     | PARSEOP_FINDSETLEFTBIT
600         PARSEOP_OPEN_PAREN
601         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
602     ;
603 
604 FindSetRightBitTerm
605     : PARSEOP_FINDSETRIGHTBIT
606         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FINDSETRIGHTBIT);}
607         TermArg
608         Target
609         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
610     | PARSEOP_FINDSETRIGHTBIT
611         PARSEOP_OPEN_PAREN
612         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
613     ;
614 
615     /* Convert a For() loop to a While() loop */
616 ForTerm
617     : PARSEOP_FOR
618         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
619         OptionalTermArg ','         {}
620         OptionalPredicate ','
621         OptionalTermArg             {$<n>$ = TrLinkPeerOp ($4,$<n>3);
622                                             TrSetOpParent ($9,$<n>3);}                /* New parent is WHILE */
623         PARSEOP_CLOSE_PAREN
624         '{' TermList '}'            {$<n>$ = TrLinkOpChildren ($<n>3,2,$7,$13);}
625                                     {$<n>$ = TrLinkPeerOp ($13,$9);
626                                         $$ = $<n>10;}
627     ;
628 
629 OptionalPredicate
630     :                               {$$ = TrCreateValuedLeafOp (PARSEOP_INTEGER, 1);}
631     | TermArg                       {$$ = $1;}
632     ;
633 
634 FprintfTerm
635     : PARSEOP_FPRINTF
636         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FPRINTF);}
637         TermArg ','
638         StringLiteral
639         PrintfArgList
640         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
641     | PARSEOP_FPRINTF
642         PARSEOP_OPEN_PAREN
643         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
644     ;
645 
646 FromBCDTerm
647     : PARSEOP_FROMBCD
648         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FROMBCD);}
649         TermArg
650         Target
651         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
652     | PARSEOP_FROMBCD
653         PARSEOP_OPEN_PAREN
654         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
655     ;
656 
657 FunctionTerm
658     : PARSEOP_FUNCTION
659         PARSEOP_OPEN_PAREN          {COMMENT_CAPTURE_OFF; $<n>$ = TrCreateLeafOp (PARSEOP_METHOD); }
660         NameString
661         OptionalParameterTypePackage
662         OptionalParameterTypesPackage
663         PARSEOP_CLOSE_PAREN '{'     {COMMENT_CAPTURE_ON; }
664             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,7,
665                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
666                                         TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
667                                         TrCreateLeafOp (PARSEOP_SERIALIZERULE_NOTSERIAL),
668                                         TrCreateValuedLeafOp (PARSEOP_BYTECONST, 0),$5,$6,$10);}
669     | PARSEOP_FUNCTION
670         PARSEOP_OPEN_PAREN
671         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
672     ;
673 
674 IfTerm
675     : PARSEOP_IF
676         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_IF);}
677         TermArg
678         PARSEOP_CLOSE_PAREN '{'
679             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
680 
681     | PARSEOP_IF
682         PARSEOP_OPEN_PAREN
683         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
684     ;
685 
686 IncludeTerm
687     : PARSEOP_INCLUDE
688         PARSEOP_OPEN_PAREN
689         String
690         PARSEOP_CLOSE_PAREN         {$$ = TrSetOpIntegerValue (PARSEOP_INCLUDE, $3);
691                                         FlOpenIncludeFile ($3);}
692     ;
693 
694 IncludeEndTerm
695     : PARSEOP_INCLUDE_END           {$<n>$ = TrCreateLeafOp (PARSEOP_INCLUDE_END);
696                                         TrSetOpCurrentFilename ($$);}
697     ;
698 
699 IncTerm
700     : PARSEOP_INCREMENT
701         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_INCREMENT);}
702         SuperName
703         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
704     | PARSEOP_INCREMENT
705         PARSEOP_OPEN_PAREN
706         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
707     ;
708 
709 IndexFieldTerm
710     : PARSEOP_INDEXFIELD
711         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_INDEXFIELD);}
712         NameString
713         NameStringItem
714         OptionalAccessTypeKeyword
715         OptionalLockRuleKeyword
716         OptionalUpdateRuleKeyword
717         PARSEOP_CLOSE_PAREN '{'
718             FieldUnitList '}'       {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$11);}
719     | PARSEOP_INDEXFIELD
720         PARSEOP_OPEN_PAREN
721         error PARSEOP_CLOSE_PAREN
722         '{' error '}'               {$$ = AslDoError(); yyclearin;}
723     ;
724 
725 IndexTerm
726     : PARSEOP_INDEX
727         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_INDEX);}
728         TermArg
729         TermArgItem
730         Target
731         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
732     | PARSEOP_INDEX
733         PARSEOP_OPEN_PAREN
734         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
735     ;
736 
737 LAndTerm
738     : PARSEOP_LAND
739         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LAND);}
740         TermArg
741         TermArgItem
742         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
743     | PARSEOP_LAND
744         PARSEOP_OPEN_PAREN
745         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
746     ;
747 
748 LEqualTerm
749     : PARSEOP_LEQUAL
750         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
751         TermArg
752         TermArgItem
753         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
754     | PARSEOP_LEQUAL
755         PARSEOP_OPEN_PAREN
756         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
757     ;
758 
759 LGreaterEqualTerm
760     : PARSEOP_LGREATEREQUAL
761         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
762         TermArg
763         TermArgItem
764         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_LNOT, 1,
765                                         TrLinkOpChildren ($<n>3,2,$4,$5));}
766     | PARSEOP_LGREATEREQUAL
767         PARSEOP_OPEN_PAREN
768         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
769     ;
770 
771 LGreaterTerm
772     : PARSEOP_LGREATER
773         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
774         TermArg
775         TermArgItem
776         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
777     | PARSEOP_LGREATER
778         PARSEOP_OPEN_PAREN
779         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
780     ;
781 
782 LLessEqualTerm
783     : PARSEOP_LLESSEQUAL
784         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LGREATER);}
785         TermArg
786         TermArgItem
787         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_LNOT, 1,
788                                         TrLinkOpChildren ($<n>3,2,$4,$5));}
789     | PARSEOP_LLESSEQUAL
790         PARSEOP_OPEN_PAREN
791         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
792     ;
793 
794 LLessTerm
795     : PARSEOP_LLESS
796         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LLESS);}
797         TermArg
798         TermArgItem
799         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
800     | PARSEOP_LLESS
801         PARSEOP_OPEN_PAREN
802         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
803     ;
804 
805 LNotEqualTerm
806     : PARSEOP_LNOTEQUAL
807         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LEQUAL);}
808         TermArg
809         TermArgItem
810         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_LNOT, 1,
811                                         TrLinkOpChildren ($<n>3,2,$4,$5));}
812     | PARSEOP_LNOTEQUAL
813         PARSEOP_OPEN_PAREN
814         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
815     ;
816 
817 LNotTerm
818     : PARSEOP_LNOT
819         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LNOT);}
820         TermArg
821         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
822     | PARSEOP_LNOT
823         PARSEOP_OPEN_PAREN
824         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
825     ;
826 
827 LoadTableTerm
828     : PARSEOP_LOADTABLE
829         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LOADTABLE);}
830         TermArg
831         TermArgItem
832         TermArgItem
833         OptionalListString
834         OptionalListString
835         OptionalReference
836         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$5,$6,$7,$8,$9);}
837     | PARSEOP_LOADTABLE
838         PARSEOP_OPEN_PAREN
839         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
840     ;
841 
842 LoadTerm
843     : PARSEOP_LOAD
844         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LOAD);}
845         NameString
846         Target
847         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
848     | PARSEOP_LOAD
849         PARSEOP_OPEN_PAREN
850         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
851     ;
852 
853 LocalTerm
854     : PARSEOP_LOCAL0                {$$ = TrCreateLeafOp (PARSEOP_LOCAL0);}
855     | PARSEOP_LOCAL1                {$$ = TrCreateLeafOp (PARSEOP_LOCAL1);}
856     | PARSEOP_LOCAL2                {$$ = TrCreateLeafOp (PARSEOP_LOCAL2);}
857     | PARSEOP_LOCAL3                {$$ = TrCreateLeafOp (PARSEOP_LOCAL3);}
858     | PARSEOP_LOCAL4                {$$ = TrCreateLeafOp (PARSEOP_LOCAL4);}
859     | PARSEOP_LOCAL5                {$$ = TrCreateLeafOp (PARSEOP_LOCAL5);}
860     | PARSEOP_LOCAL6                {$$ = TrCreateLeafOp (PARSEOP_LOCAL6);}
861     | PARSEOP_LOCAL7                {$$ = TrCreateLeafOp (PARSEOP_LOCAL7);}
862     ;
863 
864 LOrTerm
865     : PARSEOP_LOR
866         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_LOR);}
867         TermArg
868         TermArgItem
869         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
870     | PARSEOP_LOR
871         PARSEOP_OPEN_PAREN
872         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
873     ;
874 
875 MatchTerm
876     : PARSEOP_MATCH
877         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MATCH);}
878         TermArg
879         ',' MatchOpKeyword
880         TermArgItem
881         ',' MatchOpKeyword
882         TermArgItem
883         TermArgItem
884         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$7,$9,$10,$11);}
885     | PARSEOP_MATCH
886         PARSEOP_OPEN_PAREN
887         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
888     ;
889 
890 MethodTerm
891     : PARSEOP_METHOD
892         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_METHOD); COMMENT_CAPTURE_OFF;}
893         NameString
894         OptionalByteConstExpr       {UtCheckIntegerRange ($5, 0, 7);}
895         OptionalSerializeRuleKeyword
896         OptionalByteConstExpr
897         OptionalParameterTypePackage
898         OptionalParameterTypesPackage
899         PARSEOP_CLOSE_PAREN '{'     {COMMENT_CAPTURE_ON;}
900             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,7,
901                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
902                                         $5,$7,$8,$9,$10,$14);}
903     | PARSEOP_METHOD
904         PARSEOP_OPEN_PAREN
905         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
906     ;
907 
908 MidTerm
909     : PARSEOP_MID
910         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MID);}
911         TermArg
912         TermArgItem
913         TermArgItem
914         Target
915         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,$4,$5,$6,$7);}
916     | PARSEOP_MID
917         PARSEOP_OPEN_PAREN
918         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
919     ;
920 
921 ModTerm
922     : PARSEOP_MOD
923         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MOD);}
924         TermArg
925         TermArgItem
926         Target
927         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
928     | PARSEOP_MOD
929         PARSEOP_OPEN_PAREN
930         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
931     ;
932 
933 MultiplyTerm
934     : PARSEOP_MULTIPLY
935         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MULTIPLY);}
936         TermArg
937         TermArgItem
938         Target
939         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
940     | PARSEOP_MULTIPLY
941         PARSEOP_OPEN_PAREN
942         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
943     ;
944 
945 MutexTerm
946     : PARSEOP_MUTEX
947         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MUTEX);}
948         NameString
949         OptionalSyncLevel
950         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,
951                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$5);}
952     | PARSEOP_MUTEX
953         PARSEOP_OPEN_PAREN
954         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
955     ;
956 
957 NameTerm
958     : PARSEOP_NAME
959         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_NAME);}
960         NameString
961         ',' DataObject
962         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,
963                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$6);}
964     | PARSEOP_NAME
965         PARSEOP_OPEN_PAREN
966         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
967     ;
968 
969 NAndTerm
970     : PARSEOP_NAND
971         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_NAND);}
972         TermArg
973         TermArgItem
974         Target
975         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
976     | PARSEOP_NAND
977         PARSEOP_OPEN_PAREN
978         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
979     ;
980 
981 NoOpTerm
982     : PARSEOP_NOOP                  {$$ = TrCreateOp (PARSEOP_NOOP, 0);}
983     ;
984 
985 NOrTerm
986     : PARSEOP_NOR
987         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_NOR);}
988         TermArg
989         TermArgItem
990         Target
991         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
992     | PARSEOP_NOR
993         PARSEOP_OPEN_PAREN
994         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
995     ;
996 
997 NotifyTerm
998     : PARSEOP_NOTIFY
999         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_NOTIFY);}
1000         SuperName
1001         TermArgItem
1002         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1003     | PARSEOP_NOTIFY
1004         PARSEOP_OPEN_PAREN
1005         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1006     ;
1007 
1008 NotTerm
1009     : PARSEOP_NOT
1010         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_NOT);}
1011         TermArg
1012         Target
1013         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1014     | PARSEOP_NOT
1015         PARSEOP_OPEN_PAREN
1016         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1017     ;
1018 
1019 ObjectTypeTerm
1020     : PARSEOP_OBJECTTYPE
1021         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_OBJECTTYPE);}
1022         ObjectTypeSource
1023         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1024     | PARSEOP_OBJECTTYPE
1025         PARSEOP_OPEN_PAREN
1026         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1027     ;
1028 
1029 OffsetTerm
1030     : PARSEOP_OFFSET
1031         PARSEOP_OPEN_PAREN
1032         AmlPackageLengthTerm
1033         PARSEOP_CLOSE_PAREN         {$$ = TrCreateOp (PARSEOP_OFFSET,1,$3);}
1034     | PARSEOP_OFFSET
1035         PARSEOP_OPEN_PAREN
1036         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1037     ;
1038 
1039 OpRegionTerm
1040     : PARSEOP_OPERATIONREGION
1041         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_OPERATIONREGION);}
1042         NameString
1043         ',' OpRegionSpaceIdTerm
1044         TermArgItem
1045         TermArgItem
1046         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,
1047                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
1048                                         $6,$7,$8);}
1049     | PARSEOP_OPERATIONREGION
1050         PARSEOP_OPEN_PAREN
1051         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1052     ;
1053 
1054 OpRegionSpaceIdTerm
1055     : RegionSpaceKeyword            {}
1056     | ByteConst                     {$$ = UtCheckIntegerRange ($1, 0x80, 0xFF);}
1057     ;
1058 
1059 OrTerm
1060     : PARSEOP_OR
1061         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_OR);}
1062         TermArg
1063         TermArgItem
1064         Target
1065         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1066     | PARSEOP_OR
1067         PARSEOP_OPEN_PAREN
1068         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1069     ;
1070 
1071 PackageTerm
1072     : PARSEOP_PACKAGE               {$<n>$ = TrCreateLeafOp (PARSEOP_VAR_PACKAGE);}
1073         OptionalDataCount
1074         '{' PackageList '}'         {$$ = TrLinkOpChildren ($<n>2,2,$3,$5);}
1075 
1076 PowerResTerm
1077     : PARSEOP_POWERRESOURCE
1078         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_POWERRESOURCE);}
1079         NameString
1080         ',' ByteConstExpr
1081         ',' WordConstExpr
1082         PARSEOP_CLOSE_PAREN '{'
1083             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,4,
1084                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
1085                                         $6,$8,$11);}
1086     | PARSEOP_POWERRESOURCE
1087         PARSEOP_OPEN_PAREN
1088         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1089     ;
1090 
1091 PrintfTerm
1092     : PARSEOP_PRINTF
1093         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PRINTF);}
1094         StringLiteral
1095         PrintfArgList
1096         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1097     | PARSEOP_PRINTF
1098         PARSEOP_OPEN_PAREN
1099         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1100     ;
1101 
1102 PrintfArgList
1103     :                               {$$ = NULL;}
1104     | TermArg                       {$$ = $1;}
1105     | PrintfArgList ','
1106        TermArg                      {$$ = TrLinkPeerOp ($1, $3);}
1107     ;
1108 
1109 ProcessorTerm
1110     : PARSEOP_PROCESSOR
1111         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PROCESSOR);}
1112         NameString
1113         ',' ByteConstExpr
1114         OptionalDWordConstExpr
1115         OptionalByteConstExpr
1116         PARSEOP_CLOSE_PAREN '{'
1117             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,5,
1118                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),
1119                                         $6,$7,$8,$11);}
1120     | PARSEOP_PROCESSOR
1121         PARSEOP_OPEN_PAREN
1122         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1123     ;
1124 
1125 RawDataBufferTerm
1126     : PARSEOP_DATABUFFER
1127         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DATABUFFER);}
1128         OptionalWordConst
1129         PARSEOP_CLOSE_PAREN '{'
1130             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
1131     | PARSEOP_DATABUFFER
1132         PARSEOP_OPEN_PAREN
1133         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1134     ;
1135 
1136 /*
1137  * In RefOf, the node isn't really a target, but we can't keep track of it after
1138  * we've taken a pointer to it. (hard to tell if a local becomes initialized this way.)
1139  */
1140 RefOfTerm
1141     : PARSEOP_REFOF
1142         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_REFOF);}
1143         RefOfSource
1144         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,
1145                                         TrSetOpFlags ($4, OP_IS_TARGET));}
1146     | PARSEOP_REFOF
1147         PARSEOP_OPEN_PAREN
1148         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1149     ;
1150 
1151 ReleaseTerm
1152     : PARSEOP_RELEASE
1153         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_RELEASE);}
1154         SuperName
1155         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1156     | PARSEOP_RELEASE
1157         PARSEOP_OPEN_PAREN
1158         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1159     ;
1160 
1161 ResetTerm
1162     : PARSEOP_RESET
1163         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_RESET);}
1164         SuperName
1165         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1166     | PARSEOP_RESET
1167         PARSEOP_OPEN_PAREN
1168         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1169     ;
1170 
1171 ReturnTerm
1172     : PARSEOP_RETURN
1173         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_RETURN);}
1174         OptionalReturnArg
1175         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1176     | PARSEOP_RETURN                {$$ = TrLinkOpChildren (
1177                                         TrCreateLeafOp (PARSEOP_RETURN),1,
1178                                         TrSetOpFlags (TrCreateLeafOp (PARSEOP_ZERO),
1179                                             OP_IS_NULL_RETURN));}
1180     | PARSEOP_RETURN
1181         PARSEOP_OPEN_PAREN
1182         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1183     ;
1184 
1185 ScopeTerm
1186     : PARSEOP_SCOPE
1187         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SCOPE);}
1188         NameString
1189         PARSEOP_CLOSE_PAREN '{'
1190             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,2,
1191                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
1192     | PARSEOP_SCOPE
1193         PARSEOP_OPEN_PAREN
1194         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1195     ;
1196 
1197 ShiftLeftTerm
1198     : PARSEOP_SHIFTLEFT
1199         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTLEFT);}
1200         TermArg
1201         TermArgItem
1202         Target
1203         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1204     | PARSEOP_SHIFTLEFT
1205         PARSEOP_OPEN_PAREN
1206         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1207     ;
1208 
1209 ShiftRightTerm
1210     : PARSEOP_SHIFTRIGHT
1211         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SHIFTRIGHT);}
1212         TermArg
1213         TermArgItem
1214         Target
1215         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1216     | PARSEOP_SHIFTRIGHT
1217         PARSEOP_OPEN_PAREN
1218         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1219     ;
1220 
1221 SignalTerm
1222     : PARSEOP_SIGNAL
1223         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SIGNAL);}
1224         SuperName
1225         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1226     | PARSEOP_SIGNAL
1227         PARSEOP_OPEN_PAREN
1228         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1229     ;
1230 
1231 SizeOfTerm
1232     : PARSEOP_SIZEOF
1233         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SIZEOF);}
1234         SuperName
1235         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1236     | PARSEOP_SIZEOF
1237         PARSEOP_OPEN_PAREN
1238         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1239     ;
1240 
1241 SleepTerm
1242     : PARSEOP_SLEEP
1243         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SLEEP);}
1244         TermArg
1245         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1246     | PARSEOP_SLEEP
1247         PARSEOP_OPEN_PAREN
1248         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1249     ;
1250 
1251 StallTerm
1252     : PARSEOP_STALL
1253         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_STALL);}
1254         TermArg
1255         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1256     | PARSEOP_STALL
1257         PARSEOP_OPEN_PAREN
1258         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1259     ;
1260 
1261 StoreTerm
1262     : PARSEOP_STORE
1263         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_STORE);}
1264         TermArg
1265         ',' SuperName
1266         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,
1267                                             TrSetOpFlags ($6, OP_IS_TARGET));}
1268     | PARSEOP_STORE
1269         PARSEOP_OPEN_PAREN
1270         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1271     ;
1272 
1273 SubtractTerm
1274     : PARSEOP_SUBTRACT
1275         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SUBTRACT);}
1276         TermArg
1277         TermArgItem
1278         Target
1279         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1280     | PARSEOP_SUBTRACT
1281         PARSEOP_OPEN_PAREN
1282         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1283     ;
1284 
1285 SwitchTerm
1286     : PARSEOP_SWITCH
1287         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SWITCH);}
1288         TermArg
1289         PARSEOP_CLOSE_PAREN '{'
1290             CaseDefaultTermList '}' {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
1291     | PARSEOP_SWITCH
1292         PARSEOP_OPEN_PAREN
1293         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1294     ;
1295 
1296 ThermalZoneTerm
1297     : PARSEOP_THERMALZONE
1298         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_THERMALZONE);}
1299         NameString
1300         PARSEOP_CLOSE_PAREN '{'
1301             TermList '}'            {$$ = TrLinkOpChildren ($<n>3,2,
1302                                         TrSetOpFlags ($4, OP_IS_NAME_DECLARATION),$7);}
1303     | PARSEOP_THERMALZONE
1304         PARSEOP_OPEN_PAREN
1305         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1306     ;
1307 
1308 TimerTerm
1309     : PARSEOP_TIMER
1310         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TIMER);}
1311         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,0);}
1312     | PARSEOP_TIMER                 {$$ = TrLinkOpChildren (
1313                                         TrCreateLeafOp (PARSEOP_TIMER),0);}
1314     | PARSEOP_TIMER
1315         PARSEOP_OPEN_PAREN
1316         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1317     ;
1318 
1319 ToBCDTerm
1320     : PARSEOP_TOBCD
1321         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOBCD);}
1322         TermArg
1323         Target
1324         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1325     | PARSEOP_TOBCD
1326         PARSEOP_OPEN_PAREN
1327         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1328     ;
1329 
1330 ToBufferTerm
1331     : PARSEOP_TOBUFFER
1332         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOBUFFER);}
1333         TermArg
1334         Target
1335         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1336     | PARSEOP_TOBUFFER
1337         PARSEOP_OPEN_PAREN
1338         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1339     ;
1340 
1341 ToDecimalStringTerm
1342     : PARSEOP_TODECIMALSTRING
1343         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TODECIMALSTRING);}
1344         TermArg
1345         Target
1346         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1347     | PARSEOP_TODECIMALSTRING
1348         PARSEOP_OPEN_PAREN
1349         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1350     ;
1351 
1352 ToHexStringTerm
1353     : PARSEOP_TOHEXSTRING
1354         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOHEXSTRING);}
1355         TermArg
1356         Target
1357         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1358     | PARSEOP_TOHEXSTRING
1359         PARSEOP_OPEN_PAREN
1360         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1361     ;
1362 
1363 ToIntegerTerm
1364     : PARSEOP_TOINTEGER
1365         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOINTEGER);}
1366         TermArg
1367         Target
1368         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1369     | PARSEOP_TOINTEGER
1370         PARSEOP_OPEN_PAREN
1371         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1372     ;
1373 
1374 ToPLDTerm
1375     : PARSEOP_TOPLD
1376         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOPLD);}
1377         PldKeywordList
1378         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1379     | PARSEOP_TOPLD
1380         PARSEOP_OPEN_PAREN
1381         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1382     ;
1383 
1384 PldKeywordList
1385     :                               {$$ = NULL;}
1386     | PldKeyword
1387         PARSEOP_EXP_EQUALS Integer  {$$ = TrLinkOpChildren ($1,1,$3);}
1388     | PldKeyword
1389         PARSEOP_EXP_EQUALS String   {$$ = TrLinkOpChildren ($1,1,$3);}
1390     | PldKeywordList ','            /* Allows a trailing comma at list end */
1391     | PldKeywordList ','
1392         PldKeyword
1393         PARSEOP_EXP_EQUALS Integer  {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
1394     | PldKeywordList ','
1395         PldKeyword
1396         PARSEOP_EXP_EQUALS String   {$$ = TrLinkPeerOp ($1,TrLinkOpChildren ($3,1,$5));}
1397     ;
1398 
1399 
1400 ToStringTerm
1401     : PARSEOP_TOSTRING
1402         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_TOSTRING);}
1403         TermArg
1404         OptionalCount
1405         Target
1406         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1407     | PARSEOP_TOSTRING
1408         PARSEOP_OPEN_PAREN
1409         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1410     ;
1411 
1412 ToUUIDTerm
1413     : PARSEOP_TOUUID
1414         PARSEOP_OPEN_PAREN
1415         StringLiteral
1416         PARSEOP_CLOSE_PAREN         {$$ = TrSetOpIntegerValue (PARSEOP_TOUUID, $3);}
1417     | PARSEOP_TOUUID
1418         PARSEOP_OPEN_PAREN
1419         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1420     ;
1421 
1422 UnicodeTerm
1423     : PARSEOP_UNICODE
1424         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_UNICODE);}
1425         StringLiteral
1426         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,0,$4);}
1427     | PARSEOP_UNICODE
1428         PARSEOP_OPEN_PAREN
1429         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1430     ;
1431 
1432 UnloadTerm
1433     : PARSEOP_UNLOAD
1434         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_UNLOAD);}
1435         SuperName
1436         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,1,$4);}
1437     | PARSEOP_UNLOAD
1438         PARSEOP_OPEN_PAREN
1439         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1440     ;
1441 
1442 WaitTerm
1443     : PARSEOP_WAIT
1444         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WAIT);}
1445         SuperName
1446         TermArgItem
1447         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,2,$4,$5);}
1448     | PARSEOP_WAIT
1449         PARSEOP_OPEN_PAREN
1450         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1451     ;
1452 
1453 XOrTerm
1454     : PARSEOP_XOR
1455         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_XOR);}
1456         TermArg
1457         TermArgItem
1458         Target
1459         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,3,$4,$5,$6);}
1460     | PARSEOP_XOR
1461         PARSEOP_OPEN_PAREN
1462         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1463     ;
1464 
1465 WhileTerm
1466     : PARSEOP_WHILE
1467         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WHILE);}
1468         TermArg
1469         PARSEOP_CLOSE_PAREN
1470             '{' TermList '}'        {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
1471     | PARSEOP_WHILE
1472         PARSEOP_OPEN_PAREN
1473         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1474     ;
1475