diff options
author | Adrian Thurston <thurston@colm.net> | 2016-10-29 15:48:03 -0600 |
---|---|---|
committer | Adrian Thurston <thurston@colm.net> | 2016-10-29 15:48:03 -0600 |
commit | 5cc9957d90ed1cb1471f5a7d97e97be9beef79f6 (patch) | |
tree | de860fac370c11a416c2bb6f04535afe7dcc73dc | |
parent | 816b495edb45671269bf08ee38c64cc2e2e4ce68 (diff) | |
download | colm-5cc9957d90ed1cb1471f5a7d97e97be9beef79f6.tar.gz |
if an or block returns null then return lambda fsm
-rw-r--r-- | src/parsetree.cc | 4 |
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; } |