문제
BNF 형태의 루비 문법을 찾고 있습니다. 거기가 있습니까? 공식적인 버전?
다른 팁
YACC 구문은 루비 소스에 있습니다. 읽기 가능한 구문을 얻으려면 번들로운 Utiliy를 실행하십시오.
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.gz
tar xvzf ruby-2.0.0-p195.tar.gz
cd ruby-2.0.0-p195
ruby sample/exyacc.rb < parse.y
출력 샘플 (V2.0.0-P195의 총 918 줄)
program : top_compstmt
;
top_compstmt : top_stmts opt_terms
;
top_stmts : none
| top_stmt
| top_stmts terms top_stmt
| error top_stmt
;
top_stmt : stmt
| keyword_BEGIN
'{' top_compstmt '}'
;
bodystmt : compstmt
opt_rescue
opt_else
opt_ensure
;
compstmt : stmts opt_terms
;
또한 공식 버전 : 루비 초안 사양. 거기서 문법을 찾을 수 있습니다.
루비 드래프트 사양 : http://ruby-std.netlab.jp. 서버가 다운되었지만 다운로드 할 수 있습니다.http://www.ipa.go.jp/osc/english/ruby
제휴하지 않습니다 StackOverflow