Fixed the segfault which occured when a machine reference failed.
authorthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 11 Feb 2007 01:09:53 +0000 (01:09 +0000)
committerthurston <thurston@052ea7fc-9027-0410-9066-f65837a77df0>
Sun, 11 Feb 2007 01:09:53 +0000 (01:09 +0000)
git-svn-id: http://svn.complang.org/ragel/trunk@94 052ea7fc-9027-0410-9066-f65837a77df0

ragel/parsetree.h
ragel/rlparse.kl

index f208452..9a86bb5 100644 (file)
@@ -480,8 +480,8 @@ struct FactorWithRep
                factorWithNeg(0), lowerRep(lowerRep), 
                upperRep(upperRep), type(type) { }
        
-       FactorWithRep( const InputLoc &loc, FactorWithNeg *factorWithNeg )
-               : loc(loc), factorWithNeg(factorWithNeg), type(FactorWithNegType) { }
+       FactorWithRep( FactorWithNeg *factorWithNeg )
+               : factorWithNeg(factorWithNeg), type(FactorWithNegType) { }
 
        ~FactorWithRep();
 
@@ -512,8 +512,8 @@ struct FactorWithNeg
        FactorWithNeg( const InputLoc &loc, FactorWithNeg *factorWithNeg, Type type) :
                loc(loc), factorWithNeg(factorWithNeg), factor(0), type(type) { }
 
-       FactorWithNeg( const InputLoc &loc, Factor *factor ) :
-               loc(loc), factorWithNeg(0), factor(factor), type(FactorType) { }
+       FactorWithNeg( Factor *factor ) :
+               factorWithNeg(0), factor(factor), type(FactorType) { }
 
        ~FactorWithNeg();
 
index daf1fd7..5b0d857 100644 (file)
@@ -826,8 +826,7 @@ factor_with_rep:
        };
 factor_with_rep:
        factor_with_neg final {
-               $$->factorWithRep = new FactorWithRep( 
-                               $1->factorWithNeg->loc, $1->factorWithNeg );
+               $$->factorWithRep = new FactorWithRep( $1->factorWithNeg );
        };
 
 nonterm factor_rep_num
@@ -873,7 +872,7 @@ factor_with_neg:
        };
 factor_with_neg:
        factor final {
-               $$->factorWithNeg = new FactorWithNeg( $1->factor->loc, $1->factor );
+               $$->factorWithNeg = new FactorWithNeg( $1->factor );
        };
 
 nonterm factor