From a5d08a6f053efb86c3f42b8f395e598f7795424f Mon Sep 17 00:00:00 2001 From: johnvg Date: Tue, 15 Feb 2011 15:26:16 +0000 Subject: fix bug in scanning 'a'.. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1841 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/scanner.icl | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'frontend') diff --git a/frontend/scanner.icl b/frontend/scanner.icl index 8d671fb..e553d10 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -996,7 +996,8 @@ ScanNumeral n input chars | IsDigit c = ScanNumeral (n + 1) input [c:chars] | c == 'E' = ScanExponentSign (n + 1) input [c:chars] | c == '.' = TestFraction n input chars - = (IntToken (revCharListToString n chars), charBack input) + #! s = revCharListToString n chars + = (IntToken s, charBack input) TestFraction :: !Int !Input ![Char] -> (!Token, !Input) TestFraction n input chars @@ -1005,7 +1006,6 @@ TestFraction n input chars | IsDigit c = ScanFraction (n + 2) input [c,'.':chars] = (IntToken (revCharListToString n chars), charBack (charBack input)) - ScanFraction :: !Int !Input ![Char] -> (!Token, !Input) ScanFraction n input chars # (eof, c, input) = ReadNormalChar input @@ -1136,7 +1136,7 @@ ScanEndOfNoBSChar c1 input = scan_CharList_or_qualified_ident c1 c input where qualified_ident_or_CharToken :: !Char !Input -> (!Token,!Input) - qualified_ident_or_CharToken c input=:{inp_stream=OldLine i line stream,inp_pos} + qualified_ident_or_CharToken c1 input=:{inp_stream=OldLine i line stream,inp_pos} | i+1 (!Token, !Input) scan_CharList_or_qualified_ident c1 c2 input=:{inp_stream=OldLine i line _} @@ -1937,4 +1937,3 @@ where (-->>) val _ :== val //(-->>) val message :== val ---> ("Scanner",message) - -- cgit v1.2.3