From 5cc65c1bf2a4db56ec8ebf6b83ddf6ae7afe5474 Mon Sep 17 00:00:00 2001 From: pieter Date: Tue, 16 Nov 1999 16:18:12 +0000 Subject: allow operator names like .* git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@53 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/scanner.icl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'frontend') diff --git a/frontend/scanner.icl b/frontend/scanner.icl index d718ae2..fb66486 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -435,16 +435,18 @@ Scan c0=:'&' input co Scan c0=:'.' input co = case co of TypeContext - -> (DotToken, input) _ # (eof, c1, input) = ReadChar input | eof -> (DotToken, input) - | c1 <> '.' -> (DotToken, charBack input) - # (eof, c2, input) = ReadChar input - | eof -> (DotDotToken, input) - | isSpecialChar c2 + | c1 == '.' + # (eof, c2, input) = ReadChar input + | eof -> (DotDotToken, input) + | isSpecialChar c2 -> ScanOperator 2 input [c2, c1, c0] co -> (DotDotToken, charBack input) + | isSpecialChar c1 + -> ScanOperator 1 input [c1, c0] co + -> (DotToken, charBack input) Scan '!' input TypeContext = (ExclamationToken, input) Scan '\\' input co # (eof, c, input) = ReadChar input -- cgit v1.2.3