| 1 | ;;; semantic/bovine/c-by.el --- Generated parser support file |
| 2 | |
| 3 | ;; Copyright (C) 1999-2012 Free Software Foundation, Inc. |
| 4 | |
| 5 | ;; This file is part of GNU Emacs. |
| 6 | |
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify |
| 8 | ;; it under the terms of the GNU General Public License as published by |
| 9 | ;; the Free Software Foundation, either version 3 of the License, or |
| 10 | ;; (at your option) any later version. |
| 11 | |
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, |
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 | ;; GNU General Public License for more details. |
| 16 | |
| 17 | ;; You should have received a copy of the GNU General Public License |
| 18 | ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. |
| 19 | |
| 20 | ;;; Commentary: |
| 21 | ;; |
| 22 | ;; This file was generated from etc/grammars/c.by. |
| 23 | |
| 24 | ;;; Code: |
| 25 | |
| 26 | (require 'semantic/lex) |
| 27 | (eval-when-compile (require 'semantic/bovine)) |
| 28 | |
| 29 | (declare-function semantic-c-reconstitute-token "semantic/bovine/c") |
| 30 | (declare-function semantic-c-reconstitute-template "semantic/bovine/c") |
| 31 | (declare-function semantic-expand-c-tag "semantic/bovine/c") |
| 32 | |
| 33 | (defconst semantic-c-by--keyword-table |
| 34 | (semantic-lex-make-keyword-table |
| 35 | '(("extern" . EXTERN) |
| 36 | ("static" . STATIC) |
| 37 | ("const" . CONST) |
| 38 | ("volatile" . VOLATILE) |
| 39 | ("register" . REGISTER) |
| 40 | ("signed" . SIGNED) |
| 41 | ("unsigned" . UNSIGNED) |
| 42 | ("inline" . INLINE) |
| 43 | ("virtual" . VIRTUAL) |
| 44 | ("mutable" . MUTABLE) |
| 45 | ("struct" . STRUCT) |
| 46 | ("union" . UNION) |
| 47 | ("enum" . ENUM) |
| 48 | ("typedef" . TYPEDEF) |
| 49 | ("class" . CLASS) |
| 50 | ("typename" . TYPENAME) |
| 51 | ("namespace" . NAMESPACE) |
| 52 | ("using" . USING) |
| 53 | ("new" . NEW) |
| 54 | ("delete" . DELETE) |
| 55 | ("template" . TEMPLATE) |
| 56 | ("throw" . THROW) |
| 57 | ("reentrant" . REENTRANT) |
| 58 | ("try" . TRY) |
| 59 | ("catch" . CATCH) |
| 60 | ("operator" . OPERATOR) |
| 61 | ("public" . PUBLIC) |
| 62 | ("private" . PRIVATE) |
| 63 | ("protected" . PROTECTED) |
| 64 | ("friend" . FRIEND) |
| 65 | ("if" . IF) |
| 66 | ("else" . ELSE) |
| 67 | ("do" . DO) |
| 68 | ("while" . WHILE) |
| 69 | ("for" . FOR) |
| 70 | ("switch" . SWITCH) |
| 71 | ("case" . CASE) |
| 72 | ("default" . DEFAULT) |
| 73 | ("return" . RETURN) |
| 74 | ("break" . BREAK) |
| 75 | ("continue" . CONTINUE) |
| 76 | ("sizeof" . SIZEOF) |
| 77 | ("void" . VOID) |
| 78 | ("char" . CHAR) |
| 79 | ("wchar_t" . WCHAR) |
| 80 | ("short" . SHORT) |
| 81 | ("int" . INT) |
| 82 | ("long" . LONG) |
| 83 | ("float" . FLOAT) |
| 84 | ("double" . DOUBLE) |
| 85 | ("bool" . BOOL) |
| 86 | ("_P" . UNDERP) |
| 87 | ("__P" . UNDERUNDERP)) |
| 88 | '(("__P" summary "Common macro to eliminate prototype compatibility on some compilers") |
| 89 | ("_P" summary "Common macro to eliminate prototype compatibility on some compilers") |
| 90 | ("bool" summary "Primitive boolean type") |
| 91 | ("double" summary "Primitive floating-point type (double-precision 64-bit IEEE 754)") |
| 92 | ("float" summary "Primitive floating-point type (single-precision 32-bit IEEE 754)") |
| 93 | ("long" summary "Integral primitive type (-9223372036854775808 to 9223372036854775807)") |
| 94 | ("int" summary "Integral Primitive Type: (-2147483648 to 2147483647)") |
| 95 | ("short" summary "Integral Primitive Type: (-32768 to 32767)") |
| 96 | ("wchar_t" summary "Wide Character Type") |
| 97 | ("char" summary "Integral Character Type: (0 to 256)") |
| 98 | ("void" summary "Built in typeless type: void") |
| 99 | ("sizeof" summary "Compile time macro: sizeof(<type or variable>) // size in bytes") |
| 100 | ("continue" summary "Non-local continue within a loop (for, do/while): continue;") |
| 101 | ("break" summary "Non-local exit within a loop or switch (for, do/while, switch): break;") |
| 102 | ("return" summary "return <value>;") |
| 103 | ("default" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") |
| 104 | ("case" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") |
| 105 | ("switch" summary "switch (<variable>) { case <constvalue>: code; ... default: code; }") |
| 106 | ("for" summary "for(<init>; <condition>; <increment>) { code }") |
| 107 | ("while" summary "do { code } while (<condition>); or while (<condition>) { code };") |
| 108 | ("do" summary " do { code } while (<condition>);") |
| 109 | ("else" summary "if (<condition>) { code } [ else { code } ]") |
| 110 | ("if" summary "if (<condition>) { code } [ else { code } ]") |
| 111 | ("friend" summary "friend class <CLASSNAME>") |
| 112 | ("catch" summary "try { <body> } catch { <catch code> }") |
| 113 | ("try" summary "try { <body> } catch { <catch code> }") |
| 114 | ("reentrant" summary "<type> <methoddef> (<method args>) reentrant ...") |
| 115 | ("throw" summary "<type> <methoddef> (<method args>) throw (<exception>) ...") |
| 116 | ("template" summary "template <class TYPE ...> TYPE_OR_FUNCTION") |
| 117 | ("delete" summary "delete <object>;") |
| 118 | ("new" summary "new <classname>();") |
| 119 | ("using" summary "using <namespace>;") |
| 120 | ("namespace" summary "Namespace Declaration: namespace <name> { ... };") |
| 121 | ("typename" summary "typename is used to handle a qualified name as a typename;") |
| 122 | ("class" summary "Class Declaration: class <name>[:parents] { ... };") |
| 123 | ("typedef" summary "Arbitrary Type Declaration: typedef <typedeclaration> <name>;") |
| 124 | ("enum" summary "Enumeration Type Declaration: enum [name] { ... };") |
| 125 | ("union" summary "Union Type Declaration: union [name] { ... };") |
| 126 | ("struct" summary "Structure Type Declaration: struct [name] { ... };") |
| 127 | ("mutable" summary "Member Declaration Modifier: mutable <type> <name> ...") |
| 128 | ("virtual" summary "Method Modifier: virtual <type> <name>(...) ...") |
| 129 | ("inline" summary "Function Modifier: inline <return type> <name>(...) {...};") |
| 130 | ("unsigned" summary "Numeric Type Modifier: unsigned <numeric type> <name> ...") |
| 131 | ("signed" summary "Numeric Type Modifier: signed <numeric type> <name> ...") |
| 132 | ("register" summary "Declaration Modifier: register <type> <name> ...") |
| 133 | ("volatile" summary "Declaration Modifier: volatile <type> <name> ...") |
| 134 | ("const" summary "Declaration Modifier: const <type> <name> ...") |
| 135 | ("static" summary "Declaration Modifier: static <type> <name> ...") |
| 136 | ("extern" summary "Declaration Modifier: extern <type> <name> ..."))) |
| 137 | "Table of language keywords.") |
| 138 | |
| 139 | (defconst semantic-c-by--token-table |
| 140 | (semantic-lex-make-type-table |
| 141 | '(("semantic-list" |
| 142 | (BRACKETS . "\\[\\]") |
| 143 | (PARENS . "()") |
| 144 | (VOID_BLCK . "^(void)$") |
| 145 | (BRACE_BLCK . "^{") |
| 146 | (PAREN_BLCK . "^(") |
| 147 | (BRACK_BLCK . "\\[.*\\]$")) |
| 148 | ("close-paren" |
| 149 | (RBRACE . "}") |
| 150 | (RPAREN . ")")) |
| 151 | ("open-paren" |
| 152 | (LBRACE . "{") |
| 153 | (LPAREN . "(")) |
| 154 | ("symbol" |
| 155 | (RESTRICT . "\\<\\(__\\)?restrict\\>")) |
| 156 | ("number" |
| 157 | (ZERO . "^0$")) |
| 158 | ("string" |
| 159 | (CPP . "\"C\\+\\+\"") |
| 160 | (C . "\"C\"")) |
| 161 | ("punctuation" |
| 162 | (OR . "\\`[|]\\'") |
| 163 | (HAT . "\\`\\^\\'") |
| 164 | (MOD . "\\`[%]\\'") |
| 165 | (TILDE . "\\`[~]\\'") |
| 166 | (COMA . "\\`[,]\\'") |
| 167 | (GREATER . "\\`[>]\\'") |
| 168 | (LESS . "\\`[<]\\'") |
| 169 | (EQUAL . "\\`[=]\\'") |
| 170 | (BANG . "\\`[!]\\'") |
| 171 | (MINUS . "\\`[-]\\'") |
| 172 | (PLUS . "\\`[+]\\'") |
| 173 | (DIVIDE . "\\`[/]\\'") |
| 174 | (AMPERSAND . "\\`[&]\\'") |
| 175 | (STAR . "\\`[*]\\'") |
| 176 | (SEMICOLON . "\\`[;]\\'") |
| 177 | (COLON . "\\`[:]\\'") |
| 178 | (PERIOD . "\\`[.]\\'") |
| 179 | (HASH . "\\`[#]\\'"))) |
| 180 | 'nil) |
| 181 | "Table of lexical tokens.") |
| 182 | |
| 183 | (defconst semantic-c-by--parse-table |
| 184 | `( |
| 185 | (bovine-toplevel |
| 186 | (declaration) |
| 187 | ) ;; end bovine-toplevel |
| 188 | |
| 189 | (bovine-inner-scope |
| 190 | (codeblock) |
| 191 | ) ;; end bovine-inner-scope |
| 192 | |
| 193 | (declaration |
| 194 | (macro) |
| 195 | (type) |
| 196 | (define) |
| 197 | (var-or-fun) |
| 198 | (extern-c) |
| 199 | (template) |
| 200 | (using) |
| 201 | ) ;; end declaration |
| 202 | |
| 203 | (codeblock |
| 204 | (define) |
| 205 | (codeblock-var-or-fun) |
| 206 | (type) |
| 207 | (using) |
| 208 | ) ;; end codeblock |
| 209 | |
| 210 | (extern-c-contents |
| 211 | (open-paren |
| 212 | ,(semantic-lambda |
| 213 | (list nil)) |
| 214 | ) |
| 215 | (declaration) |
| 216 | (close-paren |
| 217 | ,(semantic-lambda |
| 218 | (list nil)) |
| 219 | ) |
| 220 | ) ;; end extern-c-contents |
| 221 | |
| 222 | (extern-c |
| 223 | (EXTERN |
| 224 | string |
| 225 | "\"C\"" |
| 226 | semantic-list |
| 227 | ,(semantic-lambda |
| 228 | (semantic-tag |
| 229 | "C" |
| 230 | 'extern :members |
| 231 | (semantic-parse-region |
| 232 | (car |
| 233 | (nth 2 vals)) |
| 234 | (cdr |
| 235 | (nth 2 vals)) |
| 236 | 'extern-c-contents |
| 237 | 1))) |
| 238 | ) |
| 239 | (EXTERN |
| 240 | string |
| 241 | "\"C\\+\\+\"" |
| 242 | semantic-list |
| 243 | ,(semantic-lambda |
| 244 | (semantic-tag |
| 245 | "C" |
| 246 | 'extern :members |
| 247 | (semantic-parse-region |
| 248 | (car |
| 249 | (nth 2 vals)) |
| 250 | (cdr |
| 251 | (nth 2 vals)) |
| 252 | 'extern-c-contents |
| 253 | 1))) |
| 254 | ) |
| 255 | (EXTERN |
| 256 | string |
| 257 | "\"C\"" |
| 258 | ,(semantic-lambda |
| 259 | (list nil)) |
| 260 | ) |
| 261 | (EXTERN |
| 262 | string |
| 263 | "\"C\\+\\+\"" |
| 264 | ,(semantic-lambda |
| 265 | (list nil)) |
| 266 | ) |
| 267 | ) ;; end extern-c |
| 268 | |
| 269 | (macro |
| 270 | (spp-macro-def |
| 271 | ,(semantic-lambda |
| 272 | (semantic-tag-new-variable |
| 273 | (nth 0 vals) nil nil :constant-flag t)) |
| 274 | ) |
| 275 | (spp-system-include |
| 276 | ,(semantic-lambda |
| 277 | (semantic-tag-new-include |
| 278 | (nth 0 vals) t)) |
| 279 | ) |
| 280 | (spp-include |
| 281 | ,(semantic-lambda |
| 282 | (semantic-tag-new-include |
| 283 | (nth 0 vals) nil)) |
| 284 | ) |
| 285 | ) ;; end macro |
| 286 | |
| 287 | (define |
| 288 | (spp-macro-def |
| 289 | ,(semantic-lambda |
| 290 | (semantic-tag-new-variable |
| 291 | (nth 0 vals) nil nil :constant-flag t)) |
| 292 | ) |
| 293 | (spp-macro-undef |
| 294 | ,(semantic-lambda |
| 295 | (list nil)) |
| 296 | ) |
| 297 | ) ;; end define |
| 298 | |
| 299 | (unionparts |
| 300 | (semantic-list |
| 301 | ,(semantic-lambda |
| 302 | (semantic-parse-region |
| 303 | (car |
| 304 | (nth 0 vals)) |
| 305 | (cdr |
| 306 | (nth 0 vals)) |
| 307 | 'classsubparts |
| 308 | 1)) |
| 309 | ) |
| 310 | ) ;; end unionparts |
| 311 | |
| 312 | (opt-symbol |
| 313 | (symbol) |
| 314 | ( ;;EMPTY |
| 315 | ) |
| 316 | ) ;; end opt-symbol |
| 317 | |
| 318 | (classsubparts |
| 319 | (open-paren |
| 320 | "{" |
| 321 | ,(semantic-lambda |
| 322 | (list nil)) |
| 323 | ) |
| 324 | (close-paren |
| 325 | "}" |
| 326 | ,(semantic-lambda |
| 327 | (list nil)) |
| 328 | ) |
| 329 | (class-protection |
| 330 | opt-symbol |
| 331 | punctuation |
| 332 | "\\`[:]\\'" |
| 333 | ,(semantic-lambda |
| 334 | (semantic-tag |
| 335 | (car |
| 336 | (nth 0 vals)) |
| 337 | 'label)) |
| 338 | ) |
| 339 | (var-or-fun) |
| 340 | (FRIEND |
| 341 | func-decl |
| 342 | ,(semantic-lambda |
| 343 | (semantic-tag |
| 344 | (car |
| 345 | (nth 1 vals)) |
| 346 | 'friend)) |
| 347 | ) |
| 348 | (FRIEND |
| 349 | CLASS |
| 350 | symbol |
| 351 | ,(semantic-lambda |
| 352 | (semantic-tag |
| 353 | (nth 2 vals) |
| 354 | 'friend)) |
| 355 | ) |
| 356 | (type) |
| 357 | (define) |
| 358 | (template) |
| 359 | ( ;;EMPTY |
| 360 | ) |
| 361 | ) ;; end classsubparts |
| 362 | |
| 363 | (opt-class-parents |
| 364 | (punctuation |
| 365 | "\\`[:]\\'" |
| 366 | class-parents |
| 367 | opt-template-specifier |
| 368 | ,(semantic-lambda |
| 369 | (list |
| 370 | (nth 1 vals))) |
| 371 | ) |
| 372 | ( ;;EMPTY |
| 373 | ,(semantic-lambda) |
| 374 | ) |
| 375 | ) ;; end opt-class-parents |
| 376 | |
| 377 | (one-class-parent |
| 378 | (opt-class-protection |
| 379 | opt-class-declmods |
| 380 | namespace-symbol |
| 381 | ,(semantic-lambda |
| 382 | (semantic-tag-new-type |
| 383 | (car |
| 384 | (nth 2 vals)) |
| 385 | "class" nil nil :protection |
| 386 | (car |
| 387 | (nth 0 vals)))) |
| 388 | ) |
| 389 | (opt-class-declmods |
| 390 | opt-class-protection |
| 391 | namespace-symbol |
| 392 | ,(semantic-lambda |
| 393 | (semantic-tag-new-type |
| 394 | (car |
| 395 | (nth 2 vals)) |
| 396 | "class" nil nil :protection |
| 397 | (car |
| 398 | (nth 1 vals)))) |
| 399 | ) |
| 400 | ) ;; end one-class-parent |
| 401 | |
| 402 | (class-parents |
| 403 | (one-class-parent |
| 404 | punctuation |
| 405 | "\\`[,]\\'" |
| 406 | class-parents |
| 407 | ,(semantic-lambda |
| 408 | (cons |
| 409 | (nth 0 vals) |
| 410 | (nth 2 vals))) |
| 411 | ) |
| 412 | (one-class-parent |
| 413 | ,(semantic-lambda |
| 414 | (list |
| 415 | (nth 0 vals))) |
| 416 | ) |
| 417 | ) ;; end class-parents |
| 418 | |
| 419 | (opt-class-declmods |
| 420 | (class-declmods |
| 421 | opt-class-declmods |
| 422 | ,(semantic-lambda |
| 423 | (list nil)) |
| 424 | ) |
| 425 | ( ;;EMPTY |
| 426 | ) |
| 427 | ) ;; end opt-class-declmods |
| 428 | |
| 429 | (class-declmods |
| 430 | (VIRTUAL) |
| 431 | ) ;; end class-declmods |
| 432 | |
| 433 | (class-protection |
| 434 | (PUBLIC) |
| 435 | (PRIVATE) |
| 436 | (PROTECTED) |
| 437 | ) ;; end class-protection |
| 438 | |
| 439 | (opt-class-protection |
| 440 | (class-protection |
| 441 | ,(semantic-lambda |
| 442 | (nth 0 vals)) |
| 443 | ) |
| 444 | ( ;;EMPTY |
| 445 | ,(semantic-lambda |
| 446 | (list |
| 447 | "unspecified")) |
| 448 | ) |
| 449 | ) ;; end opt-class-protection |
| 450 | |
| 451 | (namespaceparts |
| 452 | (semantic-list |
| 453 | ,(semantic-lambda |
| 454 | (semantic-parse-region |
| 455 | (car |
| 456 | (nth 0 vals)) |
| 457 | (cdr |
| 458 | (nth 0 vals)) |
| 459 | 'namespacesubparts |
| 460 | 1)) |
| 461 | ) |
| 462 | ) ;; end namespaceparts |
| 463 | |
| 464 | (namespacesubparts |
| 465 | (open-paren |
| 466 | "{" |
| 467 | ,(semantic-lambda |
| 468 | (list nil)) |
| 469 | ) |
| 470 | (close-paren |
| 471 | "}" |
| 472 | ,(semantic-lambda |
| 473 | (list nil)) |
| 474 | ) |
| 475 | (type) |
| 476 | (var-or-fun) |
| 477 | (define) |
| 478 | (class-protection |
| 479 | punctuation |
| 480 | "\\`[:]\\'" |
| 481 | ,(semantic-lambda |
| 482 | (semantic-tag |
| 483 | (car |
| 484 | (nth 0 vals)) |
| 485 | 'label)) |
| 486 | ) |
| 487 | (template) |
| 488 | (using) |
| 489 | ( ;;EMPTY |
| 490 | ) |
| 491 | ) ;; end namespacesubparts |
| 492 | |
| 493 | (enumparts |
| 494 | (semantic-list |
| 495 | ,(semantic-lambda |
| 496 | (semantic-parse-region |
| 497 | (car |
| 498 | (nth 0 vals)) |
| 499 | (cdr |
| 500 | (nth 0 vals)) |
| 501 | 'enumsubparts |
| 502 | 1)) |
| 503 | ) |
| 504 | ) ;; end enumparts |
| 505 | |
| 506 | (enumsubparts |
| 507 | (symbol |
| 508 | opt-assign |
| 509 | ,(semantic-lambda |
| 510 | (semantic-tag-new-variable |
| 511 | (nth 0 vals) |
| 512 | "int" |
| 513 | (car |
| 514 | (nth 1 vals)) :constant-flag t)) |
| 515 | ) |
| 516 | (open-paren |
| 517 | "{" |
| 518 | ,(semantic-lambda |
| 519 | (list nil)) |
| 520 | ) |
| 521 | (close-paren |
| 522 | "}" |
| 523 | ,(semantic-lambda |
| 524 | (list nil)) |
| 525 | ) |
| 526 | (punctuation |
| 527 | "\\`[,]\\'" |
| 528 | ,(semantic-lambda |
| 529 | (list nil)) |
| 530 | ) |
| 531 | ) ;; end enumsubparts |
| 532 | |
| 533 | (opt-name |
| 534 | (symbol) |
| 535 | ( ;;EMPTY |
| 536 | ,(semantic-lambda |
| 537 | (list |
| 538 | "")) |
| 539 | ) |
| 540 | ) ;; end opt-name |
| 541 | |
| 542 | (typesimple |
| 543 | (struct-or-class |
| 544 | opt-class |
| 545 | opt-name |
| 546 | opt-template-specifier |
| 547 | opt-class-parents |
| 548 | semantic-list |
| 549 | ,(semantic-lambda |
| 550 | (semantic-tag-new-type |
| 551 | (car |
| 552 | (nth 2 vals)) |
| 553 | (car |
| 554 | (nth 0 vals)) |
| 555 | (let |
| 556 | ( |
| 557 | (semantic-c-classname |
| 558 | (cons |
| 559 | (car |
| 560 | (nth 2 vals)) |
| 561 | (car |
| 562 | (nth 0 vals))))) |
| 563 | (semantic-parse-region |
| 564 | (car |
| 565 | (nth 5 vals)) |
| 566 | (cdr |
| 567 | (nth 5 vals)) |
| 568 | 'classsubparts |
| 569 | 1)) |
| 570 | (nth 4 vals) :template-specifier |
| 571 | (nth 3 vals) :parent |
| 572 | (car |
| 573 | (nth 1 vals)))) |
| 574 | ) |
| 575 | (struct-or-class |
| 576 | opt-class |
| 577 | opt-name |
| 578 | opt-template-specifier |
| 579 | opt-class-parents |
| 580 | ,(semantic-lambda |
| 581 | (semantic-tag-new-type |
| 582 | (car |
| 583 | (nth 2 vals)) |
| 584 | (car |
| 585 | (nth 0 vals)) nil |
| 586 | (nth 4 vals) :template-specifier |
| 587 | (nth 3 vals) :prototype t :parent |
| 588 | (car |
| 589 | (nth 1 vals)))) |
| 590 | ) |
| 591 | (UNION |
| 592 | opt-class |
| 593 | opt-name |
| 594 | unionparts |
| 595 | ,(semantic-lambda |
| 596 | (semantic-tag-new-type |
| 597 | (car |
| 598 | (nth 2 vals)) |
| 599 | (nth 0 vals) |
| 600 | (nth 3 vals) nil :parent |
| 601 | (car |
| 602 | (nth 1 vals)))) |
| 603 | ) |
| 604 | (ENUM |
| 605 | opt-class |
| 606 | opt-name |
| 607 | enumparts |
| 608 | ,(semantic-lambda |
| 609 | (semantic-tag-new-type |
| 610 | (car |
| 611 | (nth 2 vals)) |
| 612 | (nth 0 vals) |
| 613 | (nth 3 vals) nil :parent |
| 614 | (car |
| 615 | (nth 1 vals)))) |
| 616 | ) |
| 617 | (TYPEDEF |
| 618 | declmods |
| 619 | typeformbase |
| 620 | cv-declmods |
| 621 | typedef-symbol-list |
| 622 | ,(semantic-lambda |
| 623 | (semantic-tag-new-type |
| 624 | (nth 4 vals) |
| 625 | (nth 0 vals) nil |
| 626 | (list |
| 627 | (nth 2 vals)))) |
| 628 | ) |
| 629 | ) ;; end typesimple |
| 630 | |
| 631 | (typedef-symbol-list |
| 632 | (typedefname |
| 633 | punctuation |
| 634 | "\\`[,]\\'" |
| 635 | typedef-symbol-list |
| 636 | ,(semantic-lambda |
| 637 | (cons |
| 638 | (nth 0 vals) |
| 639 | (nth 2 vals))) |
| 640 | ) |
| 641 | (typedefname |
| 642 | ,(semantic-lambda |
| 643 | (list |
| 644 | (nth 0 vals))) |
| 645 | ) |
| 646 | ) ;; end typedef-symbol-list |
| 647 | |
| 648 | (typedefname |
| 649 | (opt-stars |
| 650 | symbol |
| 651 | opt-bits |
| 652 | opt-array |
| 653 | ,(semantic-lambda |
| 654 | (list |
| 655 | (nth 0 vals) |
| 656 | (nth 1 vals))) |
| 657 | ) |
| 658 | ) ;; end typedefname |
| 659 | |
| 660 | (struct-or-class |
| 661 | (STRUCT) |
| 662 | (CLASS) |
| 663 | ) ;; end struct-or-class |
| 664 | |
| 665 | (type |
| 666 | (typesimple |
| 667 | punctuation |
| 668 | "\\`[;]\\'" |
| 669 | ,(semantic-lambda |
| 670 | (nth 0 vals)) |
| 671 | ) |
| 672 | (NAMESPACE |
| 673 | symbol |
| 674 | namespaceparts |
| 675 | ,(semantic-lambda |
| 676 | (semantic-tag-new-type |
| 677 | (nth 1 vals) |
| 678 | (nth 0 vals) |
| 679 | (nth 2 vals) nil)) |
| 680 | ) |
| 681 | (NAMESPACE |
| 682 | namespaceparts |
| 683 | ,(semantic-lambda |
| 684 | (semantic-tag-new-type |
| 685 | "unnamed" |
| 686 | (nth 0 vals) |
| 687 | (nth 1 vals) nil)) |
| 688 | ) |
| 689 | (NAMESPACE |
| 690 | symbol |
| 691 | punctuation |
| 692 | "\\`[=]\\'" |
| 693 | typeformbase |
| 694 | punctuation |
| 695 | "\\`[;]\\'" |
| 696 | ,(semantic-lambda |
| 697 | (semantic-tag-new-type |
| 698 | (nth 1 vals) |
| 699 | (nth 0 vals) |
| 700 | (list |
| 701 | (semantic-tag-new-type |
| 702 | (car |
| 703 | (nth 3 vals)) |
| 704 | (nth 0 vals) nil nil)) nil :kind |
| 705 | 'alias)) |
| 706 | ) |
| 707 | ) ;; end type |
| 708 | |
| 709 | (using |
| 710 | (USING |
| 711 | usingname |
| 712 | punctuation |
| 713 | "\\`[;]\\'" |
| 714 | ,(semantic-lambda |
| 715 | (semantic-tag |
| 716 | (car |
| 717 | (nth 1 vals)) |
| 718 | 'using :type |
| 719 | (nth 1 vals))) |
| 720 | ) |
| 721 | ) ;; end using |
| 722 | |
| 723 | (usingname |
| 724 | (typeformbase |
| 725 | ,(semantic-lambda |
| 726 | (semantic-tag-new-type |
| 727 | (car |
| 728 | (nth 0 vals)) |
| 729 | "class" nil nil :prototype t)) |
| 730 | ) |
| 731 | (NAMESPACE |
| 732 | typeformbase |
| 733 | ,(semantic-lambda |
| 734 | (semantic-tag-new-type |
| 735 | (car |
| 736 | (nth 1 vals)) |
| 737 | "namespace" nil nil :prototype t)) |
| 738 | ) |
| 739 | ) ;; end usingname |
| 740 | |
| 741 | (template |
| 742 | (TEMPLATE |
| 743 | template-specifier |
| 744 | opt-friend |
| 745 | template-definition |
| 746 | ,(semantic-lambda |
| 747 | (semantic-c-reconstitute-template |
| 748 | (nth 3 vals) |
| 749 | (nth 1 vals))) |
| 750 | ) |
| 751 | ) ;; end template |
| 752 | |
| 753 | (opt-friend |
| 754 | (FRIEND) |
| 755 | ( ;;EMPTY |
| 756 | ) |
| 757 | ) ;; end opt-friend |
| 758 | |
| 759 | (opt-template-specifier |
| 760 | (template-specifier |
| 761 | ,(semantic-lambda |
| 762 | (nth 0 vals)) |
| 763 | ) |
| 764 | ( ;;EMPTY |
| 765 | ,(semantic-lambda) |
| 766 | ) |
| 767 | ) ;; end opt-template-specifier |
| 768 | |
| 769 | (template-specifier |
| 770 | (punctuation |
| 771 | "\\`[<]\\'" |
| 772 | template-specifier-types |
| 773 | punctuation |
| 774 | "\\`[>]\\'" |
| 775 | ,(semantic-lambda |
| 776 | (nth 1 vals)) |
| 777 | ) |
| 778 | ) ;; end template-specifier |
| 779 | |
| 780 | (template-specifier-types |
| 781 | (template-var |
| 782 | template-specifier-type-list |
| 783 | ,(semantic-lambda |
| 784 | (cons |
| 785 | (nth 0 vals) |
| 786 | (nth 1 vals))) |
| 787 | ) |
| 788 | ( ;;EMPTY |
| 789 | ) |
| 790 | ) ;; end template-specifier-types |
| 791 | |
| 792 | (template-specifier-type-list |
| 793 | (punctuation |
| 794 | "\\`[,]\\'" |
| 795 | template-specifier-types |
| 796 | ,(semantic-lambda |
| 797 | (nth 1 vals)) |
| 798 | ) |
| 799 | ( ;;EMPTY |
| 800 | ,(semantic-lambda) |
| 801 | ) |
| 802 | ) ;; end template-specifier-type-list |
| 803 | |
| 804 | (template-var |
| 805 | (template-type |
| 806 | opt-template-equal |
| 807 | ,(semantic-lambda |
| 808 | (cons |
| 809 | (car |
| 810 | (nth 0 vals)) |
| 811 | (cdr |
| 812 | (nth 0 vals)))) |
| 813 | ) |
| 814 | (string |
| 815 | ,(semantic-lambda |
| 816 | (list |
| 817 | (nth 0 vals))) |
| 818 | ) |
| 819 | (number |
| 820 | ,(semantic-lambda |
| 821 | (list |
| 822 | (nth 0 vals))) |
| 823 | ) |
| 824 | (opt-stars |
| 825 | opt-ref |
| 826 | namespace-symbol |
| 827 | ,(semantic-lambda |
| 828 | (nth 2 vals)) |
| 829 | ) |
| 830 | (semantic-list |
| 831 | ,(semantic-lambda |
| 832 | (list |
| 833 | (nth 0 vals))) |
| 834 | ) |
| 835 | (SIZEOF |
| 836 | semantic-list |
| 837 | ,(semantic-lambda |
| 838 | (list |
| 839 | (nth 1 vals))) |
| 840 | ) |
| 841 | ) ;; end template-var |
| 842 | |
| 843 | (opt-template-equal |
| 844 | (punctuation |
| 845 | "\\`[=]\\'" |
| 846 | symbol |
| 847 | punctuation |
| 848 | "\\`[<]\\'" |
| 849 | template-specifier-types |
| 850 | punctuation |
| 851 | "\\`[>]\\'" |
| 852 | ,(semantic-lambda |
| 853 | (list |
| 854 | (nth 1 vals))) |
| 855 | ) |
| 856 | (punctuation |
| 857 | "\\`[=]\\'" |
| 858 | symbol |
| 859 | ,(semantic-lambda |
| 860 | (list |
| 861 | (nth 1 vals))) |
| 862 | ) |
| 863 | ( ;;EMPTY |
| 864 | ,(semantic-lambda) |
| 865 | ) |
| 866 | ) ;; end opt-template-equal |
| 867 | |
| 868 | (template-type |
| 869 | (CLASS |
| 870 | symbol |
| 871 | ,(semantic-lambda |
| 872 | (semantic-tag-new-type |
| 873 | (nth 1 vals) |
| 874 | "class" nil nil)) |
| 875 | ) |
| 876 | (STRUCT |
| 877 | symbol |
| 878 | ,(semantic-lambda |
| 879 | (semantic-tag-new-type |
| 880 | (nth 1 vals) |
| 881 | "struct" nil nil)) |
| 882 | ) |
| 883 | (TYPENAME |
| 884 | symbol |
| 885 | ,(semantic-lambda |
| 886 | (semantic-tag-new-type |
| 887 | (nth 1 vals) |
| 888 | "class" nil nil)) |
| 889 | ) |
| 890 | (declmods |
| 891 | typeformbase |
| 892 | cv-declmods |
| 893 | opt-stars |
| 894 | opt-ref |
| 895 | variablearg-opt-name |
| 896 | ,(semantic-lambda |
| 897 | (semantic-tag-new-type |
| 898 | (car |
| 899 | (nth 1 vals)) nil nil nil :constant-flag |
| 900 | (if |
| 901 | (member |
| 902 | "const" |
| 903 | (append |
| 904 | (nth 0 vals) |
| 905 | (nth 2 vals))) t nil) :typemodifiers |
| 906 | (delete |
| 907 | "const" |
| 908 | (append |
| 909 | (nth 0 vals) |
| 910 | (nth 2 vals))) :reference |
| 911 | (car |
| 912 | (nth 4 vals)) :pointer |
| 913 | (car |
| 914 | (nth 3 vals)))) |
| 915 | ) |
| 916 | ) ;; end template-type |
| 917 | |
| 918 | (template-definition |
| 919 | (type |
| 920 | ,(semantic-lambda |
| 921 | (nth 0 vals)) |
| 922 | ) |
| 923 | (var-or-fun |
| 924 | ,(semantic-lambda |
| 925 | (nth 0 vals)) |
| 926 | ) |
| 927 | ) ;; end template-definition |
| 928 | |
| 929 | (opt-stars |
| 930 | (punctuation |
| 931 | "\\`[*]\\'" |
| 932 | opt-starmod |
| 933 | opt-stars |
| 934 | ,(semantic-lambda |
| 935 | (list |
| 936 | (1+ |
| 937 | (car |
| 938 | (nth 2 vals))))) |
| 939 | ) |
| 940 | ( ;;EMPTY |
| 941 | ,(semantic-lambda |
| 942 | (list |
| 943 | 0)) |
| 944 | ) |
| 945 | ) ;; end opt-stars |
| 946 | |
| 947 | (opt-starmod |
| 948 | (STARMOD |
| 949 | opt-starmod |
| 950 | ,(semantic-lambda |
| 951 | (cons |
| 952 | (car |
| 953 | (nth 0 vals)) |
| 954 | (nth 1 vals))) |
| 955 | ) |
| 956 | ( ;;EMPTY |
| 957 | ,(semantic-lambda) |
| 958 | ) |
| 959 | ) ;; end opt-starmod |
| 960 | |
| 961 | (STARMOD |
| 962 | (CONST) |
| 963 | ) ;; end STARMOD |
| 964 | |
| 965 | (declmods |
| 966 | (DECLMOD |
| 967 | declmods |
| 968 | ,(semantic-lambda |
| 969 | (cons |
| 970 | (car |
| 971 | (nth 0 vals)) |
| 972 | (nth 1 vals))) |
| 973 | ) |
| 974 | (DECLMOD |
| 975 | ,(semantic-lambda |
| 976 | (nth 0 vals)) |
| 977 | ) |
| 978 | ( ;;EMPTY |
| 979 | ,(semantic-lambda) |
| 980 | ) |
| 981 | ) ;; end declmods |
| 982 | |
| 983 | (DECLMOD |
| 984 | (EXTERN) |
| 985 | (STATIC) |
| 986 | (CVDECLMOD) |
| 987 | (INLINE) |
| 988 | (REGISTER) |
| 989 | (FRIEND) |
| 990 | (TYPENAME) |
| 991 | (METADECLMOD) |
| 992 | (VIRTUAL) |
| 993 | ) ;; end DECLMOD |
| 994 | |
| 995 | (metadeclmod |
| 996 | (METADECLMOD |
| 997 | ,(semantic-lambda) |
| 998 | ) |
| 999 | ( ;;EMPTY |
| 1000 | ,(semantic-lambda) |
| 1001 | ) |
| 1002 | ) ;; end metadeclmod |
| 1003 | |
| 1004 | (CVDECLMOD |
| 1005 | (CONST) |
| 1006 | (VOLATILE) |
| 1007 | ) ;; end CVDECLMOD |
| 1008 | |
| 1009 | (cv-declmods |
| 1010 | (CVDECLMOD |
| 1011 | cv-declmods |
| 1012 | ,(semantic-lambda |
| 1013 | (cons |
| 1014 | (car |
| 1015 | (nth 0 vals)) |
| 1016 | (nth 1 vals))) |
| 1017 | ) |
| 1018 | (CVDECLMOD |
| 1019 | ,(semantic-lambda |
| 1020 | (nth 0 vals)) |
| 1021 | ) |
| 1022 | ( ;;EMPTY |
| 1023 | ,(semantic-lambda) |
| 1024 | ) |
| 1025 | ) ;; end cv-declmods |
| 1026 | |
| 1027 | (METADECLMOD |
| 1028 | (VIRTUAL) |
| 1029 | (MUTABLE) |
| 1030 | ) ;; end METADECLMOD |
| 1031 | |
| 1032 | (opt-ref |
| 1033 | (punctuation |
| 1034 | "\\`[&]\\'" |
| 1035 | ,(semantic-lambda |
| 1036 | (list |
| 1037 | 1)) |
| 1038 | ) |
| 1039 | ( ;;EMPTY |
| 1040 | ,(semantic-lambda |
| 1041 | (list |
| 1042 | 0)) |
| 1043 | ) |
| 1044 | ) ;; end opt-ref |
| 1045 | |
| 1046 | (typeformbase |
| 1047 | (typesimple |
| 1048 | ,(semantic-lambda |
| 1049 | (nth 0 vals)) |
| 1050 | ) |
| 1051 | (STRUCT |
| 1052 | symbol |
| 1053 | ,(semantic-lambda |
| 1054 | (semantic-tag-new-type |
| 1055 | (nth 1 vals) |
| 1056 | (nth 0 vals) nil nil)) |
| 1057 | ) |
| 1058 | (UNION |
| 1059 | symbol |
| 1060 | ,(semantic-lambda |
| 1061 | (semantic-tag-new-type |
| 1062 | (nth 1 vals) |
| 1063 | (nth 0 vals) nil nil)) |
| 1064 | ) |
| 1065 | (ENUM |
| 1066 | symbol |
| 1067 | ,(semantic-lambda |
| 1068 | (semantic-tag-new-type |
| 1069 | (nth 1 vals) |
| 1070 | (nth 0 vals) nil nil)) |
| 1071 | ) |
| 1072 | (builtintype |
| 1073 | ,(semantic-lambda |
| 1074 | (nth 0 vals)) |
| 1075 | ) |
| 1076 | (symbol |
| 1077 | template-specifier |
| 1078 | ,(semantic-lambda |
| 1079 | (semantic-tag-new-type |
| 1080 | (nth 0 vals) |
| 1081 | "class" nil nil :template-specifier |
| 1082 | (nth 1 vals))) |
| 1083 | ) |
| 1084 | (namespace-symbol-for-typeformbase |
| 1085 | opt-template-specifier |
| 1086 | ,(semantic-lambda |
| 1087 | (semantic-tag-new-type |
| 1088 | (car |
| 1089 | (nth 0 vals)) |
| 1090 | "class" nil nil :template-specifier |
| 1091 | (nth 1 vals))) |
| 1092 | ) |
| 1093 | (symbol |
| 1094 | ,(semantic-lambda |
| 1095 | (list |
| 1096 | (nth 0 vals))) |
| 1097 | ) |
| 1098 | ) ;; end typeformbase |
| 1099 | |
| 1100 | (signedmod |
| 1101 | (UNSIGNED) |
| 1102 | (SIGNED) |
| 1103 | ) ;; end signedmod |
| 1104 | |
| 1105 | (builtintype-types |
| 1106 | (VOID) |
| 1107 | (CHAR) |
| 1108 | (WCHAR) |
| 1109 | (SHORT |
| 1110 | INT |
| 1111 | ,(semantic-lambda |
| 1112 | (list |
| 1113 | (concat |
| 1114 | (nth 0 vals) |
| 1115 | " " |
| 1116 | (nth 1 vals)))) |
| 1117 | ) |
| 1118 | (SHORT) |
| 1119 | (INT) |
| 1120 | (LONG |
| 1121 | INT |
| 1122 | ,(semantic-lambda |
| 1123 | (list |
| 1124 | (concat |
| 1125 | (nth 0 vals) |
| 1126 | " " |
| 1127 | (nth 1 vals)))) |
| 1128 | ) |
| 1129 | (FLOAT) |
| 1130 | (DOUBLE) |
| 1131 | (BOOL) |
| 1132 | (LONG |
| 1133 | DOUBLE |
| 1134 | ,(semantic-lambda |
| 1135 | (list |
| 1136 | (concat |
| 1137 | (nth 0 vals) |
| 1138 | " " |
| 1139 | (nth 1 vals)))) |
| 1140 | ) |
| 1141 | (LONG |
| 1142 | LONG |
| 1143 | ,(semantic-lambda |
| 1144 | (list |
| 1145 | (concat |
| 1146 | (nth 0 vals) |
| 1147 | " " |
| 1148 | (nth 1 vals)))) |
| 1149 | ) |
| 1150 | (LONG) |
| 1151 | ) ;; end builtintype-types |
| 1152 | |
| 1153 | (builtintype |
| 1154 | (signedmod |
| 1155 | builtintype-types |
| 1156 | ,(semantic-lambda |
| 1157 | (list |
| 1158 | (concat |
| 1159 | (car |
| 1160 | (nth 0 vals)) |
| 1161 | " " |
| 1162 | (car |
| 1163 | (nth 1 vals))))) |
| 1164 | ) |
| 1165 | (builtintype-types |
| 1166 | ,(semantic-lambda |
| 1167 | (nth 0 vals)) |
| 1168 | ) |
| 1169 | (signedmod |
| 1170 | ,(semantic-lambda |
| 1171 | (list |
| 1172 | (concat |
| 1173 | (car |
| 1174 | (nth 0 vals)) |
| 1175 | " int"))) |
| 1176 | ) |
| 1177 | ) ;; end builtintype |
| 1178 | |
| 1179 | (codeblock-var-or-fun |
| 1180 | (declmods |
| 1181 | typeformbase |
| 1182 | declmods |
| 1183 | opt-ref |
| 1184 | var-or-func-decl |
| 1185 | ,(semantic-lambda |
| 1186 | (semantic-c-reconstitute-token |
| 1187 | (nth 4 vals) |
| 1188 | (nth 0 vals) |
| 1189 | (nth 1 vals))) |
| 1190 | ) |
| 1191 | ) ;; end codeblock-var-or-fun |
| 1192 | |
| 1193 | (var-or-fun |
| 1194 | (codeblock-var-or-fun |
| 1195 | ,(semantic-lambda |
| 1196 | (nth 0 vals)) |
| 1197 | ) |
| 1198 | (declmods |
| 1199 | var-or-func-decl |
| 1200 | ,(semantic-lambda |
| 1201 | (semantic-c-reconstitute-token |
| 1202 | (nth 1 vals) |
| 1203 | (nth 0 vals) nil)) |
| 1204 | ) |
| 1205 | ) ;; end var-or-fun |
| 1206 | |
| 1207 | (var-or-func-decl |
| 1208 | (func-decl |
| 1209 | ,(semantic-lambda |
| 1210 | (nth 0 vals)) |
| 1211 | ) |
| 1212 | (var-decl |
| 1213 | ,(semantic-lambda |
| 1214 | (nth 0 vals)) |
| 1215 | ) |
| 1216 | ) ;; end var-or-func-decl |
| 1217 | |
| 1218 | (func-decl |
| 1219 | (opt-stars |
| 1220 | opt-class |
| 1221 | opt-destructor |
| 1222 | functionname |
| 1223 | opt-template-specifier |
| 1224 | opt-under-p |
| 1225 | arg-list |
| 1226 | opt-post-fcn-modifiers |
| 1227 | opt-throw |
| 1228 | opt-initializers |
| 1229 | fun-or-proto-end |
| 1230 | ,(semantic-lambda |
| 1231 | (nth 3 vals) |
| 1232 | (list |
| 1233 | 'function |
| 1234 | (nth 1 vals) |
| 1235 | (nth 2 vals) |
| 1236 | (nth 6 vals) |
| 1237 | (nth 8 vals) |
| 1238 | (nth 7 vals)) |
| 1239 | (nth 0 vals) |
| 1240 | (nth 10 vals) |
| 1241 | (list |
| 1242 | (nth 4 vals)) |
| 1243 | (nth 9 vals)) |
| 1244 | ) |
| 1245 | (opt-stars |
| 1246 | opt-class |
| 1247 | opt-destructor |
| 1248 | functionname |
| 1249 | opt-template-specifier |
| 1250 | opt-under-p |
| 1251 | opt-post-fcn-modifiers |
| 1252 | opt-throw |
| 1253 | opt-initializers |
| 1254 | fun-try-end |
| 1255 | ,(semantic-lambda |
| 1256 | (nth 3 vals) |
| 1257 | (list |
| 1258 | 'function |
| 1259 | (nth 1 vals) |
| 1260 | (nth 2 vals) nil |
| 1261 | (nth 7 vals) |
| 1262 | (nth 6 vals)) |
| 1263 | (nth 0 vals) |
| 1264 | (nth 9 vals) |
| 1265 | (list |
| 1266 | (nth 4 vals)) |
| 1267 | (nth 8 vals)) |
| 1268 | ) |
| 1269 | ) ;; end func-decl |
| 1270 | |
| 1271 | (var-decl |
| 1272 | (varnamelist |
| 1273 | punctuation |
| 1274 | "\\`[;]\\'" |
| 1275 | ,(semantic-lambda |
| 1276 | (list |
| 1277 | (nth 0 vals) |
| 1278 | 'variable)) |
| 1279 | ) |
| 1280 | ) ;; end var-decl |
| 1281 | |
| 1282 | (opt-under-p |
| 1283 | (UNDERP |
| 1284 | ,(semantic-lambda |
| 1285 | (list nil)) |
| 1286 | ) |
| 1287 | (UNDERUNDERP |
| 1288 | ,(semantic-lambda |
| 1289 | (list nil)) |
| 1290 | ) |
| 1291 | ( ;;EMPTY |
| 1292 | ) |
| 1293 | ) ;; end opt-under-p |
| 1294 | |
| 1295 | (opt-initializers |
| 1296 | (punctuation |
| 1297 | "\\`[:]\\'" |
| 1298 | namespace-symbol |
| 1299 | semantic-list |
| 1300 | opt-initializers) |
| 1301 | (punctuation |
| 1302 | "\\`[,]\\'" |
| 1303 | namespace-symbol |
| 1304 | semantic-list |
| 1305 | opt-initializers) |
| 1306 | ( ;;EMPTY |
| 1307 | ) |
| 1308 | ) ;; end opt-initializers |
| 1309 | |
| 1310 | (opt-post-fcn-modifiers |
| 1311 | (post-fcn-modifiers |
| 1312 | opt-post-fcn-modifiers |
| 1313 | ,(semantic-lambda |
| 1314 | (cons |
| 1315 | (nth 0 vals) |
| 1316 | (nth 1 vals))) |
| 1317 | ) |
| 1318 | ( ;;EMPTY |
| 1319 | ,(semantic-lambda |
| 1320 | (list nil)) |
| 1321 | ) |
| 1322 | ) ;; end opt-post-fcn-modifiers |
| 1323 | |
| 1324 | (post-fcn-modifiers |
| 1325 | (REENTRANT) |
| 1326 | (CONST) |
| 1327 | ) ;; end post-fcn-modifiers |
| 1328 | |
| 1329 | (opt-throw |
| 1330 | (THROW |
| 1331 | semantic-list |
| 1332 | ,(lambda (vals start end) |
| 1333 | (semantic-bovinate-from-nonterminal |
| 1334 | (car |
| 1335 | (nth 1 vals)) |
| 1336 | (cdr |
| 1337 | (nth 1 vals)) |
| 1338 | 'throw-exception-list)) |
| 1339 | ) |
| 1340 | ( ;;EMPTY |
| 1341 | ) |
| 1342 | ) ;; end opt-throw |
| 1343 | |
| 1344 | (throw-exception-list |
| 1345 | (namespace-symbol |
| 1346 | punctuation |
| 1347 | "\\`[,]\\'" |
| 1348 | throw-exception-list |
| 1349 | ,(semantic-lambda |
| 1350 | (cons |
| 1351 | (car |
| 1352 | (nth 0 vals)) |
| 1353 | (nth 2 vals))) |
| 1354 | ) |
| 1355 | (namespace-symbol |
| 1356 | close-paren |
| 1357 | ")" |
| 1358 | ,(semantic-lambda |
| 1359 | (nth 0 vals)) |
| 1360 | ) |
| 1361 | (symbol |
| 1362 | close-paren |
| 1363 | ")" |
| 1364 | ,(semantic-lambda |
| 1365 | (list |
| 1366 | (nth 0 vals))) |
| 1367 | ) |
| 1368 | (open-paren |
| 1369 | "(" |
| 1370 | throw-exception-list |
| 1371 | ,(semantic-lambda |
| 1372 | (nth 1 vals)) |
| 1373 | ) |
| 1374 | (close-paren |
| 1375 | ")" |
| 1376 | ,(semantic-lambda) |
| 1377 | ) |
| 1378 | ) ;; end throw-exception-list |
| 1379 | |
| 1380 | (opt-bits |
| 1381 | (punctuation |
| 1382 | "\\`[:]\\'" |
| 1383 | number |
| 1384 | ,(semantic-lambda |
| 1385 | (list |
| 1386 | (nth 1 vals))) |
| 1387 | ) |
| 1388 | ( ;;EMPTY |
| 1389 | ,(semantic-lambda |
| 1390 | (list nil)) |
| 1391 | ) |
| 1392 | ) ;; end opt-bits |
| 1393 | |
| 1394 | (opt-array |
| 1395 | (semantic-list |
| 1396 | "\\[.*\\]$" |
| 1397 | opt-array |
| 1398 | ,(semantic-lambda |
| 1399 | (list |
| 1400 | (cons |
| 1401 | 1 |
| 1402 | (car |
| 1403 | (nth 1 vals))))) |
| 1404 | ) |
| 1405 | ( ;;EMPTY |
| 1406 | ,(semantic-lambda |
| 1407 | (list nil)) |
| 1408 | ) |
| 1409 | ) ;; end opt-array |
| 1410 | |
| 1411 | (opt-assign |
| 1412 | (punctuation |
| 1413 | "\\`[=]\\'" |
| 1414 | expression |
| 1415 | ,(semantic-lambda |
| 1416 | (list |
| 1417 | (nth 1 vals))) |
| 1418 | ) |
| 1419 | ( ;;EMPTY |
| 1420 | ,(semantic-lambda |
| 1421 | (list nil)) |
| 1422 | ) |
| 1423 | ) ;; end opt-assign |
| 1424 | |
| 1425 | (opt-restrict |
| 1426 | (symbol |
| 1427 | "\\<\\(__\\)?restrict\\>") |
| 1428 | ( ;;EMPTY |
| 1429 | ) |
| 1430 | ) ;; end opt-restrict |
| 1431 | |
| 1432 | (varname |
| 1433 | (opt-stars |
| 1434 | opt-restrict |
| 1435 | namespace-symbol |
| 1436 | opt-bits |
| 1437 | opt-array |
| 1438 | ,(semantic-lambda |
| 1439 | (nth 2 vals) |
| 1440 | (nth 0 vals) |
| 1441 | (nth 3 vals) |
| 1442 | (nth 4 vals)) |
| 1443 | ) |
| 1444 | ) ;; end varname |
| 1445 | |
| 1446 | (variablearg |
| 1447 | (declmods |
| 1448 | typeformbase |
| 1449 | cv-declmods |
| 1450 | opt-ref |
| 1451 | variablearg-opt-name |
| 1452 | ,(semantic-lambda |
| 1453 | (semantic-tag-new-variable |
| 1454 | (list |
| 1455 | (nth 4 vals)) |
| 1456 | (nth 1 vals) nil :constant-flag |
| 1457 | (if |
| 1458 | (member |
| 1459 | "const" |
| 1460 | (append |
| 1461 | (nth 0 vals) |
| 1462 | (nth 2 vals))) t nil) :typemodifiers |
| 1463 | (delete |
| 1464 | "const" |
| 1465 | (append |
| 1466 | (nth 0 vals) |
| 1467 | (nth 2 vals))) :reference |
| 1468 | (car |
| 1469 | (nth 3 vals)))) |
| 1470 | ) |
| 1471 | ) ;; end variablearg |
| 1472 | |
| 1473 | (variablearg-opt-name |
| 1474 | (varname |
| 1475 | ,(semantic-lambda |
| 1476 | (nth 0 vals)) |
| 1477 | ) |
| 1478 | (opt-stars |
| 1479 | ,(semantic-lambda |
| 1480 | (list |
| 1481 | "") |
| 1482 | (nth 0 vals) |
| 1483 | (list nil nil nil)) |
| 1484 | ) |
| 1485 | ) ;; end variablearg-opt-name |
| 1486 | |
| 1487 | (varname-opt-initializer |
| 1488 | (semantic-list) |
| 1489 | (opt-assign) |
| 1490 | ( ;;EMPTY |
| 1491 | ) |
| 1492 | ) ;; end varname-opt-initializer |
| 1493 | |
| 1494 | (varnamelist |
| 1495 | (opt-ref |
| 1496 | varname |
| 1497 | varname-opt-initializer |
| 1498 | punctuation |
| 1499 | "\\`[,]\\'" |
| 1500 | varnamelist |
| 1501 | ,(semantic-lambda |
| 1502 | (cons |
| 1503 | (nth 1 vals) |
| 1504 | (nth 4 vals))) |
| 1505 | ) |
| 1506 | (opt-ref |
| 1507 | varname |
| 1508 | varname-opt-initializer |
| 1509 | ,(semantic-lambda |
| 1510 | (list |
| 1511 | (nth 1 vals))) |
| 1512 | ) |
| 1513 | ) ;; end varnamelist |
| 1514 | |
| 1515 | (namespace-symbol |
| 1516 | (symbol |
| 1517 | opt-template-specifier |
| 1518 | punctuation |
| 1519 | "\\`[:]\\'" |
| 1520 | punctuation |
| 1521 | "\\`[:]\\'" |
| 1522 | namespace-symbol |
| 1523 | ,(semantic-lambda |
| 1524 | (list |
| 1525 | (concat |
| 1526 | (nth 0 vals) |
| 1527 | "::" |
| 1528 | (car |
| 1529 | (nth 4 vals))))) |
| 1530 | ) |
| 1531 | (symbol |
| 1532 | opt-template-specifier |
| 1533 | ,(semantic-lambda |
| 1534 | (list |
| 1535 | (nth 0 vals))) |
| 1536 | ) |
| 1537 | ) ;; end namespace-symbol |
| 1538 | |
| 1539 | (namespace-symbol-for-typeformbase |
| 1540 | (symbol |
| 1541 | opt-template-specifier |
| 1542 | punctuation |
| 1543 | "\\`[:]\\'" |
| 1544 | punctuation |
| 1545 | "\\`[:]\\'" |
| 1546 | namespace-symbol-for-typeformbase |
| 1547 | ,(semantic-lambda |
| 1548 | (list |
| 1549 | (concat |
| 1550 | (nth 0 vals) |
| 1551 | "::" |
| 1552 | (car |
| 1553 | (nth 4 vals))))) |
| 1554 | ) |
| 1555 | (symbol |
| 1556 | ,(semantic-lambda |
| 1557 | (list |
| 1558 | (nth 0 vals))) |
| 1559 | ) |
| 1560 | ) ;; end namespace-symbol-for-typeformbase |
| 1561 | |
| 1562 | (namespace-opt-class |
| 1563 | (symbol |
| 1564 | punctuation |
| 1565 | "\\`[:]\\'" |
| 1566 | punctuation |
| 1567 | "\\`[:]\\'" |
| 1568 | namespace-opt-class |
| 1569 | ,(semantic-lambda |
| 1570 | (list |
| 1571 | (concat |
| 1572 | (nth 0 vals) |
| 1573 | "::" |
| 1574 | (car |
| 1575 | (nth 3 vals))))) |
| 1576 | ) |
| 1577 | (symbol |
| 1578 | opt-template-specifier |
| 1579 | punctuation |
| 1580 | "\\`[:]\\'" |
| 1581 | punctuation |
| 1582 | "\\`[:]\\'" |
| 1583 | ,(semantic-lambda |
| 1584 | (list |
| 1585 | (nth 0 vals))) |
| 1586 | ) |
| 1587 | ) ;; end namespace-opt-class |
| 1588 | |
| 1589 | (opt-class |
| 1590 | (namespace-opt-class |
| 1591 | ,(semantic-lambda |
| 1592 | (nth 0 vals)) |
| 1593 | ) |
| 1594 | ( ;;EMPTY |
| 1595 | ,(semantic-lambda |
| 1596 | (list nil)) |
| 1597 | ) |
| 1598 | ) ;; end opt-class |
| 1599 | |
| 1600 | (opt-destructor |
| 1601 | (punctuation |
| 1602 | "\\`[~]\\'" |
| 1603 | ,(semantic-lambda |
| 1604 | (list t)) |
| 1605 | ) |
| 1606 | ( ;;EMPTY |
| 1607 | ,(semantic-lambda |
| 1608 | (list nil)) |
| 1609 | ) |
| 1610 | ) ;; end opt-destructor |
| 1611 | |
| 1612 | (arg-list |
| 1613 | (semantic-list |
| 1614 | "^(" |
| 1615 | knr-arguments |
| 1616 | ,(semantic-lambda |
| 1617 | (nth 1 vals)) |
| 1618 | ) |
| 1619 | (semantic-list |
| 1620 | "^(" |
| 1621 | ,(semantic-lambda |
| 1622 | (semantic-parse-region |
| 1623 | (car |
| 1624 | (nth 0 vals)) |
| 1625 | (cdr |
| 1626 | (nth 0 vals)) |
| 1627 | 'arg-sub-list |
| 1628 | 1)) |
| 1629 | ) |
| 1630 | (semantic-list |
| 1631 | "^(void)$" |
| 1632 | ,(semantic-lambda) |
| 1633 | ) |
| 1634 | ) ;; end arg-list |
| 1635 | |
| 1636 | (knr-varnamelist |
| 1637 | (varname |
| 1638 | punctuation |
| 1639 | "\\`[,]\\'" |
| 1640 | knr-varnamelist |
| 1641 | ,(semantic-lambda |
| 1642 | (cons |
| 1643 | (nth 0 vals) |
| 1644 | (nth 2 vals))) |
| 1645 | ) |
| 1646 | (varname |
| 1647 | ,(semantic-lambda |
| 1648 | (list |
| 1649 | (nth 0 vals))) |
| 1650 | ) |
| 1651 | ) ;; end knr-varnamelist |
| 1652 | |
| 1653 | (knr-one-variable-decl |
| 1654 | (declmods |
| 1655 | typeformbase |
| 1656 | cv-declmods |
| 1657 | knr-varnamelist |
| 1658 | ,(semantic-lambda |
| 1659 | (semantic-tag-new-variable |
| 1660 | (nreverse |
| 1661 | (nth 3 vals)) |
| 1662 | (nth 1 vals) nil :constant-flag |
| 1663 | (if |
| 1664 | (member |
| 1665 | "const" |
| 1666 | (append |
| 1667 | (nth 2 vals))) t nil) :typemodifiers |
| 1668 | (delete |
| 1669 | "const" |
| 1670 | (nth 2 vals)))) |
| 1671 | ) |
| 1672 | ) ;; end knr-one-variable-decl |
| 1673 | |
| 1674 | (knr-arguments |
| 1675 | (knr-one-variable-decl |
| 1676 | punctuation |
| 1677 | "\\`[;]\\'" |
| 1678 | knr-arguments |
| 1679 | ,(semantic-lambda |
| 1680 | (append |
| 1681 | (semantic-expand-c-tag |
| 1682 | (nth 0 vals)) |
| 1683 | (nth 2 vals))) |
| 1684 | ) |
| 1685 | (knr-one-variable-decl |
| 1686 | punctuation |
| 1687 | "\\`[;]\\'" |
| 1688 | ,(semantic-lambda |
| 1689 | (semantic-expand-c-tag |
| 1690 | (nth 0 vals))) |
| 1691 | ) |
| 1692 | ) ;; end knr-arguments |
| 1693 | |
| 1694 | (arg-sub-list |
| 1695 | (variablearg |
| 1696 | ,(semantic-lambda |
| 1697 | (nth 0 vals)) |
| 1698 | ) |
| 1699 | (punctuation |
| 1700 | "\\`[.]\\'" |
| 1701 | punctuation |
| 1702 | "\\`[.]\\'" |
| 1703 | punctuation |
| 1704 | "\\`[.]\\'" |
| 1705 | close-paren |
| 1706 | ")" |
| 1707 | ,(semantic-lambda |
| 1708 | (semantic-tag-new-variable |
| 1709 | "..." |
| 1710 | "vararg" nil)) |
| 1711 | ) |
| 1712 | (punctuation |
| 1713 | "\\`[,]\\'" |
| 1714 | ,(semantic-lambda |
| 1715 | (list nil)) |
| 1716 | ) |
| 1717 | (open-paren |
| 1718 | "(" |
| 1719 | ,(semantic-lambda |
| 1720 | (list nil)) |
| 1721 | ) |
| 1722 | (close-paren |
| 1723 | ")" |
| 1724 | ,(semantic-lambda |
| 1725 | (list nil)) |
| 1726 | ) |
| 1727 | ) ;; end arg-sub-list |
| 1728 | |
| 1729 | (operatorsym |
| 1730 | (punctuation |
| 1731 | "\\`[<]\\'" |
| 1732 | punctuation |
| 1733 | "\\`[<]\\'" |
| 1734 | punctuation |
| 1735 | "\\`[=]\\'" |
| 1736 | ,(semantic-lambda |
| 1737 | (list |
| 1738 | "<<=")) |
| 1739 | ) |
| 1740 | (punctuation |
| 1741 | "\\`[>]\\'" |
| 1742 | punctuation |
| 1743 | "\\`[>]\\'" |
| 1744 | punctuation |
| 1745 | "\\`[=]\\'" |
| 1746 | ,(semantic-lambda |
| 1747 | (list |
| 1748 | ">>=")) |
| 1749 | ) |
| 1750 | (punctuation |
| 1751 | "\\`[<]\\'" |
| 1752 | punctuation |
| 1753 | "\\`[<]\\'" |
| 1754 | ,(semantic-lambda |
| 1755 | (list |
| 1756 | "<<")) |
| 1757 | ) |
| 1758 | (punctuation |
| 1759 | "\\`[>]\\'" |
| 1760 | punctuation |
| 1761 | "\\`[>]\\'" |
| 1762 | ,(semantic-lambda |
| 1763 | (list |
| 1764 | ">>")) |
| 1765 | ) |
| 1766 | (punctuation |
| 1767 | "\\`[=]\\'" |
| 1768 | punctuation |
| 1769 | "\\`[=]\\'" |
| 1770 | ,(semantic-lambda |
| 1771 | (list |
| 1772 | "==")) |
| 1773 | ) |
| 1774 | (punctuation |
| 1775 | "\\`[<]\\'" |
| 1776 | punctuation |
| 1777 | "\\`[=]\\'" |
| 1778 | ,(semantic-lambda |
| 1779 | (list |
| 1780 | "<=")) |
| 1781 | ) |
| 1782 | (punctuation |
| 1783 | "\\`[>]\\'" |
| 1784 | punctuation |
| 1785 | "\\`[=]\\'" |
| 1786 | ,(semantic-lambda |
| 1787 | (list |
| 1788 | ">=")) |
| 1789 | ) |
| 1790 | (punctuation |
| 1791 | "\\`[!]\\'" |
| 1792 | punctuation |
| 1793 | "\\`[=]\\'" |
| 1794 | ,(semantic-lambda |
| 1795 | (list |
| 1796 | "!=")) |
| 1797 | ) |
| 1798 | (punctuation |
| 1799 | "\\`[+]\\'" |
| 1800 | punctuation |
| 1801 | "\\`[=]\\'" |
| 1802 | ,(semantic-lambda |
| 1803 | (list |
| 1804 | "+=")) |
| 1805 | ) |
| 1806 | (punctuation |
| 1807 | "\\`[-]\\'" |
| 1808 | punctuation |
| 1809 | "\\`[=]\\'" |
| 1810 | ,(semantic-lambda |
| 1811 | (list |
| 1812 | "-=")) |
| 1813 | ) |
| 1814 | (punctuation |
| 1815 | "\\`[*]\\'" |
| 1816 | punctuation |
| 1817 | "\\`[=]\\'" |
| 1818 | ,(semantic-lambda |
| 1819 | (list |
| 1820 | "*=")) |
| 1821 | ) |
| 1822 | (punctuation |
| 1823 | "\\`[/]\\'" |
| 1824 | punctuation |
| 1825 | "\\`[=]\\'" |
| 1826 | ,(semantic-lambda |
| 1827 | (list |
| 1828 | "/=")) |
| 1829 | ) |
| 1830 | (punctuation |
| 1831 | "\\`[%]\\'" |
| 1832 | punctuation |
| 1833 | "\\`[=]\\'" |
| 1834 | ,(semantic-lambda |
| 1835 | (list |
| 1836 | "%=")) |
| 1837 | ) |
| 1838 | (punctuation |
| 1839 | "\\`[&]\\'" |
| 1840 | punctuation |
| 1841 | "\\`[=]\\'" |
| 1842 | ,(semantic-lambda |
| 1843 | (list |
| 1844 | "&=")) |
| 1845 | ) |
| 1846 | (punctuation |
| 1847 | "\\`[|]\\'" |
| 1848 | punctuation |
| 1849 | "\\`[=]\\'" |
| 1850 | ,(semantic-lambda |
| 1851 | (list |
| 1852 | "|=")) |
| 1853 | ) |
| 1854 | (punctuation |
| 1855 | "\\`[-]\\'" |
| 1856 | punctuation |
| 1857 | "\\`[>]\\'" |
| 1858 | punctuation |
| 1859 | "\\`[*]\\'" |
| 1860 | ,(semantic-lambda |
| 1861 | (list |
| 1862 | "->*")) |
| 1863 | ) |
| 1864 | (punctuation |
| 1865 | "\\`[-]\\'" |
| 1866 | punctuation |
| 1867 | "\\`[>]\\'" |
| 1868 | ,(semantic-lambda |
| 1869 | (list |
| 1870 | "->")) |
| 1871 | ) |
| 1872 | (semantic-list |
| 1873 | "()" |
| 1874 | ,(semantic-lambda |
| 1875 | (list |
| 1876 | "()")) |
| 1877 | ) |
| 1878 | (semantic-list |
| 1879 | "\\[\\]" |
| 1880 | ,(semantic-lambda |
| 1881 | (list |
| 1882 | "[]")) |
| 1883 | ) |
| 1884 | (punctuation |
| 1885 | "\\`[<]\\'") |
| 1886 | (punctuation |
| 1887 | "\\`[>]\\'") |
| 1888 | (punctuation |
| 1889 | "\\`[*]\\'") |
| 1890 | (punctuation |
| 1891 | "\\`[+]\\'" |
| 1892 | punctuation |
| 1893 | "\\`[+]\\'" |
| 1894 | ,(semantic-lambda |
| 1895 | (list |
| 1896 | "++")) |
| 1897 | ) |
| 1898 | (punctuation |
| 1899 | "\\`[+]\\'") |
| 1900 | (punctuation |
| 1901 | "\\`[-]\\'" |
| 1902 | punctuation |
| 1903 | "\\`[-]\\'" |
| 1904 | ,(semantic-lambda |
| 1905 | (list |
| 1906 | "--")) |
| 1907 | ) |
| 1908 | (punctuation |
| 1909 | "\\`[-]\\'") |
| 1910 | (punctuation |
| 1911 | "\\`[&]\\'" |
| 1912 | punctuation |
| 1913 | "\\`[&]\\'" |
| 1914 | ,(semantic-lambda |
| 1915 | (list |
| 1916 | "&&")) |
| 1917 | ) |
| 1918 | (punctuation |
| 1919 | "\\`[&]\\'") |
| 1920 | (punctuation |
| 1921 | "\\`[|]\\'" |
| 1922 | punctuation |
| 1923 | "\\`[|]\\'" |
| 1924 | ,(semantic-lambda |
| 1925 | (list |
| 1926 | "||")) |
| 1927 | ) |
| 1928 | (punctuation |
| 1929 | "\\`[|]\\'") |
| 1930 | (punctuation |
| 1931 | "\\`[/]\\'") |
| 1932 | (punctuation |
| 1933 | "\\`[=]\\'") |
| 1934 | (punctuation |
| 1935 | "\\`[!]\\'") |
| 1936 | (punctuation |
| 1937 | "\\`[~]\\'") |
| 1938 | (punctuation |
| 1939 | "\\`[%]\\'") |
| 1940 | (punctuation |
| 1941 | "\\`[,]\\'") |
| 1942 | (punctuation |
| 1943 | "\\`\\^\\'" |
| 1944 | punctuation |
| 1945 | "\\`[=]\\'" |
| 1946 | ,(semantic-lambda |
| 1947 | (list |
| 1948 | "^=")) |
| 1949 | ) |
| 1950 | (punctuation |
| 1951 | "\\`\\^\\'") |
| 1952 | ) ;; end operatorsym |
| 1953 | |
| 1954 | (functionname |
| 1955 | (OPERATOR |
| 1956 | operatorsym |
| 1957 | ,(semantic-lambda |
| 1958 | (nth 1 vals)) |
| 1959 | ) |
| 1960 | (semantic-list |
| 1961 | ,(lambda (vals start end) |
| 1962 | (semantic-bovinate-from-nonterminal |
| 1963 | (car |
| 1964 | (nth 0 vals)) |
| 1965 | (cdr |
| 1966 | (nth 0 vals)) |
| 1967 | 'function-pointer)) |
| 1968 | ) |
| 1969 | (symbol |
| 1970 | ,(semantic-lambda |
| 1971 | (list |
| 1972 | (nth 0 vals))) |
| 1973 | ) |
| 1974 | ) ;; end functionname |
| 1975 | |
| 1976 | (function-pointer |
| 1977 | (open-paren |
| 1978 | "(" |
| 1979 | punctuation |
| 1980 | "\\`[*]\\'" |
| 1981 | symbol |
| 1982 | close-paren |
| 1983 | ")" |
| 1984 | ,(semantic-lambda |
| 1985 | (list |
| 1986 | (concat |
| 1987 | "*" |
| 1988 | (nth 2 vals)))) |
| 1989 | ) |
| 1990 | ) ;; end function-pointer |
| 1991 | |
| 1992 | (fun-or-proto-end |
| 1993 | (punctuation |
| 1994 | "\\`[;]\\'" |
| 1995 | ,(semantic-lambda |
| 1996 | (list t)) |
| 1997 | ) |
| 1998 | (semantic-list |
| 1999 | ,(semantic-lambda |
| 2000 | (list nil)) |
| 2001 | ) |
| 2002 | (punctuation |
| 2003 | "\\`[=]\\'" |
| 2004 | number |
| 2005 | "^0$" |
| 2006 | punctuation |
| 2007 | "\\`[;]\\'" |
| 2008 | ,(semantic-lambda |
| 2009 | (list ':pure-virtual-flag)) |
| 2010 | ) |
| 2011 | (fun-try-end |
| 2012 | ,(semantic-lambda |
| 2013 | (list nil)) |
| 2014 | ) |
| 2015 | ) ;; end fun-or-proto-end |
| 2016 | |
| 2017 | (fun-try-end |
| 2018 | (TRY |
| 2019 | opt-initializers |
| 2020 | semantic-list |
| 2021 | "^{" |
| 2022 | fun-try-several-catches |
| 2023 | ,(semantic-lambda |
| 2024 | (list nil)) |
| 2025 | ) |
| 2026 | ) ;; end fun-try-end |
| 2027 | |
| 2028 | (fun-try-several-catches |
| 2029 | (CATCH |
| 2030 | semantic-list |
| 2031 | "^(" |
| 2032 | semantic-list |
| 2033 | "^{" |
| 2034 | fun-try-several-catches |
| 2035 | ,(semantic-lambda) |
| 2036 | ) |
| 2037 | (CATCH |
| 2038 | semantic-list |
| 2039 | "^{" |
| 2040 | fun-try-several-catches |
| 2041 | ,(semantic-lambda) |
| 2042 | ) |
| 2043 | ( ;;EMPTY |
| 2044 | ,(semantic-lambda) |
| 2045 | ) |
| 2046 | ) ;; end fun-try-several-catches |
| 2047 | |
| 2048 | (type-cast |
| 2049 | (semantic-list |
| 2050 | ,(lambda (vals start end) |
| 2051 | (semantic-bovinate-from-nonterminal |
| 2052 | (car |
| 2053 | (nth 0 vals)) |
| 2054 | (cdr |
| 2055 | (nth 0 vals)) |
| 2056 | 'type-cast-list)) |
| 2057 | ) |
| 2058 | ) ;; end type-cast |
| 2059 | |
| 2060 | (type-cast-list |
| 2061 | (open-paren |
| 2062 | typeformbase |
| 2063 | close-paren) |
| 2064 | ) ;; end type-cast-list |
| 2065 | |
| 2066 | (opt-stuff-after-symbol |
| 2067 | (semantic-list |
| 2068 | "^(") |
| 2069 | (semantic-list |
| 2070 | "\\[.*\\]$") |
| 2071 | ( ;;EMPTY |
| 2072 | ) |
| 2073 | ) ;; end opt-stuff-after-symbol |
| 2074 | |
| 2075 | (multi-stage-dereference |
| 2076 | (namespace-symbol |
| 2077 | opt-stuff-after-symbol |
| 2078 | punctuation |
| 2079 | "\\`[.]\\'" |
| 2080 | multi-stage-dereference) |
| 2081 | (namespace-symbol |
| 2082 | opt-stuff-after-symbol |
| 2083 | punctuation |
| 2084 | "\\`[-]\\'" |
| 2085 | punctuation |
| 2086 | "\\`[>]\\'" |
| 2087 | multi-stage-dereference) |
| 2088 | (namespace-symbol |
| 2089 | opt-stuff-after-symbol) |
| 2090 | ) ;; end multi-stage-dereference |
| 2091 | |
| 2092 | (string-seq |
| 2093 | (string |
| 2094 | string-seq |
| 2095 | ,(semantic-lambda |
| 2096 | (list |
| 2097 | (concat |
| 2098 | (nth 0 vals) |
| 2099 | (car |
| 2100 | (nth 1 vals))))) |
| 2101 | ) |
| 2102 | (string |
| 2103 | ,(semantic-lambda |
| 2104 | (list |
| 2105 | (nth 0 vals))) |
| 2106 | ) |
| 2107 | ) ;; end string-seq |
| 2108 | |
| 2109 | (expr-start |
| 2110 | (punctuation |
| 2111 | "\\`[-]\\'") |
| 2112 | (punctuation |
| 2113 | "\\`[+]\\'") |
| 2114 | (punctuation |
| 2115 | "\\`[*]\\'") |
| 2116 | (punctuation |
| 2117 | "\\`[&]\\'") |
| 2118 | ) ;; end expr-start |
| 2119 | |
| 2120 | (expr-binop |
| 2121 | (punctuation |
| 2122 | "\\`[-]\\'") |
| 2123 | (punctuation |
| 2124 | "\\`[+]\\'") |
| 2125 | (punctuation |
| 2126 | "\\`[*]\\'") |
| 2127 | (punctuation |
| 2128 | "\\`[/]\\'") |
| 2129 | (punctuation |
| 2130 | "\\`[&]\\'" |
| 2131 | punctuation |
| 2132 | "\\`[&]\\'") |
| 2133 | (punctuation |
| 2134 | "\\`[&]\\'") |
| 2135 | (punctuation |
| 2136 | "\\`[|]\\'" |
| 2137 | punctuation |
| 2138 | "\\`[|]\\'") |
| 2139 | (punctuation |
| 2140 | "\\`[|]\\'") |
| 2141 | ) ;; end expr-binop |
| 2142 | |
| 2143 | (expression |
| 2144 | (unaryexpression |
| 2145 | expr-binop |
| 2146 | unaryexpression |
| 2147 | ,(semantic-lambda |
| 2148 | (list |
| 2149 | (identity start) |
| 2150 | (identity end))) |
| 2151 | ) |
| 2152 | (unaryexpression |
| 2153 | ,(semantic-lambda |
| 2154 | (list |
| 2155 | (identity start) |
| 2156 | (identity end))) |
| 2157 | ) |
| 2158 | ) ;; end expression |
| 2159 | |
| 2160 | (unaryexpression |
| 2161 | (number) |
| 2162 | (multi-stage-dereference) |
| 2163 | (NEW |
| 2164 | multi-stage-dereference) |
| 2165 | (NEW |
| 2166 | builtintype-types |
| 2167 | semantic-list) |
| 2168 | (namespace-symbol) |
| 2169 | (string-seq) |
| 2170 | (type-cast |
| 2171 | expression) |
| 2172 | (semantic-list |
| 2173 | expression) |
| 2174 | (semantic-list) |
| 2175 | (expr-start |
| 2176 | expression) |
| 2177 | ) ;; end unaryexpression |
| 2178 | ) |
| 2179 | "Parser table.") |
| 2180 | |
| 2181 | (defun semantic-c-by--install-parser () |
| 2182 | "Setup the Semantic Parser." |
| 2183 | (setq semantic--parse-table semantic-c-by--parse-table |
| 2184 | semantic-debug-parser-source "c.by" |
| 2185 | semantic-debug-parser-class 'semantic-bovine-debug-parser |
| 2186 | semantic-flex-keywords-obarray semantic-c-by--keyword-table |
| 2187 | semantic-equivalent-major-modes '(c-mode c++-mode) |
| 2188 | )) |
| 2189 | \f |
| 2190 | ;;; Epilogue |
| 2191 | ;; |
| 2192 | |
| 2193 | (provide 'semantic/bovine/c-by) |
| 2194 | |
| 2195 | ;;; semantic/bovine/c-by.el ends here |