-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathparser.cxx
9141 lines (8250 loc) · 378 KB
/
parser.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* A Bison parser, made by GNU Bison 2.3. */
/* Skeleton implementation for Bison's Yacc-like parsers in C
Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA. */
/* As a special exception, you may create a larger work that contains
part or all of the Bison parser skeleton and distribute that work
under terms of your choice, so long as that work isn't itself a
parser generator using the skeleton or a modified version thereof
as a parser skeleton. Alternatively, if you modify or redistribute
the parser skeleton itself, you may (at your option) remove this
special exception, which will cause the skeleton and the resulting
Bison output files to be licensed under the GNU General Public
License without this special exception.
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
/* C LALR(1) parser skeleton written by Richard Stallman, by
simplifying the original so-called "semantic" parser. */
/* All symbols defined below should begin with yy or YY, to avoid
infringing on user name space. This should be done even for local
variables, as they might otherwise be expanded by user macros.
There are some unavoidable exceptions within include files to
define necessary library symbols; they are noted "INFRINGES ON
USER NAME SPACE" below. */
/* Identify Bison output. */
#define YYBISON 1
/* Bison version. */
#define YYBISON_VERSION "2.3"
/* Skeleton name. */
#define YYSKELETON_NAME "yacc.c"
/* Pure parsers. */
#define YYPURE 1
/* Using locations. */
#define YYLSP_NEEDED 0
/* Tokens. */
#ifndef YYTOKENTYPE
# define YYTOKENTYPE
/* Put the tokens into the symbol table, so that GDB and other debuggers
know about them. */
enum yytokentype {
TOK_BracketOnly = 258,
TypeUndef = 259,
TypeEndLine = 260,
TypeComment = 261,
TypeNumber = 262,
TypeLiteral = 263,
TypeIdentifier = 264,
TypeMacroName = 265,
TypeMacroArg = 266,
TypeEndOfINCLUDE = 267,
TypeNoFileINCLUDE = 268,
TypeWhiteSpace = 269,
TypeMOD = 270,
TypeSHL = 271,
TypeSHR = 272,
TypeNOT = 273,
TypeEQ = 274,
TypeLT = 275,
TypeLE = 276,
TypeGT = 277,
TypeGE = 278,
TypeNE = 279,
TypeNUL = 280,
TypeDEFINED = 281,
TypeHIGH = 282,
TypeLOW = 283,
TypeShlOp = 284,
TypeShrOp = 285,
TypeLeOp = 286,
TypeGeOp = 287,
TypeNeOp = 288,
TypeBoolAnd = 289,
TypeBoolOr = 290,
TypeSharpSharp = 291,
TypeADC = 292,
TypeADD = 293,
TypeAND = 294,
TypeBIT = 295,
TypeCALL = 296,
TypeCCF = 297,
TypeCP = 298,
TypeCPD = 299,
TypeCPDR = 300,
TypeCPI = 301,
TypeCPIR = 302,
TypeCPL = 303,
TypeDAA = 304,
TypeDEC = 305,
TypeDI = 306,
TypeDJNZ = 307,
TypeEI = 308,
TypeEX = 309,
TypeEXX = 310,
TypeHALT = 311,
TypeIM = 312,
TypeIN = 313,
TypeINC = 314,
TypeIND = 315,
TypeINDR = 316,
TypeINI = 317,
TypeINIR = 318,
TypeJP = 319,
TypeJR = 320,
TypeLD = 321,
TypeLDD = 322,
TypeLDDR = 323,
TypeLDI = 324,
TypeLDIR = 325,
TypeNEG = 326,
TypeNOP = 327,
TypeOR = 328,
TypeOTDR = 329,
TypeOTIR = 330,
TypeOUT = 331,
TypeOUTD = 332,
TypeOUTI = 333,
TypePOP = 334,
TypePUSH = 335,
TypeRES = 336,
TypeRET = 337,
TypeRETI = 338,
TypeRETN = 339,
TypeRL = 340,
TypeRLA = 341,
TypeRLC = 342,
TypeRLCA = 343,
TypeRLD = 344,
TypeRR = 345,
TypeRRA = 346,
TypeRRC = 347,
TypeRRCA = 348,
TypeRRD = 349,
TypeRST = 350,
TypeSBC = 351,
TypeSCF = 352,
TypeSET = 353,
TypeSLA = 354,
TypeSLL = 355,
TypeSRA = 356,
TypeSRL = 357,
TypeSUB = 358,
TypeXOR = 359,
TypeA = 360,
TypeAF = 361,
TypeAFp = 362,
TypeB = 363,
TypeBC = 364,
TypeD = 365,
TypeE = 366,
TypeDE = 367,
TypeH = 368,
TypeL = 369,
TypeHL = 370,
TypeSP = 371,
TypeIX = 372,
TypeIXH = 373,
TypeIXL = 374,
TypeIY = 375,
TypeIYH = 376,
TypeIYL = 377,
TypeI = 378,
TypeR = 379,
TypeNZ = 380,
TypeZ = 381,
TypeNC = 382,
TypeC = 383,
TypePO = 384,
TypePE = 385,
TypeP = 386,
TypeM = 387,
TypeASEG = 388,
TypeCOMMON = 389,
TypeCSEG = 390,
TypeDB = 391,
TypeDEFB = 392,
TypeDEFL = 393,
TypeDEFM = 394,
TypeDEFS = 395,
TypeDEFW = 396,
TypeDS = 397,
TypeDSEG = 398,
TypeDW = 399,
TypeELSE = 400,
TypeEND = 401,
TypeENDIF = 402,
TypeENDM = 403,
TypeENDP = 404,
TypeEQU = 405,
TypeEXITM = 406,
TypeEXTRN = 407,
TypeIF = 408,
TypeIF1 = 409,
TypeIF2 = 410,
TypeIFDEF = 411,
TypeIFNDEF = 412,
TypeINCBIN = 413,
TypeINCLUDE = 414,
TypeIRP = 415,
TypeIRPC = 416,
TypeLOCAL = 417,
TypeMACRO = 418,
TypeORG = 419,
TypePROC = 420,
TypePUBLIC = 421,
TypeREPT = 422,
Type_8080 = 423,
Type_8086 = 424,
Type_DEPHASE = 425,
Type_ERROR = 426,
Type_PHASE = 427,
Type_SHIFT = 428,
Type_WARNING = 429,
Type_Z80 = 430,
TypeAND_8080 = 431,
TypeOR_8080 = 432,
TypeXOR_8080 = 433,
TypeM_8080 = 434,
TypePSW_8080 = 435,
TypeSET_8080 = 436,
TypeADC_8080 = 437,
TypeADD_8080 = 438,
TypeACI_8080 = 439,
TypeADI_8080 = 440,
TypeANA_8080 = 441,
TypeANI_8080 = 442,
TypeCALL_8080 = 443,
TypeCC_8080 = 444,
TypeCM_8080 = 445,
TypeCMA_8080 = 446,
TypeCMC_8080 = 447,
TypeCMP_8080 = 448,
TypeCNC_8080 = 449,
TypeCNZ_8080 = 450,
TypeCP_8080 = 451,
TypeCPE_8080 = 452,
TypeCPI_8080 = 453,
TypeCPO_8080 = 454,
TypeCZ_8080 = 455,
TypeDAD_8080 = 456,
TypeDCR_8080 = 457,
TypeDCX_8080 = 458,
TypeHLT_8080 = 459,
TypeIN_8080 = 460,
TypeINR_8080 = 461,
TypeINX_8080 = 462,
TypeJC_8080 = 463,
TypeJM_8080 = 464,
TypeJMP_8080 = 465,
TypeJNC_8080 = 466,
TypeJNZ_8080 = 467,
TypeJP_8080 = 468,
TypeJPE_8080 = 469,
TypeJPO_8080 = 470,
TypeJZ_8080 = 471,
TypeLDA_8080 = 472,
TypeLDAX_8080 = 473,
TypeLHLD_8080 = 474,
TypeLXI_8080 = 475,
TypeMVI_8080 = 476,
TypeMOV_8080 = 477,
TypeORA_8080 = 478,
TypeORI_8080 = 479,
TypeOUT_8080 = 480,
TypePCHL_8080 = 481,
TypePOP_8080 = 482,
TypePUSH_8080 = 483,
TypeRAL_8080 = 484,
TypeRAR_8080 = 485,
TypeRLC_8080 = 486,
TypeRC_8080 = 487,
TypeRRC_8080 = 488,
TypeRET_8080 = 489,
TypeRM_8080 = 490,
TypeRNC_8080 = 491,
TypeRNZ_8080 = 492,
TypeRP_8080 = 493,
TypeRPE_8080 = 494,
TypeRPO_8080 = 495,
TypeRST_8080 = 496,
TypeRZ_8080 = 497,
TypeSBB_8080 = 498,
TypeSBI_8080 = 499,
TypeSHLD_8080 = 500,
TypeSPHL_8080 = 501,
TypeSTA_8080 = 502,
TypeSTAX_8080 = 503,
TypeSTC_8080 = 504,
TypeSUB_8080 = 505,
TypeSUI_8080 = 506,
TypeXCHG_8080 = 507,
TypeXRA_8080 = 508,
TypeXRI_8080 = 509,
TypeXTHL_8080 = 510
};
#endif
/* Tokens. */
#define TOK_BracketOnly 258
#define TypeUndef 259
#define TypeEndLine 260
#define TypeComment 261
#define TypeNumber 262
#define TypeLiteral 263
#define TypeIdentifier 264
#define TypeMacroName 265
#define TypeMacroArg 266
#define TypeEndOfINCLUDE 267
#define TypeNoFileINCLUDE 268
#define TypeWhiteSpace 269
#define TypeMOD 270
#define TypeSHL 271
#define TypeSHR 272
#define TypeNOT 273
#define TypeEQ 274
#define TypeLT 275
#define TypeLE 276
#define TypeGT 277
#define TypeGE 278
#define TypeNE 279
#define TypeNUL 280
#define TypeDEFINED 281
#define TypeHIGH 282
#define TypeLOW 283
#define TypeShlOp 284
#define TypeShrOp 285
#define TypeLeOp 286
#define TypeGeOp 287
#define TypeNeOp 288
#define TypeBoolAnd 289
#define TypeBoolOr 290
#define TypeSharpSharp 291
#define TypeADC 292
#define TypeADD 293
#define TypeAND 294
#define TypeBIT 295
#define TypeCALL 296
#define TypeCCF 297
#define TypeCP 298
#define TypeCPD 299
#define TypeCPDR 300
#define TypeCPI 301
#define TypeCPIR 302
#define TypeCPL 303
#define TypeDAA 304
#define TypeDEC 305
#define TypeDI 306
#define TypeDJNZ 307
#define TypeEI 308
#define TypeEX 309
#define TypeEXX 310
#define TypeHALT 311
#define TypeIM 312
#define TypeIN 313
#define TypeINC 314
#define TypeIND 315
#define TypeINDR 316
#define TypeINI 317
#define TypeINIR 318
#define TypeJP 319
#define TypeJR 320
#define TypeLD 321
#define TypeLDD 322
#define TypeLDDR 323
#define TypeLDI 324
#define TypeLDIR 325
#define TypeNEG 326
#define TypeNOP 327
#define TypeOR 328
#define TypeOTDR 329
#define TypeOTIR 330
#define TypeOUT 331
#define TypeOUTD 332
#define TypeOUTI 333
#define TypePOP 334
#define TypePUSH 335
#define TypeRES 336
#define TypeRET 337
#define TypeRETI 338
#define TypeRETN 339
#define TypeRL 340
#define TypeRLA 341
#define TypeRLC 342
#define TypeRLCA 343
#define TypeRLD 344
#define TypeRR 345
#define TypeRRA 346
#define TypeRRC 347
#define TypeRRCA 348
#define TypeRRD 349
#define TypeRST 350
#define TypeSBC 351
#define TypeSCF 352
#define TypeSET 353
#define TypeSLA 354
#define TypeSLL 355
#define TypeSRA 356
#define TypeSRL 357
#define TypeSUB 358
#define TypeXOR 359
#define TypeA 360
#define TypeAF 361
#define TypeAFp 362
#define TypeB 363
#define TypeBC 364
#define TypeD 365
#define TypeE 366
#define TypeDE 367
#define TypeH 368
#define TypeL 369
#define TypeHL 370
#define TypeSP 371
#define TypeIX 372
#define TypeIXH 373
#define TypeIXL 374
#define TypeIY 375
#define TypeIYH 376
#define TypeIYL 377
#define TypeI 378
#define TypeR 379
#define TypeNZ 380
#define TypeZ 381
#define TypeNC 382
#define TypeC 383
#define TypePO 384
#define TypePE 385
#define TypeP 386
#define TypeM 387
#define TypeASEG 388
#define TypeCOMMON 389
#define TypeCSEG 390
#define TypeDB 391
#define TypeDEFB 392
#define TypeDEFL 393
#define TypeDEFM 394
#define TypeDEFS 395
#define TypeDEFW 396
#define TypeDS 397
#define TypeDSEG 398
#define TypeDW 399
#define TypeELSE 400
#define TypeEND 401
#define TypeENDIF 402
#define TypeENDM 403
#define TypeENDP 404
#define TypeEQU 405
#define TypeEXITM 406
#define TypeEXTRN 407
#define TypeIF 408
#define TypeIF1 409
#define TypeIF2 410
#define TypeIFDEF 411
#define TypeIFNDEF 412
#define TypeINCBIN 413
#define TypeINCLUDE 414
#define TypeIRP 415
#define TypeIRPC 416
#define TypeLOCAL 417
#define TypeMACRO 418
#define TypeORG 419
#define TypePROC 420
#define TypePUBLIC 421
#define TypeREPT 422
#define Type_8080 423
#define Type_8086 424
#define Type_DEPHASE 425
#define Type_ERROR 426
#define Type_PHASE 427
#define Type_SHIFT 428
#define Type_WARNING 429
#define Type_Z80 430
#define TypeAND_8080 431
#define TypeOR_8080 432
#define TypeXOR_8080 433
#define TypeM_8080 434
#define TypePSW_8080 435
#define TypeSET_8080 436
#define TypeADC_8080 437
#define TypeADD_8080 438
#define TypeACI_8080 439
#define TypeADI_8080 440
#define TypeANA_8080 441
#define TypeANI_8080 442
#define TypeCALL_8080 443
#define TypeCC_8080 444
#define TypeCM_8080 445
#define TypeCMA_8080 446
#define TypeCMC_8080 447
#define TypeCMP_8080 448
#define TypeCNC_8080 449
#define TypeCNZ_8080 450
#define TypeCP_8080 451
#define TypeCPE_8080 452
#define TypeCPI_8080 453
#define TypeCPO_8080 454
#define TypeCZ_8080 455
#define TypeDAD_8080 456
#define TypeDCR_8080 457
#define TypeDCX_8080 458
#define TypeHLT_8080 459
#define TypeIN_8080 460
#define TypeINR_8080 461
#define TypeINX_8080 462
#define TypeJC_8080 463
#define TypeJM_8080 464
#define TypeJMP_8080 465
#define TypeJNC_8080 466
#define TypeJNZ_8080 467
#define TypeJP_8080 468
#define TypeJPE_8080 469
#define TypeJPO_8080 470
#define TypeJZ_8080 471
#define TypeLDA_8080 472
#define TypeLDAX_8080 473
#define TypeLHLD_8080 474
#define TypeLXI_8080 475
#define TypeMVI_8080 476
#define TypeMOV_8080 477
#define TypeORA_8080 478
#define TypeORI_8080 479
#define TypeOUT_8080 480
#define TypePCHL_8080 481
#define TypePOP_8080 482
#define TypePUSH_8080 483
#define TypeRAL_8080 484
#define TypeRAR_8080 485
#define TypeRLC_8080 486
#define TypeRC_8080 487
#define TypeRRC_8080 488
#define TypeRET_8080 489
#define TypeRM_8080 490
#define TypeRNC_8080 491
#define TypeRNZ_8080 492
#define TypeRP_8080 493
#define TypeRPE_8080 494
#define TypeRPO_8080 495
#define TypeRST_8080 496
#define TypeRZ_8080 497
#define TypeSBB_8080 498
#define TypeSBI_8080 499
#define TypeSHLD_8080 500
#define TypeSPHL_8080 501
#define TypeSTA_8080 502
#define TypeSTAX_8080 503
#define TypeSTC_8080 504
#define TypeSUB_8080 505
#define TypeSUI_8080 506
#define TypeXCHG_8080 507
#define TypeXRA_8080 508
#define TypeXRI_8080 509
#define TypeXTHL_8080 510
/* Copy the first part of user declarations. */
#line 6 "../parser.yxx"
#include "pasmoimpl.h"
#include "machine.h"
#include "parseraux.h"
namespace pasmo {
namespace impl {
namespace parser {
inline Oper getop (const Token & tok)
{
return static_cast <Oper> (tok.num () );
}
inline bool isparenexp (const Token & tok)
{
return tok.num () != 0;
}
inline void checkugly (Machine & mach, const Token & tok)
{
if (isparenexp (tok) )
mach.ugly ();
}
} /* namespace parser */
#line 340 "../parser.yxx"
namespace parser {
const address value_0= address (0);
const address value_1= address (1);
#define GENVALADDR(r) \
const address val ## r= static_cast <address> (r)
GENVALADDR (TypeA);
GENVALADDR (TypeC);
GENVALADDR (TypeBC);
GENVALADDR (TypeDE);
GENVALADDR (TypeHL);
GENVALADDR (TypeM);
GENVALADDR (TypeNC);
GENVALADDR (TypeNZ);
GENVALADDR (TypeP);
GENVALADDR (TypePE);
GENVALADDR (TypePO);
GENVALADDR (TypeZ);
GENVALADDR (regA);
GENVALADDR (regB);
GENVALADDR (regC);
GENVALADDR (regD);
GENVALADDR (regE);
GENVALADDR (regH);
GENVALADDR (regL);
GENVALADDR (reg_HL_);
GENVALADDR (regAF);
GENVALADDR (regBC);
GENVALADDR (regDE);
GENVALADDR (regHL);
GENVALADDR (regSP);
GENVALADDR (flagNZ);
GENVALADDR (flagZ);
GENVALADDR (flagNC);
GENVALADDR (flagC);
GENVALADDR (flagPO);
GENVALADDR (flagPE);
GENVALADDR (flagP);
GENVALADDR (flagM);
GENVALADDR (prefixNone);
GENVALADDR (prefixIX);
GENVALADDR (prefixIY);
GENVALADDR (tiADCA);
GENVALADDR (tiADDA);
GENVALADDR (tiAND);
GENVALADDR (tiCP);
GENVALADDR (tiOR);
GENVALADDR (tiSBCA);
GENVALADDR (tiSUB);
GENVALADDR (tiXOR);
GENVALADDR (codeBIT);
GENVALADDR (codeLD_A_I);
GENVALADDR (codeLD_A_R);
GENVALADDR (codeLD_I_A);
GENVALADDR (codeLD_R_A);
GENVALADDR (codeRES);
GENVALADDR (codeRL);
GENVALADDR (codeRLC);
GENVALADDR (codeRR);
GENVALADDR (codeRRC);
GENVALADDR (codeSET);
GENVALADDR (codeSLA);
GENVALADDR (codeSLL);
GENVALADDR (codeSRA);
GENVALADDR (codeSRL);
#undef GENVALADDR
inline void addregIXH (Machine & mach)
{
mach.addcode (valregH);
mach.addcode (valprefixIX);
}
inline void addregIXL (Machine & mach)
{
mach.addcode (valregL);
mach.addcode (valprefixIX);
}
inline void addregIYH (Machine & mach)
{
mach.addcode (valregH);
mach.addcode (valprefixIY);
}
inline void addregIYL (Machine & mach)
{
mach.addcode (valregL);
mach.addcode (valprefixIY);
}
} /* namespace parser */
using namespace parser;
/* Enabling traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
#endif
/* Enabling verbose error messages. */
#ifdef YYERROR_VERBOSE
# undef YYERROR_VERBOSE
# define YYERROR_VERBOSE 1
#else
# define YYERROR_VERBOSE 0
#endif
/* Enabling the token table. */
#ifndef YYTOKEN_TABLE
# define YYTOKEN_TABLE 0
#endif
#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED
typedef int YYSTYPE;
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1
# define YYSTYPE_IS_TRIVIAL 1
#endif
/* Copy the second part of user declarations. */
/* Line 216 of yacc.c. */
#line 748 "parser.cxx"
#ifdef short
# undef short
#endif
#ifdef YYTYPE_UINT8
typedef YYTYPE_UINT8 yytype_uint8;
#else
typedef unsigned char yytype_uint8;
#endif
#ifdef YYTYPE_INT8
typedef YYTYPE_INT8 yytype_int8;
#elif (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
typedef signed char yytype_int8;
#else
typedef short int yytype_int8;
#endif
#ifdef YYTYPE_UINT16
typedef YYTYPE_UINT16 yytype_uint16;
#else
typedef unsigned short int yytype_uint16;
#endif
#ifdef YYTYPE_INT16
typedef YYTYPE_INT16 yytype_int16;
#else
typedef short int yytype_int16;
#endif
#ifndef YYSIZE_T
# ifdef __SIZE_TYPE__
# define YYSIZE_T __SIZE_TYPE__
# elif defined size_t
# define YYSIZE_T size_t
# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
# define YYSIZE_T size_t
# else
# define YYSIZE_T unsigned int
# endif
#endif
#define YYSIZE_MAXIMUM ((YYSIZE_T) -1)
#ifndef YY_
# if YYENABLE_NLS
# if ENABLE_NLS
# include <libintl.h> /* INFRINGES ON USER NAME SPACE */
# define YY_(msgid) dgettext ("bison-runtime", msgid)
# endif
# endif
# ifndef YY_
# define YY_(msgid) msgid
# endif
#endif
/* Suppress unused-variable warnings by "using" E. */
#if ! defined lint || defined __GNUC__
# define YYUSE(e) ((void) (e))
#else
# define YYUSE(e) /* empty */
#endif
/* Identity function, used to suppress warnings about constant conditions. */
#ifndef lint
# define YYID(n) (n)
#else
#if (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
static int
YYID (int i)
#else
static int
YYID (i)
int i;
#endif
{
return i;
}
#endif
#if ! defined yyoverflow || YYERROR_VERBOSE
/* The parser invokes alloca or malloc; define the necessary symbols. */
# ifdef YYSTACK_USE_ALLOCA
# if YYSTACK_USE_ALLOCA
# ifdef __GNUC__
# define YYSTACK_ALLOC __builtin_alloca
# elif defined __BUILTIN_VA_ARG_INCR
# include <alloca.h> /* INFRINGES ON USER NAME SPACE */
# elif defined _AIX
# define YYSTACK_ALLOC __alloca
# elif defined _MSC_VER
# include <malloc.h> /* INFRINGES ON USER NAME SPACE */
# define alloca _alloca
# else
# define YYSTACK_ALLOC alloca
# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# endif
# endif
# endif
# ifdef YYSTACK_ALLOC
/* Pacify GCC's `empty if-body' warning. */
# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0))
# ifndef YYSTACK_ALLOC_MAXIMUM
/* The OS might guarantee only one guard page at the bottom of the stack,
and a page size can be as small as 4096 bytes. So we cannot safely
invoke alloca (N) if N exceeds 4096. Use a slightly smaller number
to allow for a few compiler-allocated temporary stack slots. */
# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */
# endif
# else
# define YYSTACK_ALLOC YYMALLOC
# define YYSTACK_FREE YYFREE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM
# endif
# if (defined __cplusplus && ! defined _STDLIB_H \
&& ! ((defined YYMALLOC || defined malloc) \
&& (defined YYFREE || defined free)))
# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
# ifndef _STDLIB_H
# define _STDLIB_H 1
# endif
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifndef YYFREE
# define YYFREE free
# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \
|| defined __cplusplus || defined _MSC_VER)
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# endif
#endif /* ! defined yyoverflow || YYERROR_VERBOSE */
#if (! defined yyoverflow \
&& (! defined __cplusplus \
|| (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
/* A type that is properly aligned for any stack member. */
union yyalloc
{
yytype_int16 yyss;
YYSTYPE yyvs;
};
/* The size of the maximum gap between one aligned stack and the next. */
# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1)
/* The size of an array large to enough to hold all stacks, each with
N elements. */
# define YYSTACK_BYTES(N) \
((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \
+ YYSTACK_GAP_MAXIMUM)
/* Copy COUNT objects from FROM to TO. The source and destination do
not overlap. */
# ifndef YYCOPY
# if defined __GNUC__ && 1 < __GNUC__
# define YYCOPY(To, From, Count) \
__builtin_memcpy (To, From, (Count) * sizeof (*(From)))
# else
# define YYCOPY(To, From, Count) \
do \
{ \
YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
while (YYID (0))
# endif
# endif
/* Relocate STACK from its old location to the new one. The
local variables YYSIZE and YYSTACKSIZE give the old and new number of
elements in the stack, and YYPTR gives the new location of the
stack. Advance YYPTR to a properly aligned location for the next
stack. */
# define YYSTACK_RELOCATE(Stack) \
do \
{ \
YYSIZE_T yynewbytes; \
YYCOPY (&yyptr->Stack, Stack, yysize); \
Stack = &yyptr->Stack; \
yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \
yyptr += yynewbytes / sizeof (*yyptr); \
} \
while (YYID (0))
#endif
/* YYFINAL -- State number of the termination state. */
#define YYFINAL 716
/* YYLAST -- Last index in YYTABLE. */
#define YYLAST 9425
/* YYNTOKENS -- Number of terminals. */
#define YYNTOKENS 276
/* YYNNTS -- Number of nonterminals. */
#define YYNNTS 613
/* YYNRULES -- Number of rules. */
#define YYNRULES 1444
/* YYNRULES -- Number of states. */
#define YYNSTATES 2025
/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */
#define YYUNDEFTOK 2
#define YYMAXUTOK 510
#define YYTRANSLATE(YYX) \
((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK)
/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */
static const yytype_uint16 yytranslate[] =
{
0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 259, 2, 2, 275, 267, 257, 2,
270, 272, 265, 264, 269, 263, 2, 266, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 268, 2,
261, 260, 262, 274, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 271, 2, 273, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 256, 2, 258, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
2, 2, 2, 2, 2, 2, 2, 2, 2, 2,