1 NoEcho('
2 /******************************************************************************
3  *
4  * Module Name: aslresources.y - Bison/Yacc production rules for resources
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 Resource Template Terms
161  *
162  ******************************************************************************/
163 
164 /*
165  * Note: Create two default nodes to allow conversion to a Buffer AML opcode
166  * Also, insert the EndTag at the end of the template.
167  */
168 ResourceTemplateTerm
169     : PARSEOP_RESOURCETEMPLATE      {COMMENT_CAPTURE_OFF;}
170         OptionalParentheses
171         '{'
172         ResourceMacroList '}'       {$$ = TrCreateOp (PARSEOP_RESOURCETEMPLATE,4,
173                                           TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
174                                           TrCreateLeafOp (PARSEOP_DEFAULT_ARG),
175                                           $5,
176                                           TrCreateLeafOp (PARSEOP_ENDTAG));
177                                      COMMENT_CAPTURE_ON;}
178     ;
179 
180 OptionalParentheses
181     :                               {$$ = NULL;}
182     | PARSEOP_OPEN_PAREN
183         PARSEOP_CLOSE_PAREN         {$$ = NULL;}
184     ;
185 
186 ResourceMacroList
187     :                               {$$ = NULL;}
188     | ResourceMacroList
189         ResourceMacroTerm           {$$ = TrLinkPeerOp ($1,$2);}
190     ;
191 
192 ResourceMacroTerm
193     : Csi2SerialBusTerm             {}
194     | DMATerm                       {}
195     | DWordIOTerm                   {}
196     | DWordMemoryTerm               {}
197     | DWordSpaceTerm                {}
198     | EndDependentFnTerm            {}
199     | ExtendedIOTerm                {}
200     | ExtendedMemoryTerm            {}
201     | ExtendedSpaceTerm             {}
202     | FixedDmaTerm                  {}
203     | FixedIOTerm                   {}
204     | GpioIntTerm                   {}
205     | GpioIoTerm                    {}
206     | I2cSerialBusTerm              {}
207     | I2cSerialBusTermV2            {}
208     | InterruptTerm                 {}
209     | IOTerm                        {}
210     | IRQNoFlagsTerm                {}
211     | IRQTerm                       {}
212     | Memory24Term                  {}
213     | Memory32FixedTerm             {}
214     | Memory32Term                  {}
215     | PinConfigTerm                 {}
216     | PinFunctionTerm               {}
217     | ClockInputTerm                {}
218     | PinGroupTerm                  {}
219     | PinGroupConfigTerm            {}
220     | PinGroupFunctionTerm          {}
221     | QWordIOTerm                   {}
222     | QWordMemoryTerm               {}
223     | QWordSpaceTerm                {}
224     | RegisterTerm                  {}
225     | SpiSerialBusTerm              {}
226     | SpiSerialBusTermV2            {}
227     | StartDependentFnNoPriTerm     {}
228     | StartDependentFnTerm          {}
229     | UartSerialBusTerm             {}
230     | UartSerialBusTermV2           {}
231     | VendorLongTerm                {}
232     | VendorShortTerm               {}
233     | WordBusNumberTerm             {}
234     | WordIOTerm                    {}
235     | WordSpaceTerm                 {}
236     ;
237 
238 Csi2SerialBusTerm
239     : PARSEOP_CSI2_SERIALBUS
240         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CSI2_SERIALBUS);}
241         OptionalSlaveMode_First     {UtCheckIntegerRange ($4, 0x00, 0x01);} /* 04: SlaveMode */
242         ',' ByteConstExpr           {UtCheckIntegerRange ($7, 0x00, 0x03);} /* 07: PhyType */
243         OptionalByteConstExpr       {UtCheckIntegerRange ($9, 0x00, 0xFC);} /* 09: LocalPortInstance */
244         ',' StringData              /* 12: ResourceSource */
245         ',' ByteConstExpr           /* 14: ResourceSourceIndex */
246         OptionalResourceType        /* 15; ResourceType (ResourceUsage) */
247         OptionalNameString          /* 16: DescriptorName */
248         OptionalBuffer_Last         /* 17: VendorData */
249         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,8,
250                                         $4,$7,$9,$12,$14,$15,$16,$17);}
251     | PARSEOP_CSI2_SERIALBUS
252         PARSEOP_OPEN_PAREN
253         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
254 
255 DMATerm
256     : PARSEOP_DMA
257         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DMA);}
258         DMATypeKeyword
259         OptionalBusMasterKeyword
260         ',' XferTypeKeyword
261         OptionalNameString_Last
262         PARSEOP_CLOSE_PAREN '{'
263             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$7,$8,$11);}
264     | PARSEOP_DMA
265         PARSEOP_OPEN_PAREN
266         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
267     ;
268 
269 DWordIOTerm
270     : PARSEOP_DWORDIO
271         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDIO);}
272         OptionalResourceType_First
273         OptionalMinType
274         OptionalMaxType
275         OptionalDecodeType
276         OptionalRangeType
277         ',' DWordConstExpr
278         ',' DWordConstExpr
279         ',' DWordConstExpr
280         ',' DWordConstExpr
281         ',' DWordConstExpr
282         OptionalByteConstExpr
283         OptionalStringData
284         OptionalNameString
285         OptionalType
286         OptionalTranslationType_Last
287         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
288                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
289     | PARSEOP_DWORDIO
290         PARSEOP_OPEN_PAREN
291         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
292     ;
293 
294 DWordMemoryTerm
295     : PARSEOP_DWORDMEMORY
296         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDMEMORY);}
297         OptionalResourceType_First
298         OptionalDecodeType
299         OptionalMinType
300         OptionalMaxType
301         OptionalMemType
302         ',' OptionalReadWriteKeyword
303         ',' DWordConstExpr
304         ',' DWordConstExpr
305         ',' DWordConstExpr
306         ',' DWordConstExpr
307         ',' DWordConstExpr
308         OptionalByteConstExpr
309         OptionalStringData
310         OptionalNameString
311         OptionalAddressRange
312         OptionalType_Last
313         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,16,
314                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
315     | PARSEOP_DWORDMEMORY
316         PARSEOP_OPEN_PAREN
317         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
318     ;
319 
320 DWordSpaceTerm
321     : PARSEOP_DWORDSPACE
322         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_DWORDSPACE);}
323         ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
324         OptionalResourceType
325         OptionalDecodeType
326         OptionalMinType
327         OptionalMaxType
328         ',' ByteConstExpr
329         ',' DWordConstExpr
330         ',' DWordConstExpr
331         ',' DWordConstExpr
332         ',' DWordConstExpr
333         ',' DWordConstExpr
334         OptionalByteConstExpr
335         OptionalStringData
336         OptionalNameString_Last
337         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
338                                         $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
339     | PARSEOP_DWORDSPACE
340         PARSEOP_OPEN_PAREN
341         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
342     ;
343 
344 EndDependentFnTerm
345     : PARSEOP_ENDDEPENDENTFN
346         PARSEOP_OPEN_PAREN
347         PARSEOP_CLOSE_PAREN         {$$ = TrCreateLeafOp (PARSEOP_ENDDEPENDENTFN);}
348     | PARSEOP_ENDDEPENDENTFN
349         PARSEOP_OPEN_PAREN
350         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
351     ;
352 
353 ExtendedIOTerm
354     : PARSEOP_EXTENDEDIO
355         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDIO);}
356         OptionalResourceType_First
357         OptionalMinType
358         OptionalMaxType
359         OptionalDecodeType
360         OptionalRangeType
361         ',' QWordConstExpr
362         ',' QWordConstExpr
363         ',' QWordConstExpr
364         ',' QWordConstExpr
365         ',' QWordConstExpr
366         OptionalQWordConstExpr
367         OptionalNameString
368         OptionalType
369         OptionalTranslationType_Last
370         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
371                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22);}
372     | PARSEOP_EXTENDEDIO
373         PARSEOP_OPEN_PAREN
374         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
375     ;
376 
377 ExtendedMemoryTerm
378     : PARSEOP_EXTENDEDMEMORY
379         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDMEMORY);}
380         OptionalResourceType_First
381         OptionalDecodeType
382         OptionalMinType
383         OptionalMaxType
384         OptionalMemType
385         ',' OptionalReadWriteKeyword
386         ',' QWordConstExpr
387         ',' QWordConstExpr
388         ',' QWordConstExpr
389         ',' QWordConstExpr
390         ',' QWordConstExpr
391         OptionalQWordConstExpr
392         OptionalNameString
393         OptionalAddressRange
394         OptionalType_Last
395         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
396                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24);}
397     | PARSEOP_EXTENDEDMEMORY
398         PARSEOP_OPEN_PAREN
399         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
400     ;
401 
402 ExtendedSpaceTerm
403     : PARSEOP_EXTENDEDSPACE PARSEOP_OPEN_PAREN     {$<n>$ = TrCreateLeafOp (PARSEOP_EXTENDEDSPACE);}
404         ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
405         OptionalResourceType
406         OptionalDecodeType
407         OptionalMinType
408         OptionalMaxType
409         ',' ByteConstExpr
410         ',' QWordConstExpr
411         ',' QWordConstExpr
412         ',' QWordConstExpr
413         ',' QWordConstExpr
414         ',' QWordConstExpr
415         OptionalQWordConstExpr
416         OptionalNameString_Last
417         PARSEOP_CLOSE_PAREN                         {$$ = TrLinkOpChildren ($<n>3,13,
418                                         $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23);}
419     | PARSEOP_EXTENDEDSPACE
420         PARSEOP_OPEN_PAREN
421         error PARSEOP_CLOSE_PAREN                   {$$ = AslDoError(); yyclearin;}
422     ;
423 
424 FixedDmaTerm
425     : PARSEOP_FIXEDDMA
426         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDDMA);}
427         WordConstExpr               /* 04: DMA RequestLines */
428         ',' WordConstExpr           /* 06: DMA Channels */
429         OptionalXferSize            /* 07: DMA TransferSize */
430         OptionalNameString          /* 08: DescriptorName */
431         PARSEOP_CLOSE_PAREN                         {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$7,$8);}
432     | PARSEOP_FIXEDDMA
433         PARSEOP_OPEN_PAREN
434         error PARSEOP_CLOSE_PAREN                   {$$ = AslDoError(); yyclearin;}
435     ;
436 
437 FixedIOTerm
438     : PARSEOP_FIXEDIO
439         PARSEOP_OPEN_PAREN           {$<n>$ = TrCreateLeafOp (PARSEOP_FIXEDIO);}
440         WordConstExpr
441         ',' ByteConstExpr
442         OptionalNameString_Last
443         PARSEOP_CLOSE_PAREN                         {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$7);}
444     | PARSEOP_FIXEDIO
445         PARSEOP_OPEN_PAREN
446         error PARSEOP_CLOSE_PAREN                   {$$ = AslDoError(); yyclearin;}
447     ;
448 
449 GpioIntTerm
450     : PARSEOP_GPIO_INT
451         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_INT);}
452         InterruptTypeKeyword        /* 04: InterruptType */
453         ',' InterruptLevel          /* 06: InterruptLevel */
454         OptionalShareType           /* 07: SharedType */
455         ',' PinConfigByte           /* 09: PinConfig */
456         OptionalWordConstExpr       /* 10: DebounceTimeout */
457         ',' StringData              /* 12: ResourceSource */
458         OptionalByteConstExpr       /* 13: ResourceSourceIndex */
459         OptionalResourceType        /* 14: ResourceType */
460         OptionalNameString          /* 15: DescriptorName */
461         OptionalBuffer_Last         /* 16: VendorData */
462         PARSEOP_CLOSE_PAREN '{'
463             DWordConstExpr '}'      {$$ = TrLinkOpChildren ($<n>3,11,
464                                         $4,$6,$7,$9,$10,$12,$13,$14,$15,$16,$19);}
465     | PARSEOP_GPIO_INT
466         PARSEOP_OPEN_PAREN
467         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
468     ;
469 
470 GpioIoTerm
471     : PARSEOP_GPIO_IO
472         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_GPIO_IO);}
473         OptionalShareType_First     /* 04: SharedType */
474         ',' PinConfigByte           /* 06: PinConfig */
475         OptionalWordConstExpr       /* 07: DebounceTimeout */
476         OptionalWordConstExpr       /* 08: DriveStrength */
477         OptionalIoRestriction       /* 09: IoRestriction */
478         ',' StringData              /* 11: ResourceSource */
479         OptionalByteConstExpr       /* 12: ResourceSourceIndex */
480         OptionalResourceType        /* 13: ResourceType */
481         OptionalNameString          /* 14: DescriptorName */
482         OptionalBuffer_Last         /* 15: VendorData */
483         PARSEOP_CLOSE_PAREN '{'
484             DWordList '}'           {$$ = TrLinkOpChildren ($<n>3,11,
485                                         $4,$6,$7,$8,$9,$11,$12,$13,$14,$15,$18);}
486     | PARSEOP_GPIO_IO
487         PARSEOP_OPEN_PAREN
488         error PARSEOP_CLOSE_PAREN                   {$$ = AslDoError(); yyclearin;}
489     ;
490 
491 I2cSerialBusTerm
492     : PARSEOP_I2C_SERIALBUS
493         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS);}
494         WordConstExpr               /* 04: SlaveAddress */
495         OptionalSlaveMode           /* 05: SlaveMode */
496         ',' DWordConstExpr          /* 07: ConnectionSpeed */
497         OptionalAddressingMode      /* 08: AddressingMode */
498         ',' StringData              /* 10: ResourceSource */
499         OptionalByteConstExpr       /* 11: ResourceSourceIndex */
500         OptionalResourceType        /* 12: ResourceType */
501         OptionalNameString          /* 13: DescriptorName */
502         OptionalBuffer_Last         /* 14: VendorData */
503         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,10,
504                                         $4,$5,$7,$8,$10,$11,$12,$13,
505                                         TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$14);}
506     | PARSEOP_I2C_SERIALBUS
507         PARSEOP_OPEN_PAREN
508         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
509     ;
510 
511 I2cSerialBusTermV2
512     : PARSEOP_I2C_SERIALBUS_V2
513         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_I2C_SERIALBUS_V2);}
514         WordConstExpr               /* 04: SlaveAddress */
515         OptionalSlaveMode           /* 05: SlaveMode */
516         ',' DWordConstExpr          /* 07: ConnectionSpeed */
517         OptionalAddressingMode      /* 08: AddressingMode */
518         ',' StringData              /* 10: ResourceSource */
519         OptionalByteConstExpr       /* 11: ResourceSourceIndex */
520         OptionalResourceType        /* 12: ResourceType */
521         OptionalNameString          /* 13: DescriptorName */
522         OptionalShareType           /* 14: Share */
523         OptionalBuffer_Last         /* 15: VendorData */
524         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,10,
525                                         $4,$5,$7,$8,$10,$11,$12,$13,$14,$15);}
526     | PARSEOP_I2C_SERIALBUS_V2
527         PARSEOP_OPEN_PAREN
528         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
529     ;
530 
531 InterruptTerm
532     : PARSEOP_INTERRUPT
533         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_INTERRUPT);}
534         OptionalResourceType_First
535         ',' InterruptTypeKeyword
536         ',' InterruptLevel
537         OptionalShareType
538         OptionalByteConstExpr
539         OptionalStringData
540         OptionalNameString_Last
541         PARSEOP_CLOSE_PAREN '{'
542             DWordList '}'           {$$ = TrLinkOpChildren ($<n>3,8,
543                                         $4,$6,$8,$9,$10,$11,$12,$15);}
544     | PARSEOP_INTERRUPT
545         PARSEOP_OPEN_PAREN
546         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
547     ;
548 
549 IOTerm
550     : PARSEOP_IO
551         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_IO);}
552         IODecodeKeyword
553         ',' WordConstExpr
554         ',' WordConstExpr
555         ',' ByteConstExpr
556         ',' ByteConstExpr
557         OptionalNameString_Last
558         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
559     | PARSEOP_IO
560         PARSEOP_OPEN_PAREN
561         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
562     ;
563 
564 IRQNoFlagsTerm
565     : PARSEOP_IRQNOFLAGS
566         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_IRQNOFLAGS);}
567         OptionalNameString_First
568         PARSEOP_CLOSE_PAREN '{'
569             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
570     | PARSEOP_IRQNOFLAGS
571         PARSEOP_OPEN_PAREN
572         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
573     ;
574 
575 IRQTerm
576     : PARSEOP_IRQ
577         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_IRQ);}
578         InterruptTypeKeyword
579         ',' InterruptLevel
580         OptionalShareType
581         OptionalNameString_Last
582         PARSEOP_CLOSE_PAREN '{'
583             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,5,$4,$6,$7,$8,$11);}
584     | PARSEOP_IRQ
585         PARSEOP_OPEN_PAREN
586         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
587     ;
588 
589 Memory24Term
590     : PARSEOP_MEMORY24
591         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY24);}
592         OptionalReadWriteKeyword
593         ',' WordConstExpr
594         ',' WordConstExpr
595         ',' WordConstExpr
596         ',' WordConstExpr
597         OptionalNameString_Last
598         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
599     | PARSEOP_MEMORY24
600         PARSEOP_OPEN_PAREN
601         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
602     ;
603 
604 Memory32FixedTerm
605     : PARSEOP_MEMORY32FIXED
606         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32FIXED);}
607         OptionalReadWriteKeyword
608         ',' DWordConstExpr
609         ',' DWordConstExpr
610         OptionalNameString_Last
611         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,4,$4,$6,$8,$9);}
612     | PARSEOP_MEMORY32FIXED
613         PARSEOP_OPEN_PAREN
614         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
615     ;
616 
617 Memory32Term
618     : PARSEOP_MEMORY32
619         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_MEMORY32);}
620         OptionalReadWriteKeyword
621         ',' DWordConstExpr
622         ',' DWordConstExpr
623         ',' DWordConstExpr
624         ',' DWordConstExpr
625         OptionalNameString_Last
626         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$12,$13);}
627     | PARSEOP_MEMORY32
628         PARSEOP_OPEN_PAREN
629         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
630     ;
631 
632 PinConfigTerm
633     : PARSEOP_PINCONFIG
634         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PINCONFIG);}
635         OptionalShareType_First     /* 04: SharedType */
636         ',' ByteConstExpr           /* 06: PinConfigType */
637         ',' DWordConstExpr          /* 08: PinConfigValue */
638         ',' StringData              /* 10: ResourceSource */
639         OptionalByteConstExpr       /* 11: ResourceSourceIndex */
640         OptionalResourceType        /* 12: ResourceType */
641         OptionalNameString          /* 13: DescriptorName */
642         OptionalBuffer_Last         /* 14: VendorData */
643         PARSEOP_CLOSE_PAREN '{'
644             DWordList '}'           {$$ = TrLinkOpChildren ($<n>3,9,
645                                         $4,$6,$8,$10,$11,$12,$13,$14,$17);}
646     | PARSEOP_PINCONFIG
647         PARSEOP_OPEN_PAREN
648         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
649     ;
650 
651 PinFunctionTerm
652     : PARSEOP_PINFUNCTION
653         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PINFUNCTION);}
654         OptionalShareType_First     /* 04: SharedType */
655         ',' PinConfigByte           /* 06: PinConfig */
656         ',' WordConstExpr           /* 08: FunctionNumber */
657         ',' StringData              /* 10: ResourceSource */
658         OptionalByteConstExpr       /* 11: ResourceSourceIndex */
659         OptionalResourceType        /* 12: ResourceType */
660         OptionalNameString          /* 13: DescriptorName */
661         OptionalBuffer_Last         /* 14: VendorData */
662         PARSEOP_CLOSE_PAREN '{'
663             DWordList '}'           {$$ = TrLinkOpChildren ($<n>3,9,
664                                         $4,$6,$8,$10,$11,$12,$13,$14,$17);}
665     | PARSEOP_PINFUNCTION
666         PARSEOP_OPEN_PAREN
667         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
668     ;
669 
670 ClockInputTerm
671     : PARSEOP_CLOCKINPUT
672         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_CLOCKINPUT);}
673         DWordConstExpr              /* 04: FrequencyNumerator */
674         ',' WordConstExpr           /* 06: FrequencyDivisor */
675         ',' ClockScaleKeyword       /* 08: Scale */
676         ',' ClockModeKeyword        /* 10: Mode*/
677         OptionalStringData          /* 11: ResourceSource */
678         OptionalByteConstExpr       /* 12: ResourceSourceIndex */
679         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
680     | PARSEOP_CLOCKINPUT
681         PARSEOP_OPEN_PAREN
682         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
683     ;
684 
685 PinGroupTerm
686     : PARSEOP_PINGROUP
687         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUP);}
688         StringData                  /* 04: ResourceLabel */
689         OptionalProducerResourceType /* 05: ResourceType */
690         OptionalNameString          /* 06: DescriptorName */
691         OptionalBuffer_Last         /* 07: VendorData */
692         PARSEOP_CLOSE_PAREN '{'
693             DWordList '}'           {$$ = TrLinkOpChildren ($<n>3,5,$4,$5,$6,$7,$10);}
694     | PARSEOP_PINGROUP
695         PARSEOP_OPEN_PAREN
696         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
697     ;
698 
699 PinGroupConfigTerm
700     : PARSEOP_PINGROUPCONFIG
701         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPCONFIG);}
702         OptionalShareType_First     /* 04: SharedType */
703         ',' ByteConstExpr           /* 06: PinConfigType */
704         ',' DWordConstExpr          /* 08: PinConfigValue */
705         ',' StringData              /* 10: ResourceSource */
706         OptionalByteConstExpr       /* 11: ResourceSourceIndex */
707         ',' StringData              /* 13: ResourceSourceLabel */
708         OptionalResourceType        /* 14: ResourceType */
709         OptionalNameString          /* 15: DescriptorName */
710         OptionalBuffer_Last         /* 16: VendorData */
711         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,9,
712                                         $4,$6,$8,$10,$11,$13,$14,$15,$16);}
713     | PARSEOP_PINGROUPCONFIG
714         PARSEOP_OPEN_PAREN
715         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
716     ;
717 
718 PinGroupFunctionTerm
719     : PARSEOP_PINGROUPFUNCTION
720         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_PINGROUPFUNCTION);}
721         OptionalShareType_First     /* 04: SharedType */
722         ',' WordConstExpr           /* 06: FunctionNumber */
723         ',' StringData              /* 08: ResourceSource */
724         OptionalByteConstExpr       /* 09: ResourceSourceIndex */
725         ',' StringData              /* 11: ResourceSourceLabel */
726         OptionalResourceType        /* 12: ResourceType */
727         OptionalNameString          /* 13: DescriptorName */
728         OptionalBuffer_Last         /* 14: VendorData */
729         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,8,
730                                         $4,$6,$8,$9,$11,$12,$13,$14);}
731     | PARSEOP_PINGROUPFUNCTION
732         PARSEOP_OPEN_PAREN
733         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
734     ;
735 
736 QWordIOTerm
737     : PARSEOP_QWORDIO
738         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDIO);}
739         OptionalResourceType_First
740         OptionalMinType
741         OptionalMaxType
742         OptionalDecodeType
743         OptionalRangeType
744         ',' QWordConstExpr
745         ',' QWordConstExpr
746         ',' QWordConstExpr
747         ',' QWordConstExpr
748         ',' QWordConstExpr
749         OptionalByteConstExpr
750         OptionalStringData
751         OptionalNameString
752         OptionalType
753         OptionalTranslationType_Last
754         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
755                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
756     | PARSEOP_QWORDIO
757         PARSEOP_OPEN_PAREN
758         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
759     ;
760 
761 QWordMemoryTerm
762     : PARSEOP_QWORDMEMORY
763         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDMEMORY);}
764         OptionalResourceType_First
765         OptionalDecodeType
766         OptionalMinType
767         OptionalMaxType
768         OptionalMemType
769         ',' OptionalReadWriteKeyword
770         ',' QWordConstExpr
771         ',' QWordConstExpr
772         ',' QWordConstExpr
773         ',' QWordConstExpr
774         ',' QWordConstExpr
775         OptionalByteConstExpr
776         OptionalStringData
777         OptionalNameString
778         OptionalAddressRange
779         OptionalType_Last
780         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,16,
781                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$20,$21,$22,$23,$24,$25);}
782     | PARSEOP_QWORDMEMORY
783         PARSEOP_OPEN_PAREN
784         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
785     ;
786 
787 QWordSpaceTerm
788     : PARSEOP_QWORDSPACE
789         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_QWORDSPACE);}
790         ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
791         OptionalResourceType
792         OptionalDecodeType
793         OptionalMinType
794         OptionalMaxType
795         ',' ByteConstExpr
796         ',' QWordConstExpr
797         ',' QWordConstExpr
798         ',' QWordConstExpr
799         ',' QWordConstExpr
800         ',' QWordConstExpr
801         OptionalByteConstExpr
802         OptionalStringData
803         OptionalNameString_Last
804         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
805                                         $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
806     | PARSEOP_QWORDSPACE
807         PARSEOP_OPEN_PAREN
808         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
809     ;
810 
811 RegisterTerm
812     : PARSEOP_REGISTER
813         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_REGISTER);}
814         AddressSpaceKeyword
815         ',' ByteConstExpr
816         ',' ByteConstExpr
817         ',' QWordConstExpr
818         OptionalAccessSize
819         OptionalNameString_Last
820         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,6,$4,$6,$8,$10,$11,$12);}
821     | PARSEOP_REGISTER
822         PARSEOP_OPEN_PAREN
823         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
824     ;
825 
826 SpiSerialBusTerm
827     : PARSEOP_SPI_SERIALBUS
828         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS);}
829         WordConstExpr               /* 04: DeviceSelection */
830         OptionalDevicePolarity      /* 05: DevicePolarity */
831         OptionalWireMode            /* 06: WireMode */
832         ',' ByteConstExpr           /* 08: DataBitLength */
833         OptionalSlaveMode           /* 09: SlaveMode */
834         ',' DWordConstExpr          /* 11: ConnectionSpeed */
835         ',' ClockPolarityKeyword    /* 13: ClockPolarity */
836         ',' ClockPhaseKeyword       /* 15: ClockPhase */
837         ',' StringData              /* 17: ResourceSource */
838         OptionalByteConstExpr       /* 18: ResourceSourceIndex */
839         OptionalResourceType        /* 19: ResourceType */
840         OptionalNameString          /* 20: DescriptorName */
841         OptionalBuffer_Last         /* 21: VendorData */
842         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
843                                         $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,
844                                         TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
845     | PARSEOP_SPI_SERIALBUS
846         PARSEOP_OPEN_PAREN
847         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
848     ;
849 
850 SpiSerialBusTermV2
851     : PARSEOP_SPI_SERIALBUS_V2
852         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_SPI_SERIALBUS_V2);}
853         WordConstExpr               /* 04: DeviceSelection */
854         OptionalDevicePolarity      /* 05: DevicePolarity */
855         OptionalWireMode            /* 06: WireMode */
856         ',' ByteConstExpr           /* 08: DataBitLength */
857         OptionalSlaveMode           /* 09: SlaveMode */
858         ',' DWordConstExpr          /* 11: ConnectionSpeed */
859         ',' ClockPolarityKeyword    /* 13: ClockPolarity */
860         ',' ClockPhaseKeyword       /* 15: ClockPhase */
861         ',' StringData              /* 17: ResourceSource */
862         OptionalByteConstExpr       /* 18: ResourceSourceIndex */
863         OptionalResourceType        /* 19: ResourceType */
864         OptionalNameString          /* 20: DescriptorName */
865         OptionalShareType           /* 21: Share */
866         OptionalBuffer_Last         /* 22: VendorData */
867         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
868                                         $4,$5,$6,$8,$9,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
869     | PARSEOP_SPI_SERIALBUS_V2
870         PARSEOP_OPEN_PAREN
871         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
872     ;
873 
874 StartDependentFnNoPriTerm
875     : PARSEOP_STARTDEPENDENTFN_NOPRI
876         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN_NOPRI);}
877         PARSEOP_CLOSE_PAREN '{'
878         ResourceMacroList '}'       {$$ = TrLinkOpChildren ($<n>3,1,$6);}
879     | PARSEOP_STARTDEPENDENTFN_NOPRI
880         PARSEOP_OPEN_PAREN
881         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
882     ;
883 
884 StartDependentFnTerm
885     : PARSEOP_STARTDEPENDENTFN
886         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_STARTDEPENDENTFN);}
887         ByteConstExpr
888         ',' ByteConstExpr
889         PARSEOP_CLOSE_PAREN '{'
890         ResourceMacroList '}'       {$$ = TrLinkOpChildren ($<n>3,3,$4,$6,$9);}
891     | PARSEOP_STARTDEPENDENTFN
892         PARSEOP_OPEN_PAREN
893         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
894     ;
895 
896 UartSerialBusTerm
897     : PARSEOP_UART_SERIALBUS
898         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS);}
899         DWordConstExpr              /* 04: ConnectionSpeed */
900         OptionalBitsPerByte         /* 05: BitsPerByte */
901         OptionalStopBits            /* 06: StopBits */
902         ',' ByteConstExpr           /* 08: LinesInUse */
903         OptionalEndian              /* 09: Endianness */
904         OptionalParityType          /* 10: Parity */
905         OptionalFlowControl         /* 11: FlowControl */
906         ',' WordConstExpr           /* 13: Rx BufferSize */
907         ',' WordConstExpr           /* 15: Tx BufferSize */
908         ',' StringData              /* 17: ResourceSource */
909         OptionalByteConstExpr       /* 18: ResourceSourceIndex */
910         OptionalResourceType        /* 19: ResourceType */
911         OptionalNameString          /* 20: DescriptorName */
912         OptionalBuffer_Last         /* 21: VendorData */
913         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
914                                         $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,
915                                         TrCreateLeafOp (PARSEOP_DEFAULT_ARG),$21);}
916     | PARSEOP_UART_SERIALBUS
917         PARSEOP_OPEN_PAREN
918         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
919     ;
920 
921 UartSerialBusTermV2
922     : PARSEOP_UART_SERIALBUS_V2
923         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_UART_SERIALBUS_V2);}
924         DWordConstExpr              /* 04: ConnectionSpeed */
925         OptionalBitsPerByte         /* 05: BitsPerByte */
926         OptionalStopBits            /* 06: StopBits */
927         ',' ByteConstExpr           /* 08: LinesInUse */
928         OptionalEndian              /* 09: Endianness */
929         OptionalParityType          /* 10: Parity */
930         OptionalFlowControl         /* 11: FlowControl */
931         ',' WordConstExpr           /* 13: Rx BufferSize */
932         ',' WordConstExpr           /* 15: Tx BufferSize */
933         ',' StringData              /* 17: ResourceSource */
934         OptionalByteConstExpr       /* 18: ResourceSourceIndex */
935         OptionalResourceType        /* 19: ResourceType */
936         OptionalNameString          /* 20: DescriptorName */
937         OptionalShareType           /* 21: Share */
938         OptionalBuffer_Last         /* 22: VendorData */
939         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
940                                         $4,$5,$6,$8,$9,$10,$11,$13,$15,$17,$18,$19,$20,$21,$22);}
941     | PARSEOP_UART_SERIALBUS_V2
942         PARSEOP_OPEN_PAREN
943         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
944     ;
945 
946 VendorLongTerm
947     : PARSEOP_VENDORLONG
948         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORLONG);}
949         OptionalNameString_First
950         PARSEOP_CLOSE_PAREN '{'
951             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
952     | PARSEOP_VENDORLONG
953         PARSEOP_OPEN_PAREN
954         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
955     ;
956 
957 VendorShortTerm
958     : PARSEOP_VENDORSHORT
959         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_VENDORSHORT);}
960         OptionalNameString_First
961         PARSEOP_CLOSE_PAREN '{'
962             ByteList '}'            {$$ = TrLinkOpChildren ($<n>3,2,$4,$7);}
963     | PARSEOP_VENDORSHORT
964         PARSEOP_OPEN_PAREN
965         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
966     ;
967 
968 WordBusNumberTerm
969     : PARSEOP_WORDBUSNUMBER
970         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WORDBUSNUMBER);}
971         OptionalResourceType_First
972         OptionalMinType
973         OptionalMaxType
974         OptionalDecodeType
975         ',' WordConstExpr
976         ',' WordConstExpr
977         ',' WordConstExpr
978         ',' WordConstExpr
979         ',' WordConstExpr
980         OptionalByteConstExpr
981         OptionalStringData
982         OptionalNameString_Last
983         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,12,
984                                         $4,$5,$6,$7,$9,$11,$13,$15,$17,$18,$19,$20);}
985     | PARSEOP_WORDBUSNUMBER
986         PARSEOP_OPEN_PAREN
987         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
988     ;
989 
990 WordIOTerm
991     : PARSEOP_WORDIO
992         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WORDIO);}
993         OptionalResourceType_First
994         OptionalMinType
995         OptionalMaxType
996         OptionalDecodeType
997         OptionalRangeType
998         ',' WordConstExpr
999         ',' WordConstExpr
1000         ',' WordConstExpr
1001         ',' WordConstExpr
1002         ',' WordConstExpr
1003         OptionalByteConstExpr
1004         OptionalStringData
1005         OptionalNameString
1006         OptionalType
1007         OptionalTranslationType_Last
1008         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,15,
1009                                         $4,$5,$6,$7,$8,$10,$12,$14,$16,$18,$19,$20,$21,$22,$23);}
1010     | PARSEOP_WORDIO
1011         PARSEOP_OPEN_PAREN
1012         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1013     ;
1014 
1015 WordSpaceTerm
1016     : PARSEOP_WORDSPACE
1017         PARSEOP_OPEN_PAREN          {$<n>$ = TrCreateLeafOp (PARSEOP_WORDSPACE);}
1018         ByteConstExpr               {UtCheckIntegerRange ($4, 0xC0, 0xFF);}
1019         OptionalResourceType
1020         OptionalDecodeType
1021         OptionalMinType
1022         OptionalMaxType
1023         ',' ByteConstExpr
1024         ',' WordConstExpr
1025         ',' WordConstExpr
1026         ',' WordConstExpr
1027         ',' WordConstExpr
1028         ',' WordConstExpr
1029         OptionalByteConstExpr
1030         OptionalStringData
1031         OptionalNameString_Last
1032         PARSEOP_CLOSE_PAREN         {$$ = TrLinkOpChildren ($<n>3,14,
1033                                         $4,$6,$7,$8,$9,$11,$13,$15,$17,$19,$21,$22,$23,$24);}
1034     | PARSEOP_WORDSPACE
1035         PARSEOP_OPEN_PAREN
1036         error PARSEOP_CLOSE_PAREN   {$$ = AslDoError(); yyclearin;}
1037     ;
1038