diff options
author | buraq <buraq@epfl.ch> | 2003-07-13 11:42:52 +0000 |
---|---|---|
committer | buraq <buraq@epfl.ch> | 2003-07-13 11:42:52 +0000 |
commit | e31cc564d5ad9a112a258360f98707aed7c3a619 (patch) | |
tree | df9a7a62180619dcd9eb7d5b8d73f4f9607cc133 /sources/scalac/transformer/matching/SequenceMatcher.java | |
parent | e96d1be7b64a67733cc589f258af1baecaeaf6dd (diff) | |
download | scala-e31cc564d5ad9a112a258360f98707aed7c3a619.tar.gz scala-e31cc564d5ad9a112a258360f98707aed7c3a619.tar.bz2 scala-e31cc564d5ad9a112a258360f98707aed7c3a619.zip |
completed migration. code is now operational
Diffstat (limited to 'sources/scalac/transformer/matching/SequenceMatcher.java')
-rw-r--r-- | sources/scalac/transformer/matching/SequenceMatcher.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/sources/scalac/transformer/matching/SequenceMatcher.java b/sources/scalac/transformer/matching/SequenceMatcher.java index ef68b8a909..7a952ce556 100644 --- a/sources/scalac/transformer/matching/SequenceMatcher.java +++ b/sources/scalac/transformer/matching/SequenceMatcher.java @@ -88,8 +88,9 @@ public class SequenceMatcher extends PatternTool { } */ - // translates the det/switching automaton to scala code - + /** translates the det/switching automaton to scala code + * precondition: pat.type() corresponds to element type + */ Tree addBinderToBody( Tree pat, Tree body ) { SplitNested spn = new SplitNested( pat, _m.owner, cf ); @@ -110,7 +111,7 @@ public class SequenceMatcher extends PatternTool { body = nbody; } - Type elementType = cf.getElemType( pat.type() ); + Type elementType = cf.getElemType_Sequence( pat.type() ); BindingBerrySethi build = new BindingBerrySethi(); NondetWordAutom left = build.automatonFrom( pat, new Integer(0) ); @@ -216,6 +217,7 @@ public class SequenceMatcher extends PatternTool { /** constructs a word recognizer from an array of patterns which * should all be SequencePatterns ( no wildcard * ) + * precondition: pat.type corresponds to element type * @param _m Matcher object, holds the result * @param pat the (Sequence) patterns * @param body the bodies @@ -238,7 +240,7 @@ public class SequenceMatcher extends PatternTool { Type seqType = pat[ 0 ].type(); - elementType = cf.getElemType( seqType ); + elementType = cf.getElemType_Sequence( seqType ); NondetWordAutom manyNfa[] = new NondetWordAutom[ pat.length ]; |