Sha256: 88aace75967cc6fdd7a896265e898cccd3d689db30714c0a79bc44b1100a55f1
Contents?: true
Size: 1013 Bytes
Versions: 7
Compression:
Stored size: 1013 Bytes
Contents
module Lrama class Grammar class Code class InitialActionCode < Code private # * ($$) yylval # * (@$) yylloc # * ($:$) error # * ($1) error # * (@1) error # * ($:1) error def reference_to_c(ref) case when ref.type == :dollar && ref.name == "$" # $$ "yylval" when ref.type == :at && ref.name == "$" # @$ "yylloc" when ref.type == :index && ref.name == "$" # $:$ raise "$:#{ref.value} can not be used in initial_action." when ref.type == :dollar # $n raise "$#{ref.value} can not be used in initial_action." when ref.type == :at # @n raise "@#{ref.value} can not be used in initial_action." when ref.type == :index # $:n raise "$:#{ref.value} can not be used in initial_action." else raise "Unexpected. #{self}, #{ref}" end end end end end end
Version data entries
7 entries across 7 versions & 1 rubygems