Fixed break and hold.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Wed, 4 Apr 2007 19:14:24 +0000 (19:14 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Wed, 4 Apr 2007 19:14:24 +0000 (19:14 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@163 052ea7fc-9027-0410-9066-f65837a77df0

rlgen-ruby/rubycodegen.cpp

index e8e5733..3f2c032 100644 (file)
@@ -107,7 +107,7 @@ void RubyCodeGen::RET( ostream &out, bool inFinish )
 
 void RubyCodeGen::BREAK( ostream &out, int targState )
 {
-       out << "_resume.call " << CTRL_FLOW();
+       out << "_out.call " << CTRL_FLOW();
 }
 
 void RubyCodeGen::COND_TRANSLATE()
@@ -540,13 +540,13 @@ void RubyCodeGen::INLINE_LIST( ostream &ret, InlineList *inlineList,
                        ret << GET_KEY();
                        break;
                case InlineItem::Hold:
-                       ret << P() << "--;";
+                       ret << P() << " = " << P() << " - 1;";
                        break;
                case InlineItem::Exec:
                        EXEC( ret, item, targState, inFinish );
                        break;
                case InlineItem::HoldTE:
-                       ret << TOKEND() << "--;";
+                       ret << TOKEND() << " = " << TOKEND() << " - 1;";
                        break;
                case InlineItem::ExecTE:
                        EXECTE( ret, item, targState, inFinish );