| 1 | #################################################################### | ||
| 2 | # | ||
| 3 | # This file was generated using Parse::Yapp version 1.05. | ||
| 4 | # | ||
| 5 | # Don't edit this file, use source file instead. | ||
| 6 | # | ||
| 7 | # ANY CHANGE MADE HERE WILL BE LOST ! | ||
| 8 | # | ||
| 9 | #################################################################### | ||
| 10 | package Getopt::Gen::Parser; | ||
| 11 | 1 | ▶ | use vars qw ( @ISA ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | 1 | @ISA= qw ( Parse::Yapp::Driver ); | |
| 15 | 1 | ▶ | use Parse::Yapp::Driver; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 16 | |||
| 17 | #line 16 "Gen/Parser.yp" | ||
| 18 | |||
| 19 | |||
| 20 | ############################################################### | ||
| 21 | # | ||
| 22 | # Source: Getopt::Gen::Parser.yp | ||
| 23 | # Source Author: Bryan Jurish <Gen/cmdline_pod.pm> | ||
| 24 | # | ||
| 25 | # Description: Yapp parser for DWDS query strings | ||
| 26 | # | ||
| 27 | ############################################################### | ||
| 28 | |||
| 29 | #============================================================== | ||
| 30 | # * WARNING * WARNING * WARNING * WARNING * WARNING * WARNING * | ||
| 31 | #============================================================== | ||
| 32 | # Do *NOT* change Parser.pm directly, change Parser.yp | ||
| 33 | # and re-call 'yapp' instead! | ||
| 34 | #============================================================== | ||
| 35 | |||
| 36 | package Getopt::Gen::Parser; | ||
| 37 | |||
| 38 | #-------------------------------------- | ||
| 39 | # Package variables | ||
| 40 | #-------------------------------------- | ||
| 41 | our $VERSION = 0.04; | ||
| 42 | |||
| 43 | #-------------------------------------- | ||
| 44 | # Hint routines | ||
| 45 | #-------------------------------------- | ||
| 46 | # undef = $yapp_parser->show_hint($hint_code,$curtok,$curval) | ||
| 47 | sub show_hint { | ||
| 48 | $_[0]->{USER}{'hint'} = $_[1]; | ||
| 49 | $_[0]->YYCurtok($_[2]) if (defined($_[2])); | ||
| 50 | $_[0]->YYCurval($_[3]) if (defined($_[3])); | ||
| 51 | $_[0]->YYError; | ||
| 52 | } | ||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | sub new { | ||
| 57 | my($class)=shift; | ||
| 58 | ref($class) | ||
| 59 | and $class=ref($class); | ||
| 60 | |||
| 61 | my($self)=$class->SUPER::new( yyversion => '1.05', | ||
| 62 | yystates => | ||
| 63 | [ | ||
| 64 | {#State 0 | ||
| 65 | ACTIONS => { | ||
| 66 | 'EOI' => 1 | ||
| 67 | }, | ||
| 68 | DEFAULT => -1, | ||
| 69 | GOTOS => { | ||
| 70 | 'specs' => 2 | ||
| 71 | } | ||
| 72 | }, | ||
| 73 | {#State 1 | ||
| 74 | DEFAULT => -2 | ||
| 75 | }, | ||
| 76 | {#State 2 | ||
| 77 | ACTIONS => { | ||
| 78 | 'EOI' => 7, | ||
| 79 | '' => 5, | ||
| 80 | 'NEWLINE' => 4 | ||
| 81 | }, | ||
| 82 | GOTOS => { | ||
| 83 | 'newlines' => 6, | ||
| 84 | 'newline' => 3 | ||
| 85 | } | ||
| 86 | }, | ||
| 87 | {#State 3 | ||
| 88 | DEFAULT => -67 | ||
| 89 | }, | ||
| 90 | {#State 4 | ||
| 91 | DEFAULT => -69 | ||
| 92 | }, | ||
| 93 | {#State 5 | ||
| 94 | DEFAULT => 0 | ||
| 95 | }, | ||
| 96 | {#State 6 | ||
| 97 | ACTIONS => { | ||
| 98 | 'TOK_OPTION' => 37, | ||
| 99 | 'TOK_PODPREAMBLE' => 36, | ||
| 100 | 'TOK_VERSION' => 25, | ||
| 101 | 'TOK_PACKAGE' => 32, | ||
| 102 | 'TOK_GROUP' => 29, | ||
| 103 | 'TOK_PURPOSE' => 28, | ||
| 104 | 'TOK_LONG' => 30, | ||
| 105 | 'TOK_CODE' => 17, | ||
| 106 | 'TOK_UNNAMED' => 18, | ||
| 107 | 'TOK_LONGDOUBLE' => 19, | ||
| 108 | 'TOK_SHORT' => 16, | ||
| 109 | 'SYMBOL' => 23, | ||
| 110 | 'TOK_STRING' => 24, | ||
| 111 | 'NEWLINE' => 4, | ||
| 112 | 'TOK_RCFILE' => 22, | ||
| 113 | 'TOK_DOUBLE' => 21, | ||
| 114 | 'TOK_FLAG' => 8, | ||
| 115 | 'TOK_FUNCT' => 9, | ||
| 116 | 'TOK_FLOAT' => 13, | ||
| 117 | 'TOK_INT' => 14, | ||
| 118 | 'TOK_TOGGLE' => 12, | ||
| 119 | 'TOK_ON_REPARSE' => 15, | ||
| 120 | 'TOK_ARGUMENT' => 10 | ||
| 121 | }, | ||
| 122 | DEFAULT => -4, | ||
| 123 | GOTOS => { | ||
| 124 | 'spec' => 27, | ||
| 125 | 'extended_spec' => 26, | ||
| 126 | 'newline' => 31, | ||
| 127 | 'basic_spec' => 11, | ||
| 128 | 'extended_option_type' => 34, | ||
| 129 | 'ggo_option_spec' => 33, | ||
| 130 | 'symbol' => 20, | ||
| 131 | 'user_spec' => 35 | ||
| 132 | } | ||
| 133 | }, | ||
| 134 | {#State 7 | ||
| 135 | DEFAULT => -3 | ||
| 136 | }, | ||
| 137 | {#State 8 | ||
| 138 | DEFAULT => -18 | ||
| 139 | }, | ||
| 140 | {#State 9 | ||
| 141 | DEFAULT => -17 | ||
| 142 | }, | ||
| 143 | {#State 10 | ||
| 144 | ACTIONS => { | ||
| 145 | 'DQ_STRING' => 38, | ||
| 146 | 'SQ_STRING' => 43, | ||
| 147 | 'BR_STRING' => 40, | ||
| 148 | 'SYMBOL' => 42, | ||
| 149 | 'BQ_STRING' => 39 | ||
| 150 | }, | ||
| 151 | GOTOS => { | ||
| 152 | 'string' => 41 | ||
| 153 | } | ||
| 154 | }, | ||
| 155 | {#State 11 | ||
| 156 | DEFAULT => -6 | ||
| 157 | }, | ||
| 158 | {#State 12 | ||
| 159 | DEFAULT => -19 | ||
| 160 | }, | ||
| 161 | {#State 13 | ||
| 162 | DEFAULT => -24 | ||
| 163 | }, | ||
| 164 | {#State 14 | ||
| 165 | DEFAULT => -21 | ||
| 166 | }, | ||
| 167 | {#State 15 | ||
| 168 | ACTIONS => { | ||
| 169 | 'BR_STRING' => 40, | ||
| 170 | 'BQ_STRING' => 39, | ||
| 171 | 'SYMBOL' => 42, | ||
| 172 | 'SQ_STRING' => 43, | ||
| 173 | 'DQ_STRING' => 38 | ||
| 174 | }, | ||
| 175 | GOTOS => { | ||
| 176 | 'reparse_action' => 44, | ||
| 177 | 'string' => 45 | ||
| 178 | } | ||
| 179 | }, | ||
| 180 | {#State 16 | ||
| 181 | DEFAULT => -22 | ||
| 182 | }, | ||
| 183 | {#State 17 | ||
| 184 | ACTIONS => { | ||
| 185 | 'DQ_STRING' => 38, | ||
| 186 | 'SQ_STRING' => 43, | ||
| 187 | 'BR_STRING' => 40, | ||
| 188 | 'SYMBOL' => 42, | ||
| 189 | 'BQ_STRING' => 39 | ||
| 190 | }, | ||
| 191 | GOTOS => { | ||
| 192 | 'string' => 46 | ||
| 193 | } | ||
| 194 | }, | ||
| 195 | {#State 18 | ||
| 196 | ACTIONS => { | ||
| 197 | 'BR_STRING' => 40, | ||
| 198 | 'SYMBOL' => 42, | ||
| 199 | 'BQ_STRING' => 39, | ||
| 200 | 'SQ_STRING' => 43, | ||
| 201 | 'DQ_STRING' => 38 | ||
| 202 | }, | ||
| 203 | GOTOS => { | ||
| 204 | 'string' => 47 | ||
| 205 | } | ||
| 206 | }, | ||
| 207 | {#State 19 | ||
| 208 | DEFAULT => -26 | ||
| 209 | }, | ||
| 210 | {#State 20 | ||
| 211 | ACTIONS => { | ||
| 212 | 'BR_STRING' => 40, | ||
| 213 | 'BQ_STRING' => 39, | ||
| 214 | 'SYMBOL' => 42, | ||
| 215 | 'SQ_STRING' => 43, | ||
| 216 | 'DQ_STRING' => 38 | ||
| 217 | }, | ||
| 218 | GOTOS => { | ||
| 219 | 'string' => 48, | ||
| 220 | 'user_value' => 49 | ||
| 221 | } | ||
| 222 | }, | ||
| 223 | {#State 21 | ||
| 224 | DEFAULT => -25 | ||
| 225 | }, | ||
| 226 | {#State 22 | ||
| 227 | ACTIONS => { | ||
| 228 | 'BQ_STRING' => 39, | ||
| 229 | 'SYMBOL' => 42, | ||
| 230 | 'BR_STRING' => 40, | ||
| 231 | 'DQ_STRING' => 38, | ||
| 232 | 'SQ_STRING' => 43 | ||
| 233 | }, | ||
| 234 | GOTOS => { | ||
| 235 | 'string' => 50 | ||
| 236 | } | ||
| 237 | }, | ||
| 238 | {#State 23 | ||
| 239 | DEFAULT => -60 | ||
| 240 | }, | ||
| 241 | {#State 24 | ||
| 242 | DEFAULT => -20 | ||
| 243 | }, | ||
| 244 | {#State 25 | ||
| 245 | ACTIONS => { | ||
| 246 | 'SQ_STRING' => 43, | ||
| 247 | 'DQ_STRING' => 38, | ||
| 248 | 'SYMBOL' => 42, | ||
| 249 | 'BQ_STRING' => 39, | ||
| 250 | 'BR_STRING' => 40 | ||
| 251 | }, | ||
| 252 | GOTOS => { | ||
| 253 | 'string' => 51 | ||
| 254 | } | ||
| 255 | }, | ||
| 256 | {#State 26 | ||
| 257 | DEFAULT => -8 | ||
| 258 | }, | ||
| 259 | {#State 27 | ||
| 260 | DEFAULT => -5 | ||
| 261 | }, | ||
| 262 | {#State 28 | ||
| 263 | ACTIONS => { | ||
| 264 | 'BR_STRING' => 40, | ||
| 265 | 'SYMBOL' => 42, | ||
| 266 | 'BQ_STRING' => 39, | ||
| 267 | 'SQ_STRING' => 43, | ||
| 268 | 'DQ_STRING' => 38 | ||
| 269 | }, | ||
| 270 | GOTOS => { | ||
| 271 | 'string' => 52 | ||
| 272 | } | ||
| 273 | }, | ||
| 274 | {#State 29 | ||
| 275 | ACTIONS => { | ||
| 276 | 'DQ_STRING' => 38, | ||
| 277 | 'SQ_STRING' => 43, | ||
| 278 | 'SYMBOL' => 42, | ||
| 279 | 'BQ_STRING' => 39, | ||
| 280 | 'BR_STRING' => 40 | ||
| 281 | }, | ||
| 282 | GOTOS => { | ||
| 283 | 'string' => 53 | ||
| 284 | } | ||
| 285 | }, | ||
| 286 | {#State 30 | ||
| 287 | DEFAULT => -23 | ||
| 288 | }, | ||
| 289 | {#State 31 | ||
| 290 | DEFAULT => -68 | ||
| 291 | }, | ||
| 292 | {#State 32 | ||
| 293 | ACTIONS => { | ||
| 294 | 'BR_STRING' => 40, | ||
| 295 | 'BQ_STRING' => 39, | ||
| 296 | 'SYMBOL' => 42, | ||
| 297 | 'SQ_STRING' => 43, | ||
| 298 | 'DQ_STRING' => 38 | ||
| 299 | }, | ||
| 300 | GOTOS => { | ||
| 301 | 'string' => 54 | ||
| 302 | } | ||
| 303 | }, | ||
| 304 | {#State 33 | ||
| 305 | DEFAULT => -7 | ||
| 306 | }, | ||
| 307 | {#State 34 | ||
| 308 | ACTIONS => { | ||
| 309 | 'DQ_STRING' => 38, | ||
| 310 | 'SQ_STRING' => 43, | ||
| 311 | 'MINUS' => 57, | ||
| 312 | 'BR_STRING' => 40, | ||
| 313 | 'BQ_STRING' => 39, | ||
| 314 | 'SYMBOL' => 42 | ||
| 315 | }, | ||
| 316 | GOTOS => { | ||
| 317 | 'longname' => 55, | ||
| 318 | 'string' => 56, | ||
| 319 | 'extended_option_body' => 58 | ||
| 320 | } | ||
| 321 | }, | ||
| 322 | {#State 35 | ||
| 323 | DEFAULT => -9 | ||
| 324 | }, | ||
| 325 | {#State 36 | ||
| 326 | ACTIONS => { | ||
| 327 | 'SYMBOL' => 42, | ||
| 328 | 'BQ_STRING' => 39, | ||
| 329 | 'BR_STRING' => 40, | ||
| 330 | 'SQ_STRING' => 43, | ||
| 331 | 'DQ_STRING' => 38 | ||
| 332 | }, | ||
| 333 | GOTOS => { | ||
| 334 | 'string' => 59 | ||
| 335 | } | ||
| 336 | }, | ||
| 337 | {#State 37 | ||
| 338 | ACTIONS => { | ||
| 339 | 'BQ_STRING' => 39, | ||
| 340 | 'SYMBOL' => 42, | ||
| 341 | 'BR_STRING' => 40, | ||
| 342 | 'MINUS' => 57, | ||
| 343 | 'SQ_STRING' => 43, | ||
| 344 | 'DQ_STRING' => 38 | ||
| 345 | }, | ||
| 346 | GOTOS => { | ||
| 347 | 'longname' => 60, | ||
| 348 | 'string' => 56 | ||
| 349 | } | ||
| 350 | }, | ||
| 351 | {#State 38 | ||
| 352 | DEFAULT => -62 | ||
| 353 | }, | ||
| 354 | {#State 39 | ||
| 355 | DEFAULT => -65 | ||
| 356 | }, | ||
| 357 | {#State 40 | ||
| 358 | DEFAULT => -64 | ||
| 359 | }, | ||
| 360 | {#State 41 | ||
| 361 | ACTIONS => { | ||
| 362 | 'SQ_STRING' => 43, | ||
| 363 | 'DQ_STRING' => 38, | ||
| 364 | 'SYMBOL' => 42, | ||
| 365 | 'BQ_STRING' => 39, | ||
| 366 | 'BR_STRING' => 40 | ||
| 367 | }, | ||
| 368 | GOTOS => { | ||
| 369 | 'string' => 61 | ||
| 370 | } | ||
| 371 | }, | ||
| 372 | {#State 42 | ||
| 373 | DEFAULT => -66 | ||
| 374 | }, | ||
| 375 | {#State 43 | ||
| 376 | DEFAULT => -63 | ||
| 377 | }, | ||
| 378 | {#State 44 | ||
| 379 | DEFAULT => -14 | ||
| 380 | }, | ||
| 381 | {#State 45 | ||
| 382 | DEFAULT => -28 | ||
| 383 | }, | ||
| 384 | {#State 46 | ||
| 385 | DEFAULT => -10 | ||
| 386 | }, | ||
| 387 | {#State 47 | ||
| 388 | DEFAULT => -15 | ||
| 389 | }, | ||
| 390 | {#State 48 | ||
| 391 | DEFAULT => -30 | ||
| 392 | }, | ||
| 393 | {#State 49 | ||
| 394 | DEFAULT => -29 | ||
| 395 | }, | ||
| 396 | {#State 50 | ||
| 397 | DEFAULT => -11 | ||
| 398 | }, | ||
| 399 | {#State 51 | ||
| 400 | DEFAULT => -32 | ||
| 401 | }, | ||
| 402 | {#State 52 | ||
| 403 | DEFAULT => -33 | ||
| 404 | }, | ||
| 405 | {#State 53 | ||
| 406 | DEFAULT => -13 | ||
| 407 | }, | ||
| 408 | {#State 54 | ||
| 409 | DEFAULT => -31 | ||
| 410 | }, | ||
| 411 | {#State 55 | ||
| 412 | ACTIONS => { | ||
| 413 | 'SYMBOL' => 64, | ||
| 414 | 'MINUS' => 63 | ||
| 415 | }, | ||
| 416 | GOTOS => { | ||
| 417 | 'shortname' => 62 | ||
| 418 | } | ||
| 419 | }, | ||
| 420 | {#State 56 | ||
| 421 | DEFAULT => -53 | ||
| 422 | }, | ||
| 423 | {#State 57 | ||
| 424 | DEFAULT => -54 | ||
| 425 | }, | ||
| 426 | {#State 58 | ||
| 427 | DEFAULT => -16 | ||
| 428 | }, | ||
| 429 | {#State 59 | ||
| 430 | DEFAULT => -34 | ||
| 431 | }, | ||
| 432 | {#State 60 | ||
| 433 | ACTIONS => { | ||
| 434 | 'MINUS' => 63, | ||
| 435 | 'SYMBOL' => 64 | ||
| 436 | }, | ||
| 437 | GOTOS => { | ||
| 438 | 'shortname' => 65 | ||
| 439 | } | ||
| 440 | }, | ||
| 441 | {#State 61 | ||
| 442 | DEFAULT => -42, | ||
| 443 | GOTOS => { | ||
| 444 | 'kw_decls' => 66 | ||
| 445 | } | ||
| 446 | }, | ||
| 447 | {#State 62 | ||
| 448 | ACTIONS => { | ||
| 449 | 'BQ_STRING' => 39, | ||
| 450 | 'SYMBOL' => 42, | ||
| 451 | 'BR_STRING' => 40, | ||
| 452 | 'SQ_STRING' => 43, | ||
| 453 | 'DQ_STRING' => 38 | ||
| 454 | }, | ||
| 455 | GOTOS => { | ||
| 456 | 'string' => 67, | ||
| 457 | 'description' => 68 | ||
| 458 | } | ||
| 459 | }, | ||
| 460 | {#State 63 | ||
| 461 | DEFAULT => -56 | ||
| 462 | }, | ||
| 463 | {#State 64 | ||
| 464 | DEFAULT => -55 | ||
| 465 | }, | ||
| 466 | {#State 65 | ||
| 467 | ACTIONS => { | ||
| 468 | 'DQ_STRING' => 38, | ||
| 469 | 'SQ_STRING' => 43, | ||
| 470 | 'BQ_STRING' => 39, | ||
| 471 | 'SYMBOL' => 42, | ||
| 472 | 'BR_STRING' => 40 | ||
| 473 | }, | ||
| 474 | GOTOS => { | ||
| 475 | 'string' => 67, | ||
| 476 | 'description' => 69 | ||
| 477 | } | ||
| 478 | }, | ||
| 479 | {#State 66 | ||
| 480 | ACTIONS => { | ||
| 481 | 'TOK_CODE' => 70, | ||
| 482 | 'SYMBOL' => 23 | ||
| 483 | }, | ||
| 484 | DEFAULT => -12, | ||
| 485 | GOTOS => { | ||
| 486 | 'symbol' => 71 | ||
| 487 | } | ||
| 488 | }, | ||
| 489 | {#State 67 | ||
| 490 | DEFAULT => -57 | ||
| 491 | }, | ||
| 492 | {#State 68 | ||
| 493 | DEFAULT => -42, | ||
| 494 | GOTOS => { | ||
| 495 | 'kw_decls' => 72 | ||
| 496 | } | ||
| 497 | }, | ||
| 498 | {#State 69 | ||
| 499 | ACTIONS => { | ||
| 500 | 'TOK_STRING' => 77, | ||
| 501 | 'TOK_DOUBLE' => 76, | ||
| 502 | 'TOK_NO' => 85, | ||
| 503 | 'TOK_LONGDOUBLE' => 81, | ||
| 504 | 'TOK_SHORT' => 78, | ||
| 505 | 'TOK_FLOAT' => 73, | ||
| 506 | 'TOK_INT' => 74, | ||
| 507 | 'TOK_LONG' => 82, | ||
| 508 | 'TOK_FLAG' => 75 | ||
| 509 | }, | ||
| 510 | GOTOS => { | ||
| 511 | 'functType' => 84, | ||
| 512 | 'ggo_option_body' => 80, | ||
| 513 | 'option_argument_type' => 79, | ||
| 514 | 'flagType' => 83 | ||
| 515 | } | ||
| 516 | }, | ||
| 517 | {#State 70 | ||
| 518 | DEFAULT => -61 | ||
| 519 | }, | ||
| 520 | {#State 71 | ||
| 521 | ACTIONS => { | ||
| 522 | 'EQUALS' => 86 | ||
| 523 | } | ||
| 524 | }, | ||
| 525 | {#State 72 | ||
| 526 | ACTIONS => { | ||
| 527 | 'SYMBOL' => 23, | ||
| 528 | 'TOK_CODE' => 70 | ||
| 529 | }, | ||
| 530 | DEFAULT => -27, | ||
| 531 | GOTOS => { | ||
| 532 | 'symbol' => 71 | ||
| 533 | } | ||
| 534 | }, | ||
| 535 | {#State 73 | ||
| 536 | DEFAULT => -50 | ||
| 537 | }, | ||
| 538 | {#State 74 | ||
| 539 | DEFAULT => -47 | ||
| 540 | }, | ||
| 541 | {#State 75 | ||
| 542 | DEFAULT => -45 | ||
| 543 | }, | ||
| 544 | {#State 76 | ||
| 545 | DEFAULT => -51 | ||
| 546 | }, | ||
| 547 | {#State 77 | ||
| 548 | DEFAULT => -46 | ||
| 549 | }, | ||
| 550 | {#State 78 | ||
| 551 | DEFAULT => -48 | ||
| 552 | }, | ||
| 553 | {#State 79 | ||
| 554 | DEFAULT => -42, | ||
| 555 | GOTOS => { | ||
| 556 | 'kw_decls' => 87 | ||
| 557 | } | ||
| 558 | }, | ||
| 559 | {#State 80 | ||
| 560 | DEFAULT => -35 | ||
| 561 | }, | ||
| 562 | {#State 81 | ||
| 563 | DEFAULT => -52 | ||
| 564 | }, | ||
| 565 | {#State 82 | ||
| 566 | DEFAULT => -49 | ||
| 567 | }, | ||
| 568 | {#State 83 | ||
| 569 | DEFAULT => -42, | ||
| 570 | GOTOS => { | ||
| 571 | 'kw_decls' => 88 | ||
| 572 | } | ||
| 573 | }, | ||
| 574 | {#State 84 | ||
| 575 | DEFAULT => -36 | ||
| 576 | }, | ||
| 577 | {#State 85 | ||
| 578 | DEFAULT => -44 | ||
| 579 | }, | ||
| 580 | {#State 86 | ||
| 581 | ACTIONS => { | ||
| 582 | 'BR_STRING' => 40, | ||
| 583 | 'SYMBOL' => 42, | ||
| 584 | 'BQ_STRING' => 39, | ||
| 585 | 'DQ_STRING' => 38, | ||
| 586 | 'SQ_STRING' => 43 | ||
| 587 | }, | ||
| 588 | GOTOS => { | ||
| 589 | 'string' => 89 | ||
| 590 | } | ||
| 591 | }, | ||
| 592 | {#State 87 | ||
| 593 | ACTIONS => { | ||
| 594 | 'TOK_CODE' => 70, | ||
| 595 | 'TOK_YES' => 90, | ||
| 596 | 'TOK_NO' => 91, | ||
| 597 | 'SYMBOL' => 23 | ||
| 598 | }, | ||
| 599 | GOTOS => { | ||
| 600 | 'symbol' => 71, | ||
| 601 | 'yesno' => 93, | ||
| 602 | 'required' => 92 | ||
| 603 | } | ||
| 604 | }, | ||
| 605 | {#State 88 | ||
| 606 | ACTIONS => { | ||
| 607 | 'SYMBOL' => 23, | ||
| 608 | 'TOK_CODE' => 70, | ||
| 609 | 'TOK_OFF' => 95, | ||
| 610 | 'TOK_ON' => 96 | ||
| 611 | }, | ||
| 612 | GOTOS => { | ||
| 613 | 'onoff_value' => 94, | ||
| 614 | 'symbol' => 71 | ||
| 615 | } | ||
| 616 | }, | ||
| 617 | {#State 89 | ||
| 618 | DEFAULT => -43 | ||
| 619 | }, | ||
| 620 | {#State 90 | ||
| 621 | DEFAULT => -41 | ||
| 622 | }, | ||
| 623 | {#State 91 | ||
| 624 | DEFAULT => -40 | ||
| 625 | }, | ||
| 626 | {#State 92 | ||
| 627 | DEFAULT => -38 | ||
| 628 | }, | ||
| 629 | {#State 93 | ||
| 630 | DEFAULT => -39 | ||
| 631 | }, | ||
| 632 | {#State 94 | ||
| 633 | DEFAULT => -37 | ||
| 634 | }, | ||
| 635 | {#State 95 | ||
| 636 | DEFAULT => -59 | ||
| 637 | }, | ||
| 638 | {#State 96 | ||
| 639 | DEFAULT => -58 | ||
| 640 | } | ||
| 641 | ], | ||
| 642 | yyrules => | ||
| 643 | [ | ||
| 644 | [#Rule 0 | ||
| 645 | '$start', 2, undef | ||
| 646 | ], | ||
| 647 | [#Rule 1 | ||
| 648 | 'specs', 0, | ||
| 649 | sub | ||
| 650 | #line 69 "Gen/Parser.yp" | ||
| 651 | { 1 } | ||
| 652 | ], | ||
| 653 | [#Rule 2 | ||
| 654 | 'specs', 1, | ||
| 655 | sub | ||
| 656 | #line 70 "Gen/Parser.yp" | ||
| 657 | { 1 } | ||
| 658 | ], | ||
| 659 | [#Rule 3 | ||
| 660 | 'specs', 2, undef | ||
| 661 | ], | ||
| 662 | [#Rule 4 | ||
| 663 | 'specs', 2, undef | ||
| 664 | ], | ||
| 665 | [#Rule 5 | ||
| 666 | 'specs', 3, undef | ||
| 667 | ], | ||
| 668 | [#Rule 6 | ||
| 669 | 'spec', 1, undef | ||
| 670 | ], | ||
| 671 | [#Rule 7 | ||
| 672 | 'spec', 1, undef | ||
| 673 | ], | ||
| 674 | [#Rule 8 | ||
| 675 | 'spec', 1, undef | ||
| 676 | ], | ||
| 677 | [#Rule 9 | ||
| 678 | 'spec', 1, undef | ||
| 679 | ], | ||
| 680 | [#Rule 10 | ||
| 681 | 'extended_spec', 2, | ||
| 682 | sub | ||
| 683 | #line 87 "Gen/Parser.yp" | ||
| 684 | { | ||
| 685 | $_[0]->{USER}{og}->add_user_code($_[2]); | ||
| 686 | } | ||
| 687 | ], | ||
| 688 | [#Rule 11 | ||
| 689 | 'extended_spec', 2, | ||
| 690 | sub | ||
| 691 | #line 90 "Gen/Parser.yp" | ||
| 692 | { | ||
| 693 | $_[0]->{USER}{og}->add_rcfile($_[2]); | ||
| 694 | } | ||
| 695 | ], | ||
| 696 | [#Rule 12 | ||
| 697 | 'extended_spec', 4, | ||
| 698 | sub | ||
| 699 | #line 93 "Gen/Parser.yp" | ||
| 700 | { | ||
| 701 | $_[0]->{USER}{og}->add_argument({name=>$_[2],descr=>$_[3],%{$_[4]}}); | ||
| 702 | } | ||
| 703 | ], | ||
| 704 | [#Rule 13 | ||
| 705 | 'extended_spec', 2, | ||
| 706 | sub | ||
| 707 | #line 96 "Gen/Parser.yp" | ||
| 708 | { | ||
| 709 | $_[0]->{USER}{og}->add_group($_[2]); | ||
| 710 | } | ||
| 711 | ], | ||
| 712 | [#Rule 14 | ||
| 713 | 'extended_spec', 2, | ||
| 714 | sub | ||
| 715 | #line 99 "Gen/Parser.yp" | ||
| 716 | { | ||
| 717 | $_[0]->{USER}{og}->set_reparse_action($_[2]); | ||
| 718 | } | ||
| 719 | ], | ||
| 720 | [#Rule 15 | ||
| 721 | 'extended_spec', 2, | ||
| 722 | sub | ||
| 723 | #line 102 "Gen/Parser.yp" | ||
| 724 | { | ||
| 725 | $_[0]{USER}{og}{unnamed} = $_[2]; | ||
| 726 | } | ||
| 727 | ], | ||
| 728 | [#Rule 16 | ||
| 729 | 'extended_spec', 2, | ||
| 730 | sub | ||
| 731 | #line 106 "Gen/Parser.yp" | ||
| 732 | { | ||
| 733 | $_[0]->{USER}{og}->add_option({ type=>$_[1], %{$_[2]}, }, | ||
| 734 | $_[0]); | ||
| 735 | } | ||
| 736 | ], | ||
| 737 | [#Rule 17 | ||
| 738 | 'extended_option_type', 1, | ||
| 739 | sub | ||
| 740 | #line 114 "Gen/Parser.yp" | ||
| 741 | { 'funct' } | ||
| 742 | ], | ||
| 743 | [#Rule 18 | ||
| 744 | 'extended_option_type', 1, | ||
| 745 | sub | ||
| 746 | #line 115 "Gen/Parser.yp" | ||
| 747 | { 'flag2' } | ||
| 748 | ], | ||
| 749 | [#Rule 19 | ||
| 750 | 'extended_option_type', 1, | ||
| 751 | sub | ||
| 752 | #line 116 "Gen/Parser.yp" | ||
| 753 | { 'flag' } | ||
| 754 | ], | ||
| 755 | [#Rule 20 | ||
| 756 | 'extended_option_type', 1, | ||
| 757 | sub | ||
| 758 | #line 117 "Gen/Parser.yp" | ||
| 759 | { 'string' } | ||
| 760 | ], | ||
| 761 | [#Rule 21 | ||
| 762 | 'extended_option_type', 1, | ||
| 763 | sub | ||
| 764 | #line 118 "Gen/Parser.yp" | ||
| 765 | { 'int' } | ||
| 766 | ], | ||
| 767 | [#Rule 22 | ||
| 768 | 'extended_option_type', 1, | ||
| 769 | sub | ||
| 770 | #line 119 "Gen/Parser.yp" | ||
| 771 | { 'short' } | ||
| 772 | ], | ||
| 773 | [#Rule 23 | ||
| 774 | 'extended_option_type', 1, | ||
| 775 | sub | ||
| 776 | #line 120 "Gen/Parser.yp" | ||
| 777 | { 'long' } | ||
| 778 | ], | ||
| 779 | [#Rule 24 | ||
| 780 | 'extended_option_type', 1, | ||
| 781 | sub | ||
| 782 | #line 121 "Gen/Parser.yp" | ||
| 783 | { 'float' } | ||
| 784 | ], | ||
| 785 | [#Rule 25 | ||
| 786 | 'extended_option_type', 1, | ||
| 787 | sub | ||
| 788 | #line 122 "Gen/Parser.yp" | ||
| 789 | { 'double' } | ||
| 790 | ], | ||
| 791 | [#Rule 26 | ||
| 792 | 'extended_option_type', 1, | ||
| 793 | sub | ||
| 794 | #line 123 "Gen/Parser.yp" | ||
| 795 | { 'longdouble' } | ||
| 796 | ], | ||
| 797 | [#Rule 27 | ||
| 798 | 'extended_option_body', 4, | ||
| 799 | sub | ||
| 800 | #line 128 "Gen/Parser.yp" | ||
| 801 | { my %hash = (long=>$_[1], | ||
| 802 | short=>$_[2], | ||
| 803 | descr=>$_[3], | ||
| 804 | %{$_[4]}); | ||
| 805 | \%hash; | ||
| 806 | } | ||
| 807 | ], | ||
| 808 | [#Rule 28 | ||
| 809 | 'reparse_action', 1, undef | ||
| 810 | ], | ||
| 811 | [#Rule 29 | ||
| 812 | 'user_spec', 2, | ||
| 813 | sub | ||
| 814 | #line 143 "Gen/Parser.yp" | ||
| 815 | { | ||
| 816 | $_[0]->{USER}{og}{USER}{$_[1]} = $_[2]; | ||
| 817 | } | ||
| 818 | ], | ||
| 819 | [#Rule 30 | ||
| 820 | 'user_value', 1, undef | ||
| 821 | ], | ||
| 822 | [#Rule 31 | ||
| 823 | 'basic_spec', 2, | ||
| 824 | sub | ||
| 825 | #line 155 "Gen/Parser.yp" | ||
| 826 | { $_[0]->{USER}{og}{package} = $_[2]; } | ||
| 827 | ], | ||
| 828 | [#Rule 32 | ||
| 829 | 'basic_spec', 2, | ||
| 830 | sub | ||
| 831 | #line 156 "Gen/Parser.yp" | ||
| 832 | { $_[0]->{USER}{og}{version} = $_[2]; } | ||
| 833 | ], | ||
| 834 | [#Rule 33 | ||
| 835 | 'basic_spec', 2, | ||
| 836 | sub | ||
| 837 | #line 157 "Gen/Parser.yp" | ||
| 838 | { $_[0]->{USER}{og}{purpose} = $_[2]; } | ||
| 839 | ], | ||
| 840 | [#Rule 34 | ||
| 841 | 'basic_spec', 2, | ||
| 842 | sub | ||
| 843 | #line 158 "Gen/Parser.yp" | ||
| 844 | { $_[0]->{USER}{og}{podpreamble} = $_[2]; } | ||
| 845 | ], | ||
| 846 | [#Rule 35 | ||
| 847 | 'ggo_option_spec', 5, | ||
| 848 | sub | ||
| 849 | #line 162 "Gen/Parser.yp" | ||
| 850 | { | ||
| 851 | $_[0]->{USER}{og}->add_option({ | ||
| 852 | long=>$_[2], | ||
| 853 | short=>$_[3], | ||
| 854 | descr=>$_[4], | ||
| 855 | %{$_[5]}, | ||
| 856 | }, | ||
| 857 | $_[0]); | ||
| 858 | } | ||
| 859 | ], | ||
| 860 | [#Rule 36 | ||
| 861 | 'ggo_option_body', 1, | ||
| 862 | sub | ||
| 863 | #line 177 "Gen/Parser.yp" | ||
| 864 | { | ||
| 865 | ## -- function-option | ||
| 866 | {type=>'funct',default=>0}; | ||
| 867 | } | ||
| 868 | ], | ||
| 869 | [#Rule 37 | ||
| 870 | 'ggo_option_body', 3, | ||
| 871 | sub | ||
| 872 | #line 181 "Gen/Parser.yp" | ||
| 873 | { | ||
| 874 | ## -- flag option | ||
| 875 | {type=>'flag', %{$_[2]}, default=>$_[3]}; | ||
| 876 | } | ||
| 877 | ], | ||
| 878 | [#Rule 38 | ||
| 879 | 'ggo_option_body', 3, | ||
| 880 | sub | ||
| 881 | #line 185 "Gen/Parser.yp" | ||
| 882 | { | ||
| 883 | ## -- option with an argument | ||
| 884 | {type=>$_[1], %{$_[2]}, required=>$_[3]}; | ||
| 885 | } | ||
| 886 | ], | ||
| 887 | [#Rule 39 | ||
| 888 | 'required', 1, undef | ||
| 889 | ], | ||
| 890 | [#Rule 40 | ||
| 891 | 'yesno', 1, | ||
| 892 | sub | ||
| 893 | #line 195 "Gen/Parser.yp" | ||
| 894 | { "0" } | ||
| 895 | ], | ||
| 896 | [#Rule 41 | ||
| 897 | 'yesno', 1, | ||
| 898 | sub | ||
| 899 | #line 196 "Gen/Parser.yp" | ||
| 900 | { "1" } | ||
| 901 | ], | ||
| 902 | [#Rule 42 | ||
| 903 | 'kw_decls', 0, | ||
| 904 | sub | ||
| 905 | #line 199 "Gen/Parser.yp" | ||
| 906 | { {} } | ||
| 907 | ], | ||
| 908 | [#Rule 43 | ||
| 909 | 'kw_decls', 4, | ||
| 910 | sub | ||
| 911 | #line 201 "Gen/Parser.yp" | ||
| 912 | { | ||
| 913 | my %hash = (%{$_[1]}, $_[2]=>$_[4]); | ||
| 914 | \%hash; | ||
| 915 | } | ||
| 916 | ], | ||
| 917 | [#Rule 44 | ||
| 918 | 'functType', 1, undef | ||
| 919 | ], | ||
| 920 | [#Rule 45 | ||
| 921 | 'flagType', 1, undef | ||
| 922 | ], | ||
| 923 | [#Rule 46 | ||
| 924 | 'option_argument_type', 1, undef | ||
| 925 | ], | ||
| 926 | [#Rule 47 | ||
| 927 | 'option_argument_type', 1, undef | ||
| 928 | ], | ||
| 929 | [#Rule 48 | ||
| 930 | 'option_argument_type', 1, undef | ||
| 931 | ], | ||
| 932 | [#Rule 49 | ||
| 933 | 'option_argument_type', 1, undef | ||
| 934 | ], | ||
| 935 | [#Rule 50 | ||
| 936 | 'option_argument_type', 1, undef | ||
| 937 | ], | ||
| 938 | [#Rule 51 | ||
| 939 | 'option_argument_type', 1, undef | ||
| 940 | ], | ||
| 941 | [#Rule 52 | ||
| 942 | 'option_argument_type', 1, undef | ||
| 943 | ], | ||
| 944 | [#Rule 53 | ||
| 945 | 'longname', 1, undef | ||
| 946 | ], | ||
| 947 | [#Rule 54 | ||
| 948 | 'longname', 1, | ||
| 949 | sub | ||
| 950 | #line 221 "Gen/Parser.yp" | ||
| 951 | { "-" } | ||
| 952 | ], | ||
| 953 | [#Rule 55 | ||
| 954 | 'shortname', 1, | ||
| 955 | sub | ||
| 956 | #line 224 "Gen/Parser.yp" | ||
| 957 | { | ||
| 958 | if (length("$_[1]") ne 1) { | ||
| 959 | $_[0]->show_hint('NOT_SHORT_ENOUGH','SHORT_OPTION_NAME',$_[1]); | ||
| 960 | } | ||
| 961 | $_[1]; | ||
| 962 | } | ||
| 963 | ], | ||
| 964 | [#Rule 56 | ||
| 965 | 'shortname', 1, | ||
| 966 | sub | ||
| 967 | #line 230 "Gen/Parser.yp" | ||
| 968 | { "-" } | ||
| 969 | ], | ||
| 970 | [#Rule 57 | ||
| 971 | 'description', 1, undef | ||
| 972 | ], | ||
| 973 | [#Rule 58 | ||
| 974 | 'onoff_value', 1, | ||
| 975 | sub | ||
| 976 | #line 237 "Gen/Parser.yp" | ||
| 977 | { "1" } | ||
| 978 | ], | ||
| 979 | [#Rule 59 | ||
| 980 | 'onoff_value', 1, | ||
| 981 | sub | ||
| 982 | #line 238 "Gen/Parser.yp" | ||
| 983 | { "0" } | ||
| 984 | ], | ||
| 985 | [#Rule 60 | ||
| 986 | 'symbol', 1, undef | ||
| 987 | ], | ||
| 988 | [#Rule 61 | ||
| 989 | 'symbol', 1, undef | ||
| 990 | ], | ||
| 991 | [#Rule 62 | ||
| 992 | 'string', 1, | ||
| 993 | sub | ||
| 994 | #line 248 "Gen/Parser.yp" | ||
| 995 | { $_[1] } | ||
| 996 | ], | ||
| 997 | [#Rule 63 | ||
| 998 | 'string', 1, | ||
| 999 | sub | ||
| 1000 | #line 249 "Gen/Parser.yp" | ||
| 1001 | { $_[1] } | ||
| 1002 | ], | ||
| 1003 | [#Rule 64 | ||
| 1004 | 'string', 1, | ||
| 1005 | sub | ||
| 1006 | #line 250 "Gen/Parser.yp" | ||
| 1007 | { $_[1] } | ||
| 1008 | ], | ||
| 1009 | [#Rule 65 | ||
| 1010 | 'string', 1, | ||
| 1011 | sub | ||
| 1012 | #line 251 "Gen/Parser.yp" | ||
| 1013 | { $_[1] } | ||
| 1014 | ], | ||
| 1015 | [#Rule 66 | ||
| 1016 | 'string', 1, | ||
| 1017 | sub | ||
| 1018 | #line 252 "Gen/Parser.yp" | ||
| 1019 | { $_[1] } | ||
| 1020 | ], | ||
| 1021 | [#Rule 67 | ||
| 1022 | 'newlines', 1, undef | ||
| 1023 | ], | ||
| 1024 | [#Rule 68 | ||
| 1025 | 'newlines', 2, undef | ||
| 1026 | ], | ||
| 1027 | [#Rule 69 | ||
| 1028 | 'newline', 1, undef | ||
| 1029 | ] | ||
| 1030 | ], | ||
| 1031 | @_); | ||
| 1032 | bless($self,$class); | ||
| 1033 | } | ||
| 1034 | |||
| 1035 | #line 263 "Gen/Parser.yp" | ||
| 1036 | |||
| 1037 | ############################################################## | ||
| 1038 | # Footer Section | ||
| 1039 | ############################################################### | ||
| 1040 | |||
| 1041 | package Getopt::Gen::Parser; | ||
| 1042 | |||
| 1043 | 1; | ||
| 1044 | |||
| 1045 | __END__ | ||