Explorar el Código

fix issue -- single line comment may be last line in text (EOT ending)

git-svn-id: https://svn.inf.ethz.ch/svn/lecturers/a2/trunk@6464 8c9fc860-2736-0410-a75d-ab315db34111
eth.metacore hace 9 años
padre
commit
c8e474bffa
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      source/FoxCSharpScanner.Mod

+ 3 - 2
source/FoxCSharpScanner.Mod

@@ -755,7 +755,8 @@ TYPE
                 any character except a NewLineCharacter.
             NewlineCharacter =
                 Carriage return character (0DX) |
-                Line feed character (0AX).
+                Line feed character (0AX) |
+				EOT (0X).
             DelimitedComment =
                 '/*' [DelimitedCommentText] Asterisks '/'.
             DelimitedCommentText =
@@ -773,7 +774,7 @@ TYPE
         PROCEDURE ReadSingleLineComment(VAR symbol: Symbol);
         BEGIN
             stringMaker.Clear;
-            WHILE (ch # 0DX) & (ch # 0AX) DO
+            WHILE (ch # 0DX) & (ch # 0AX) & (ch # EOT) DO
                 stringWriter.Char(ch);
                 GetNextCharacter;
             END;