summaryrefslogtreecommitdiff
path: root/src/parsetree.cc
diff options
context:
space:
mode:
authorAdrian Thurston <thurston@colm.net>2016-10-29 15:48:03 -0600
committerAdrian Thurston <thurston@colm.net>2016-10-29 15:48:03 -0600
commit5cc9957d90ed1cb1471f5a7d97e97be9beef79f6 (patch)
treede860fac370c11a416c2bb6f04535afe7dcc73dc /src/parsetree.cc
parent816b495edb45671269bf08ee38c64cc2e2e4ce68 (diff)
downloadragel-5cc9957d90ed1cb1471f5a7d97e97be9beef79f6.tar.gz
if an or block returns null then return lambda fsm
Diffstat (limited to 'src/parsetree.cc')
-rw-r--r--src/parsetree.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parsetree.cc b/src/parsetree.cc
index 9d3b3d0a..797d2dc9 100644
--- a/src/parsetree.cc
+++ b/src/parsetree.cc
@@ -1362,6 +1362,10 @@ FsmGraph *ReItem::walk( Compiler *pd, RegExpr *rootRegex )
case OrBlock: {
/* Get the or block and minmize it. */
rtnVal = orBlock->walk( pd, rootRegex );
+ if ( rtnVal == 0 ) {
+ rtnVal = new FsmGraph();
+ rtnVal->lambdaFsm();
+ }
rtnVal->minimizePartition2();
break;
}