diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-09 10:56:24 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1998-02-09 10:56:24 +0000 |
commit | b814252d728cb08f159da1777feca4f8e9362327 (patch) | |
tree | de6617897dbf6bce78045e3fa2ea84ea2422f166 /sample/rbc.rb | |
parent | 1bbcd202e4dab0894bc5ed68ce4ea84dc916980f (diff) |
1.1b7 pre
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/v1_1r@67 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/rbc.rb')
-rw-r--r-- | sample/rbc.rb | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/sample/rbc.rb b/sample/rbc.rb index b3a4851ef5..7ab0edba12 100644 --- a/sample/rbc.rb +++ b/sample/rbc.rb @@ -11,29 +11,29 @@ # # rbc.rb [options] file_name opts # options: -# -d デバッグモード(利用しない方が良いでしょう) -# -m bcモード(分数, 行列の計算ができます) -# -r load-module ruby -r と同じ -# --inspect 結果出力にinspectを用いる(bcモード以外はデ -# フォルト). -# --noinspect 結果出力にinspectを用いない. -# --noreadline readlineライブラリを利用しない(デフォルト -# ではreadlineライブラリを利用しようとする). +# -d debug mode(not encouraged) +# -m bc mode(calculate rational, matrix) +# -r load-module same as `ruby -r' +# --inspect use inspect for output. +# (default except in bc mode) +# --noinspect do not use inspect for output. +# --noreadline do not use readline library. +# (rbc tries to use readline as default). # -# 追加 private method: -# exit, quit 終了する. -# inspect(sw = nil) インスペクトモードのトグル -# trace_load(sw = nil) load/require時にrbcのfile読み込み機能を用 -# いるモードのスイッチ(デフォルトはトレース -# モード) +# additional private methods: +# exit, quit quit +# inspect(sw = nil) toggle inspect mode +# trace_load(sw = nil) toggle trace mode for load/require. +# (default is trace mode on) # require "e2mmap.rb" $stdout.sync = TRUE module BC_APPLICATION__ - RCS_ID='-$Header: /home/keiju/var/src/var.lib/ruby/ruby/RCS/rbc.rb,v 1.2 1997/11/27 13:46:06 keiju Exp keiju $-' - + + RCS_ID=%q$Id: rbc.rb,v 1.2 1997/11/27 13:46:06 keiju Exp keiju $ + extend Exception2MessageMapper def_exception :UnrecognizedSwitch, "Unrecognized switch: %s" @@ -186,7 +186,7 @@ module BC_APPLICATION__ PARCENT_LTYPE = { "q" => "\'", - "Q" => "\"", + "Q" => "\"", #" "x" => "\`", "r" => "\/" } @@ -332,7 +332,7 @@ module BC_APPLICATION__ @lex_state = EXPR_BEG end end - @OP.def_rule('$') do + @OP.def_rule('$') do #' |op, rests| identify_gvar(rests) end @@ -444,7 +444,7 @@ module BC_APPLICATION__ print token, "\n" if $DEBUG if state = CLAUSE_STATE_TRANS[token] if @lex_state != EXPR_BEG and token =~ /^(if|unless|while|until)/ - # 修飾子 + # $B=$>~;R(B else if ENINDENT_CLAUSE.include?(token) @indent += 1 @@ -472,7 +472,7 @@ module BC_APPLICATION__ if lt = PARCENT_LTYPE[ch] ch = chrs.shift else - lt = "\"" + lt = "\"" #" end if ch !~ /\W/ chrs.unshift ch @@ -618,7 +618,7 @@ module BC_APPLICATION__ def_exception :ErrNodeAlreadyExists, "node already exists" class Node - # postprocがなければ抽象ノード, nilじゃなければ具象ノード + # postproc$B$,$J$1$l$PCj>]%N!<%I(B, nil$B$8$c$J$1$l$P6q>]%N!<%I(B def initialize(preproc = nil, postproc = nil) @Tree = {} @preproc = preproc |