mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
20 lines
195 B
Text
20 lines
195 B
Text
class S
|
|
|
|
start st
|
|
|
|
rule
|
|
|
|
n: D { result = 'no' }
|
|
st : A B C n { result = 'ok' }
|
|
|
|
end
|
|
|
|
---- inner
|
|
|
|
def parse
|
|
do_parse
|
|
end
|
|
|
|
---- footer
|
|
|
|
S.new.parse == 'ok' or raise 'start stmt not worked'
|