Small bugfix for re character class parsing
+ update to the printing of regexes
This commit is contained in:
parent
4ae4e2b12f
commit
8ed2fd41e1
|
@ -80,7 +80,7 @@ namespace lxs {
|
|||
|
||||
string PlusRE::toRe()
|
||||
{
|
||||
return "(" + e->toRe() + "+" + f->toRe() + ")";
|
||||
return "(" + e->toRe() + "|" + f->toRe() + ")";
|
||||
}
|
||||
|
||||
State PlusRE::toENFA(ENFA& enfa, State attach)
|
||||
|
@ -242,7 +242,6 @@ namespace lxs {
|
|||
|
||||
if (idx >= input.size())
|
||||
throw SyntaxError("Unclosed character class");
|
||||
idx++; //Eat the ]
|
||||
|
||||
for (int i = 0; i < 256; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue