Variable: semantic-grammar-wy--parse-table
semantic-grammar-wy--parse-table is a variable defined in
grm-wy-boot.el.gz.
Value
Large value
[[((default . error)
($$use_names . 1)
($$put_values . 2)
($$put_names . 3)
($$rule . 4)
($$nonterminal . 5)
($$declaration . 6)
($$epilogue . 7)
($$prologue . 8)
($$grammar . 9))
((default . error)
(SYMBOL . 19)
(LBRACE . 20)
(RBRACE . 21))
((default . error)
(SYMBOL . 23)
(LBRACE . 24)
(RBRACE . 25))
((default . error)
(SYMBOL . 28)
(LBRACE . 29)
(RBRACE . 30)
(LT . 31))
((default . rhs:0))
((default . error)
(SYMBOL . 37))
((default . error)
(DEFAULT-PREC . 39)
(NO-DEFAULT-PREC . 40)
(KEYWORD . 41)
(LANGUAGEMODE . 42)
(LEFT . 43)
(NONASSOC . 44)
(PACKAGE . 45)
(EXPECTEDCONFLICTS . 46)
(PROVIDE . 47)
(PUT . 48)
(QUOTEMODE . 49)
(RIGHT . 50)
(SCOPESTART . 51)
(START . 52)
(TOKEN . 53)
(TYPE . 54)
(USE-MACROS . 55))
((default . error)
(EPILOGUE . 74))
((default . error)
(PROLOGUE . 76))
((default . error)
(DEFAULT-PREC . 39)
(NO-DEFAULT-PREC . 40)
(KEYWORD . 41)
(LANGUAGEMODE . 42)
(LEFT . 43)
(NONASSOC . 44)
(PACKAGE . 45)
(EXPECTEDCONFLICTS . 46)
(PROVIDE . 47)
(PUT . 48)
(QUOTEMODE . 49)
(RIGHT . 50)
(SCOPESTART . 51)
(START . 52)
(TOKEN . 53)
(TYPE . 54)
(USE-MACROS . 55)
(SYMBOL . 37)
(PERCENT_PERCENT . 78)
(PROLOGUE . 76)
(EPILOGUE . 74))
((default . $STARTS:8))
((default . $STARTS:7))
((default . $STARTS:6))
((default . $STARTS:5))
((default . $STARTS:4))
((default . $STARTS:3))
((default . $STARTS:2))
((default . $STARTS:1))
((default . $STARTS:0))
((default . use_names:2))
((default . use_names:0))
((default . use_names:1))
((default . $use_names:0))
((default . error)
(STRING . 84)
(SYMBOL . 85)
(PREFIXED_LIST . 86)
(SEXP . 87)
(PAREN_BLOCK . 88))
((default . put_values:0))
((default . put_values:1))
((default . $put_values:0))
((default . put_values:2))
((default . put_name:0))
((default . put_names:0))
((default . put_names:1))
((default . error)
(SYMBOL . 90))
((default . $put_names:0))
((default . put_names:2))
((default . put_name:1))
((default . $rule:0))
((default . rule:0)
(PREC . 91)
(SYMBOL . 92)
(CHARACTER . 93)
(PREFIXED_LIST . 94)
(PAREN_BLOCK . 95)
(BRACE_BLOCK . 96))
((default . nonterminal:0))
((default . $nonterminal:0))
((default . default_prec_decl:0))
((default . no_default_prec_decl:0))
((default . error)
(SYMBOL . 100))
((default . error)
(SYMBOL . 101))
((default . associativity:0))
((default . associativity:2))
((default . error)
(SYMBOL . 104))
((default . error)
(SYMBOL . 101))
((default . error)
(SYMBOL . 106))
((default . error)
(SYMBOL . 28)
(BRACE_BLOCK . 107)
(LT . 31))
((default . error)
(SYMBOL . 110))
((default . associativity:1))
((default . error)
(SYMBOL . 111))
((default . error)
(SYMBOL . 101))
((default . token_type_opt:0)
(LT . 31))
((default . error)
(LT . 31))
((default . error)
(SYMBOL . 116))
((default . $declaration:0))
((default . declaration:0))
((default . decl:0))
((default . decl:1))
((default . decl:2))
((default . decl:3))
((default . decl:4))
((default . decl:5))
((default . decl:6))
((default . token_type_opt:0)
(LT . 31))
((default . decl:7))
((default . decl:9))
((default . decl:8))
((default . decl:10))
((default . decl:11))
((default . decl:12))
((default . decl:13))
((default . decl:14))
((default . epilogue:0))
((default . $epilogue:0))
((default . prologue:0))
((default . $prologue:0))
((default . grammar:4))
((default . $grammar:0))
((default . grammar:0))
((default . grammar:1))
((default . grammar:2))
((default . grammar:3))
((default . any_value:1))
((default . any_value:0))
((default . any_value:3))
((default . any_value:4))
((default . any_value:2))
((default . put_value:0))
((default . error)
(GT . 118))
((default . error)
(SYMBOL . 92)
(CHARACTER . 93))
((default . item:0))
((default . item:1))
((default . action:1))
((default . action:0))
((default . action:2))
((default . rhs:2))
((default . rhs:1))
((default . error)
(COLON . 120))
((default . error)
(STRING . 121))
((default . lifo_symbols:1))
((default . languagemode_decl:0))
((default . symbols:0)
(SYMBOL . 123))
((default . package_decl:0))
((default . expectedconflicts_decl:0))
((default . provide_decl:0))
((default . put_name_list:0))
((default . error)
(SYMBOL . 23)
(BRACE_BLOCK . 124))
((default . error)
(SYMBOL . 23)
(BRACE_BLOCK . 124))
((default . quotemode_decl:0))
((default . scopestart_decl:0))
((default . start_decl:0))
((default . error)
(SYMBOL . 129))
((default . token_type_opt:1))
((default . plist_opt:0)
(SYMBOL . 23))
((default . error)
(BRACE_BLOCK . 134))
((default . error)
(SYMBOL . 92)
(CHARACTER . 93))
((default . token_type:0))
((default . rhs:3))
((default . rhs:0))
((default . string_value:0))
((default . keyword_decl:0))
((default . lifo_symbols:0))
((default . put_value_list:0))
((default . put_decl:3))
((default . put_decl:2))
((default . put_decl:1))
((default . put_decl:0))
((default . lifo_symbols:1)
(STRING . 121))
((default . token_decl:1))
((default . plist:1))
((default . type_decl:0))
((default . plist_opt:1)
(SYMBOL . 23))
((default . use_name_list:0))
((default . use_macros_decl:0))
((default . precedence_decl:0))
((default . items:0)
(SYMBOL . 92)
(CHARACTER . 93))
((default . lifo_items:1))
((default . error)
(SEMI . 145))
((default . rules:0)
(OR . 146))
((default . lifo_rules:1))
((default . token_decl:0))
((default . plist:0))
((default . lifo_items:0))
((default . nonterminal:1))
((default . rhs:0))
((default . lifo_rules:0))
((default . error)
($EOI . 149))
((default . error)
($EOI . 150))
((default . accept))]
[(($STARTS . 148)
($grammar . 18)
($prologue . 17)
($epilogue . 16)
($declaration . 15)
($nonterminal . 14)
($rule . 13)
($put_names . 12)
($put_values . 11)
($use_names . 10))
((use_names . 22))
((put_value . 27)
(put_values . 26))
((token_type . 34)
(put_name . 33)
(put_names . 32))
((rhs . 36)
(rule . 35))
((nonterminal . 38))
((use_macros_decl . 73)
(type_decl . 72)
(token_decl . 71)
(keyword_decl . 70)
(start_decl . 69)
(quotemode_decl . 68)
(scopestart_decl . 67)
(put_decl . 66)
(associativity . 65)
(precedence_decl . 64)
(provide_decl . 63)
(expectedconflicts_decl . 62)
(package_decl . 61)
(languagemode_decl . 60)
(no_default_prec_decl . 59)
(default_prec_decl . 58)
(decl . 57)
(declaration . 56))
((epilogue . 75))
((prologue . 77))
((nonterminal . 83)
(use_macros_decl . 73)
(type_decl . 72)
(token_decl . 71)
(keyword_decl . 70)
(start_decl . 69)
(quotemode_decl . 68)
(scopestart_decl . 67)
(put_decl . 66)
(associativity . 65)
(precedence_decl . 64)
(provide_decl . 63)
(expectedconflicts_decl . 62)
(package_decl . 61)
(languagemode_decl . 60)
(no_default_prec_decl . 59)
(default_prec_decl . 58)
(decl . 57)
(declaration . 82)
(epilogue . 81)
(prologue . 80)
(grammar . 79))
nil nil nil nil nil nil nil nil nil nil nil nil nil
((any_value . 89))
nil nil nil nil nil nil nil nil nil nil nil nil
((item . 98)
(action . 97))
((@1 . 99))
nil nil nil nil
((lifo_symbols . 103)
(symbols . 102))
nil nil nil
((lifo_symbols . 103)
(symbols . 105))
nil
((token_type . 34)
(put_name . 109)
(put_name_list . 108))
nil nil nil
((lifo_symbols . 103)
(symbols . 112))
((token_type . 114)
(token_type_opt . 113))
((token_type . 115))
nil nil nil nil nil nil nil nil nil nil
((token_type . 114)
(token_type_opt . 117))
nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
((item . 119))
nil nil nil nil nil nil nil nil
((string_value . 122))
nil nil nil nil nil nil nil
((put_value . 126)
(put_value_list . 125))
((put_value . 128)
(put_value_list . 127))
nil nil nil
((lifo_symbols . 103)
(symbols . 130))
nil
((plist . 133)
(plist_opt . 132)
(put_value . 131))
((use_name_list . 135))
((item . 138)
(lifo_items . 137)
(items . 136))
nil nil
((rhs . 36)
(rule . 141)
(lifo_rules . 140)
(rules . 139))
nil nil nil nil nil nil nil nil
((string_value . 142))
nil nil nil
((put_value . 143))
nil nil nil
((item . 144))
nil nil nil nil nil nil nil nil
((rhs . 36)
(rule . 147))
nil nil nil nil]
((grammar . $$grammar)
(prologue . $$prologue)
(epilogue . $$epilogue)
(declaration . $$declaration)
(nonterminal . $$nonterminal)
(rule . $$rule)
(put_names . $$put_names)
(put_values . $$put_values)
(use_names . $$use_names))
[nonterminal:1 token_decl:1 use_macros_decl:0 string_value:0 precedence_decl:0 items:0 lifo_rules:0 lifo_rules:1 put_decl:1 lifo_items:0 rules:0 type_decl:0 decl:6]]
Documentation
Parser table.
Source Code
;; Defined in /usr/src/emacs/lisp/cedet/semantic/grm-wy-boot.el.gz
(defconst semantic-grammar-wy--parse-table
(wisent-compiled-grammar
((DEFAULT-PREC NO-DEFAULT-PREC KEYWORD LANGUAGEMODE LEFT NONASSOC PACKAGE EXPECTEDCONFLICTS PROVIDE PREC PUT QUOTEMODE RIGHT SCOPESTART START TOKEN TYPE USE-MACROS STRING SYMBOL PERCENT_PERCENT CHARACTER PREFIXED_LIST SEXP PROLOGUE EPILOGUE PAREN_BLOCK BRACE_BLOCK LPAREN RPAREN LBRACE RBRACE COLON SEMI OR LT GT)
nil
(grammar
((prologue))
((epilogue))
((declaration))
((nonterminal))
((PERCENT_PERCENT)))
(prologue
((PROLOGUE)
(wisent-raw-tag
(semantic-tag-new-code "prologue" nil))))
(epilogue
((EPILOGUE)
(wisent-raw-tag
(semantic-tag-new-code "epilogue" nil))))
(declaration
((decl)
(eval $1 t)))
(decl
((default_prec_decl))
((no_default_prec_decl))
((languagemode_decl))
((package_decl))
((expectedconflicts_decl))
((provide_decl))
((precedence_decl))
((put_decl))
((quotemode_decl))
((scopestart_decl))
((start_decl))
((keyword_decl))
((token_decl))
((type_decl))
((use_macros_decl)))
(default_prec_decl
((DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("t")))))
(no_default_prec_decl
((NO-DEFAULT-PREC)
`(wisent-raw-tag
(semantic-tag "default-prec" 'assoc :value
'("nil")))))
(languagemode_decl
((LANGUAGEMODE symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'languagemode :rest ',(cdr $2)))))
(package_decl
((PACKAGE SYMBOL)
`(wisent-raw-tag
(semantic-tag-new-package ',$2 nil))))
(expectedconflicts_decl
((EXPECTEDCONFLICTS symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'expectedconflicts :rest ',(cdr $2)))))
(provide_decl
((PROVIDE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'provide))))
(precedence_decl
((associativity token_type_opt items)
`(wisent-raw-tag
(semantic-tag ',$1 'assoc :type ',$2 :value ',$3))))
(associativity
((LEFT)
(progn "left"))
((RIGHT)
(progn "right"))
((NONASSOC)
(progn "nonassoc")))
(put_decl
((PUT put_name put_value)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',(list $3))))
((PUT put_name put_value_list)
`(wisent-raw-tag
(semantic-tag ',$2 'put :value ',$3)))
((PUT put_name_list put_value)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',(list $3))))
((PUT put_name_list put_value_list)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'put :rest ',(cdr $2)
:value ',$3))))
(put_name_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_names 1))))
(put_names
((LBRACE)
nil)
((RBRACE)
nil)
((put_name)
(wisent-raw-tag
(semantic-tag $1 'put-name))))
(put_name
((SYMBOL))
((token_type)))
(put_value_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-code-detail
(semantic-parse-region
(car $region1)
(cdr $region1)
'put_values 1))))
(put_values
((LBRACE)
nil)
((RBRACE)
nil)
((put_value)
(wisent-raw-tag
(semantic-tag-new-code "put-value" $1))))
(put_value
((SYMBOL any_value)
(cons $1 $2)))
(scopestart_decl
((SCOPESTART SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'scopestart))))
(quotemode_decl
((QUOTEMODE SYMBOL)
`(wisent-raw-tag
(semantic-tag ',$2 'quotemode))))
(start_decl
((START symbols)
`(wisent-raw-tag
(semantic-tag ',(car $2)
'start :rest ',(cdr $2)))))
(keyword_decl
((KEYWORD SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$2 'keyword :value ',$3))))
(token_decl
((TOKEN token_type_opt SYMBOL string_value)
`(wisent-raw-tag
(semantic-tag ',$3 ',(if $2 'token 'keyword)
:type ',$2 :value ',$4)))
((TOKEN token_type_opt symbols)
`(wisent-raw-tag
(semantic-tag ',(car $3)
'token :type ',$2 :rest ',(cdr $3)))))
(token_type_opt
(nil)
((token_type)))
(token_type
((LT SYMBOL GT)
(progn $2)))
(type_decl
((TYPE token_type plist_opt)
`(wisent-raw-tag
(semantic-tag ',$2 'type :value ',$3))))
(plist_opt
(nil)
((plist)))
(plist
((plist put_value)
(append
(list $2)
$1))
((put_value)
(list $1)))
(use_name_list
((BRACE_BLOCK)
(mapcar #'semantic-tag-name
(semantic-parse-region
(car $region1)
(cdr $region1)
'use_names 1))))
(use_names
((LBRACE)
nil)
((RBRACE)
nil)
((SYMBOL)
(wisent-raw-tag
(semantic-tag $1 'use-name))))
(use_macros_decl
((USE-MACROS SYMBOL use_name_list)
`(wisent-raw-tag
(semantic-tag "macro" 'macro :type ',$2 :value ',$3))))
(string_value
((STRING)
(read $1)))
(any_value
((SYMBOL))
((STRING))
((PAREN_BLOCK))
((PREFIXED_LIST))
((SEXP)))
(symbols
((lifo_symbols)
(nreverse $1)))
(lifo_symbols
((lifo_symbols SYMBOL)
(cons $2 $1))
((SYMBOL)
(list $1)))
(nonterminal
((SYMBOL
(setq semantic-grammar-wy--nterm $1 semantic-grammar-wy--rindx 0)
COLON rules SEMI)
(wisent-raw-tag
(semantic-tag $1 'nonterminal :children $4))))
(rules
((lifo_rules)
(apply #'nconc
(nreverse $1))))
(lifo_rules
((lifo_rules OR rule)
(cons $3 $1))
((rule)
(list $1)))
(rule
((rhs)
(let*
((nterm semantic-grammar-wy--nterm)
(rindx semantic-grammar-wy--rindx)
(rhs $1)
comps prec action elt)
(setq semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(while rhs
(setq elt
(car rhs)
rhs
(cdr rhs))
(cond
((vectorp elt)
(if prec
(error "Duplicate %%prec in `%s:%d' rule" nterm rindx))
(setq prec
(aref elt 0)))
((consp elt)
(if
(or action comps)
(setq comps
(cons elt comps)
semantic-grammar-wy--rindx
(1+ semantic-grammar-wy--rindx))
(setq action
(car elt))))
(t
(setq comps
(cons elt comps)))))
(wisent-cook-tag
(wisent-raw-tag
(semantic-tag
(format "%s:%d" nterm rindx)
'rule :type
(if comps "group" "empty")
:value comps :prec prec :expr action))))))
(rhs
(nil)
((rhs item)
(cons $2 $1))
((rhs action)
(cons
(list $2)
$1))
((rhs PREC item)
(cons
(vector $3)
$1)))
(action
((PAREN_BLOCK))
((PREFIXED_LIST))
((BRACE_BLOCK)
(format "(progn\n%s)"
(let
((s $1))
(if
(string-match "^{[
\n ]*" s)
(setq s
(substring s
(match-end 0))))
(if
(string-match "[
\n ]*}$" s)
(setq s
(substring s 0
(match-beginning 0))))
s))))
(items
((lifo_items)
(nreverse $1)))
(lifo_items
((lifo_items item)
(cons $2 $1))
((item)
(list $1)))
(item
((SYMBOL))
((CHARACTER))))
(grammar prologue epilogue declaration nonterminal rule put_names put_values use_names))
"Parser table.")