<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/subex/subexast.go
diff options
context:
space:
mode:
Diffstat (limited to 'subex/subexast.go')
-rw-r--r--subex/subexast.go54
1 files changed, 0 insertions, 54 deletions
diff --git a/subex/subexast.go b/subex/subexast.go
index 650f038..5e63f03 100644
--- a/subex/subexast.go
+++ b/subex/subexast.go
@@ -48,38 +48,6 @@ func (ast SubexASTOr) compileWith(next SubexState) SubexState {
}
}
-// Run the content subex as many times as possible as the input is read in
-type SubexASTMaximise struct {
- content SubexAST
-}
-func (ast SubexASTMaximise) compileWith(next SubexState) SubexState {
- state := &SubexGroupState {
- nil,
- next,
- }
- state.first = ast.content.compileWith(state)
- return state
-}
-func (ast SubexASTMaximise) String() string {
- return fmt.Sprintf("(%v)*", ast.content)
-}
-
-// Run the content subex as few times as possible as the input is read in
-type SubexASTMinimise struct {
- content SubexAST
-}
-func (ast SubexASTMinimise) compileWith(next SubexState) SubexState {
- state := &SubexGroupState {
- next,
- nil,
- }
- state.second = ast.content.compileWith(state)
- return state
-}
-func (ast SubexASTMinimise) String() string {
- return fmt.Sprintf("(%v)-", ast.content)
-}
-
type ConvexRange struct {
start, end int
}
@@ -185,28 +153,6 @@ func (ast SubexASTOutput) compileWith(next SubexState) SubexState {
}
}
-// Try to use a subex but just skip over this if it doesn't match
-type SubexASTTry struct {
- content SubexAST
-}
-func (ast SubexASTTry) compileWith(next SubexState) SubexState {
- return &SubexGroupState {
- ast.content.compileWith(next),
- next,
- }
-}
-
-// Try to skip over this subex but use it should that not match
-type SubexASTMaybe struct {
- content SubexAST
-}
-func (ast SubexASTMaybe) compileWith(next SubexState) SubexState {
- return &SubexGroupState {
- next,
- ast.content.compileWith(next),
- }
-}
-
// Read in a repeated subex separated by a delimiter. Greedy
type SubexASTJoin struct {
content, delimiter SubexAST