add implementation for followpos
This commit is contained in:
@@ -197,6 +197,14 @@ struct
|
|||||||
| ZERO_OR_MORE regex => lastpos (regex, acc)
|
| ZERO_OR_MORE regex => lastpos (regex, acc)
|
||||||
| ONE_OR_MORE regex => lastpos (regex, acc)
|
| ONE_OR_MORE regex => lastpos (regex, acc)
|
||||||
| GROUP regex => lastpos (regex, acc)
|
| GROUP regex => lastpos (regex, acc)
|
||||||
|
|
||||||
|
fun followpos tree =
|
||||||
|
case tree of
|
||||||
|
CONCAT (_, r2) => firstpos (r2, [])
|
||||||
|
| ZERO_OR_MORE r => firstpos (r, [])
|
||||||
|
| ZERO_OR_ONE r => firstpos (r, [])
|
||||||
|
| ONE_OR_MORE r => firstpos (r, [])
|
||||||
|
| _ => []
|
||||||
end
|
end
|
||||||
|
|
||||||
fun parse str =
|
fun parse str =
|
||||||
|
|||||||
Reference in New Issue
Block a user