]> git.sur5r.net Git - cc65/blobdiff - src/sim65/scanner.c
New module strstack
[cc65] / src / sim65 / scanner.c
index ed71c74ede358f3709399a64244a718c2b578fd8..eb94e3a68af4f53e285b024073293b73c726bc52 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2002 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2003 Ullrich von Bassewitz                                       */
+/*               Römerstrasse 52                                             */
+/*               D-70794 Filderstadt                                         */
+/* EMail:        uz@cc65.org                                                 */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
@@ -40,6 +40,7 @@
 #include <ctype.h>
 
 /* common */
+#include "chartype.h"
 #include "xsprintf.h"
 
 /* sim65 */
@@ -176,11 +177,11 @@ Again:
     CfgErrorCol  = InputCol;
 
     /* Identifier? */
-    if (C == '_' || isalpha (C)) {
+    if (C == '_' || IsAlpha (C)) {
 
        /* Read the identifier */
        I = 0;
-       while (C == '_' || isalnum (C)) {
+       while (C == '_' || IsAlNum (C)) {
            if (I < CFG_MAX_IDENT_LEN) {
                CfgSVal [I++] = C;
            }
@@ -237,7 +238,12 @@ Again:
 
        case '.':
            NextChar ();
-           CfgTok = CFGTOK_DOT;
+            if (C == '.') {
+                NextChar ();
+                CfgTok = CFGTOK_DOTDOT;
+            } else {
+               CfgTok = CFGTOK_DOT;
+            }
            break;
 
        case ',':
@@ -322,6 +328,14 @@ void CfgConsumeColon (void)
 
 
 
+void CfgConsumeRCurly (void)
+/* Consume a right curly brace */
+{
+    CfgConsume (CFGTOK_RCURLY, "`}' expected");
+}
+
+
+
 void CfgOptionalComma (void)
 /* Consume a comma if there is one */
 {