varINFINITE_REPSint=-1// Represents infinite reps eg. the end range in {5,}
varINFINITE_REPSint=-1// Represents infinite reps eg. the end range in {5,}
// This represents a node in the postfix representation of the expression
// This represents a node in the postfix representation of the expression
typepostfixNodestruct{
typepostfixNodestruct{
nodetypeNodeType
nodetypeNodeType
contents[]rune// Contents of the node - the length of this would only be >1 if the node represents a character class
contents[]rune// Contents of the node
startRepsint// Minimum number of times the node should be repeated - used with numeric specifiers
startRepsint// Minimum number of times the node should be repeated - used with numeric specifiers
endRepsint// Maximum number of times the node should be repeated - used with numeric specifiers
endRepsint// Maximum number of times the node should be repeated - used with numeric specifiers
allCharsbool// Whether or not the current node represents all characters (eg. dot metacharacter)
allCharsbool// Whether or not the current node represents all characters (eg. dot metacharacter)
except[]rune// For inverted character classes, we match every unicode character _except_ a few. In this case, allChars is true and the exceptions are placed here.
except[]rune// For inverted character classes, we match every unicode character _except_ a few. In this case, allChars is true and the exceptions are placed here.
lookaroundSignint// ONLY USED WHEN nodetype == ASSERTION. Whether we have a positive or negative lookaround.
lookaroundDirint// Lookbehind or lookahead
}
}
// Creates a new escaped node - the given character is assumed to have been preceded by a backslash
// Creates a new escaped node - the given character is assumed to have been preceded by a backslash