diff options
-rw-r--r-- | colm/main.cc | 6 | ||||
-rw-r--r-- | colm/parsetree.cc | 27 |
2 files changed, 4 insertions, 29 deletions
diff --git a/colm/main.cc b/colm/main.cc index e7cbd5e9..2febd774 100644 --- a/colm/main.cc +++ b/colm/main.cc @@ -90,7 +90,6 @@ bool run = false; bool addUniqueEmptyProductions = false; bool gblLibrary = false; long gblActiveRealm = 0; -bool rangeCrossesZero = false; ArgsVector includePaths; ArgsVector libraryPaths; @@ -555,15 +554,12 @@ bool inSourceTree( const char *argv0, char *&location ) void processArgs( int argc, const char **argv ) { - ParamCheck pc( "RcD:e:x:I:L:vdliro:S:M:vHh?-:sVa:m:b:E:", argc, argv ); + ParamCheck pc( "cD:e:x:I:L:vdliro:S:M:vHh?-:sVa:m:b:E:", argc, argv ); while ( pc.check() ) { switch ( pc.state ) { case ParamCheck::match: switch ( pc.parameter ) { - case 'R': - rangeCrossesZero = true; - break; case 'I': includePaths.append( pc.parameterArg ); break; diff --git a/colm/parsetree.cc b/colm/parsetree.cc index cf97fa23..572f0610 100644 --- a/colm/parsetree.cc +++ b/colm/parsetree.cc @@ -1228,37 +1228,16 @@ FsmGraph *Range::walk( Compiler *pd ) delete lowerFsm; delete upperFsm; - bool span0 = false; - if ( rangeCrossesZero && lowKey >= 0 && highKey < 0 ) - span0 = true; - /* Validate the range. */ - if ( !span0 && lowKey > highKey ) { + if ( lowKey > highKey ) { /* Recover by setting upper to lower; */ error(lowerLit->loc) << "lower end of range is greater then upper end" << endl; highKey = lowKey; } /* Return the range now that it is validated. */ - FsmGraph *retFsm = 0; - if ( span0 ) { - FsmGraph *first = new FsmGraph(); - FsmGraph *second = new FsmGraph(); - Key k128 = 127; - Key kn127 = -128; - first->rangeFsm( lowKey, k128 ); - second->rangeFsm( kn127, highKey ); - - first->unionOp( second ); - first->minimizePartition2(); - retFsm = first; - } - else { - /* Usual case. */ - retFsm = new FsmGraph(); - retFsm->rangeFsm( lowKey, highKey ); - } - + FsmGraph *retFsm = new FsmGraph(); + retFsm->rangeFsm( lowKey, highKey ); return retFsm; } |