diff options
author | johnvg | 2001-09-12 14:39:42 +0000 |
---|---|---|
committer | johnvg | 2001-09-12 14:39:42 +0000 |
commit | 80a3fbfbc790f0d8b3671e9ca8d1adc9abb959af (patch) | |
tree | eea3519399d3d6c780eae3064f75ca87b97d5fb0 /frontend/scanner.icl | |
parent | clean 1.3 code for recognizing abort and undef in the strictness analyzer (diff) |
add <|- generator for overloaded lists
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@774 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
Diffstat (limited to 'frontend/scanner.icl')
-rw-r--r-- | frontend/scanner.icl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 0df9ee7..911a127 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -135,6 +135,7 @@ ScanOptionNoNewOffsideForSeqLetBit:==4; | DoubleBackSlashToken // \\ | LeftArrowToken // <- | LeftArrowColonToken // <-: + | LeftArrowWithBarToken // <|- | DotDotToken // .. | AndToken // & | HashToken // # @@ -660,7 +661,20 @@ Scan c0=:'<' input TypeContext Scan c0=:'<' input co # (eof, c1, input) = ReadNormalChar input | eof = (IdentToken "<", input) - | c1 <> '-' = ScanOperator 0 (charBack input) [c0] co + | c1 <> '-' + | c1<>'|' + = ScanOperator 0 (charBack input) [c0] co + # (eof, c2, input) = ReadNormalChar input + | eof + = (IdentToken "<|",input) + | c2=='-' + # (eof, c3, input) = ReadNormalChar input + | eof = (LeftArrowWithBarToken, input) + | isSpecialChar c3 = ScanOperator 3 input [c3, c2, c1, c0] co + = (LeftArrowWithBarToken, charBack input) + | isSpecialChar c2 + = ScanOperator 2 input [c2, c1, c0] co + = (IdentToken "<|", charBack input) # (eof, c2, input) = ReadNormalChar input | eof = (LeftArrowToken, input) | c2 == ':' @@ -1341,6 +1355,7 @@ where toString DoubleBackSlashToken = "\\\\" toString LeftArrowToken = "<-" toString LeftArrowColonToken = "<-:" + toString LeftArrowWithBarToken = "<|-" toString DotDotToken = ".." toString AndToken = "&" toString HashToken = "#" |