]> git.sur5r.net Git - cc65/blobdiff - src/sim65/scanner.h
Removed (pretty inconsistently used) tab chars from source code base.
[cc65] / src / sim65 / scanner.h
index 25427e88982dcdb261dd70f5760b22607e74866d..bd8bbcfcabd749f3258d090eb0b84d05d84849ea 100644 (file)
@@ -1,15 +1,15 @@
 /*****************************************************************************/
 /*                                                                           */
-/*                                scanner.h                                 */
+/*                                 scanner.h                                 */
 /*                                                                           */
 /*            Configuration file scanner for the sim65 6502 simulator        */
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2002 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2012, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+/* common */
+#include "attrib.h"
+#include "strbuf.h"
+
+
+
 /*****************************************************************************/
-/*                                          Data                                    */
+/*                                   Data                                    */
 /*****************************************************************************/
 
 
@@ -57,15 +63,15 @@ typedef enum {
     CFGTOK_EQ,
     CFGTOK_COLON,
     CFGTOK_DOT,
+    CFGTOK_DOTDOT,
     CFGTOK_EOF,
 
     /* Primary blocks */
-    CFGTOK_CHIPS,
+    CFGTOK_CPU,
+    CFGTOK_ADDRSPACE,
 
-    /* Chips section */
-    CFGTOK_NAME,
-    CFGTOK_ADDR,
-    CFGTOK_RANGE,
+    /* Secondary stuff */
+    CFGTOK_TYPE,
 
     /* Special identifiers */
     CFGTOK_TRUE,
@@ -78,27 +84,26 @@ typedef enum {
 /* Mapping table entry, special identifier --> token */
 typedef struct IdentTok IdentTok;
 struct IdentTok {
-    const char*        Ident;          /* Identifier */
-    cfgtok_t   Tok;            /* Token for identifier */
+    const char* Ident;          /* Identifier */
+    cfgtok_t    Tok;            /* Token for identifier */
 };
-#define ENTRY_COUNT(s)         (sizeof (s) / sizeof (s [0]))
+#define ENTRY_COUNT(s)  (sizeof (s) / sizeof (s [0]))
 
 
 
 /* Current token and attributes */
-#define CFG_MAX_IDENT_LEN  255
-extern cfgtok_t                CfgTok;
-extern char                    CfgSVal [CFG_MAX_IDENT_LEN+1];
-extern unsigned long   CfgIVal;
+extern cfgtok_t         CfgTok;
+extern StrBuf           CfgSVal;
+extern unsigned long    CfgIVal;
 
 /* Error location */
-extern unsigned                CfgErrorLine;
-extern unsigned                CfgErrorCol;
+extern unsigned         CfgErrorLine;
+extern unsigned         CfgErrorCol;
 
 
 
 /*****************************************************************************/
-/*                                          Code                                    */
+/*                                   Code                                    */
 /*****************************************************************************/
 
 
@@ -121,6 +126,9 @@ void CfgConsumeSemi (void);
 void CfgConsumeColon (void);
 /* Consume a colon */
 
+void CfgConsumeRCurly (void);
+/* Consume a right curly brace */
+
 void CfgOptionalComma (void);
 /* Consume a comma if there is one */