regex interpreter now can build partial correct AST (i forget groups), but in bad shape. building an optimizer.
This commit is contained in:
@@ -34,21 +34,22 @@ using System.Threading.Tasks;
|
||||
namespace StgSharp.RegularAnalysis.TextRegex
|
||||
{
|
||||
[Flags]
|
||||
internal enum RegexElementLabel
|
||||
public enum RegexElementLabel
|
||||
{
|
||||
|
||||
NONE = 0,
|
||||
UNIT = 1,
|
||||
GROUP_BEGIN = 2,
|
||||
GROUP_END = 4,
|
||||
COUNT = 8,
|
||||
ALT = 16,
|
||||
CONCAT = 32,
|
||||
UNIT_SPAN = 64,
|
||||
SEQUENCE = UNIT | UNIT_SPAN,
|
||||
UNIT_SET = 2,
|
||||
UNIT_SPAN = 4,
|
||||
GROUP_BEGIN = 8,
|
||||
GROUP_END = 16,
|
||||
COUNT = 32,
|
||||
CONCAT = 64,
|
||||
ALT = 128,
|
||||
SEQUENCE = UNIT | UNIT_SPAN | UNIT_SET,
|
||||
OPERATOR = COUNT | ALT | CONCAT,
|
||||
ATOM_BEGIN = UNIT | GROUP_BEGIN | UNIT_SPAN,
|
||||
ATOM_END = UNIT | GROUP_END | COUNT | UNIT_SPAN,
|
||||
ATOM_BEGIN = SEQUENCE | GROUP_BEGIN ,
|
||||
ATOM_END = SEQUENCE | GROUP_END,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user