New info file statement "asminc" that allows to read in a file containing

symbol values in asm syntax.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3355 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2005-01-08 20:16:57 +00:00
parent 1596692501
commit 83147e5fce
7 changed files with 428 additions and 14 deletions

View File

@@ -6,7 +6,7 @@
/* */
/* */
/* */
/* (C) 2000-2003 Ullrich von Bassewitz */
/* (C) 2000-2005 Ullrich von Bassewitz */
/* R<>merstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
@@ -262,6 +262,20 @@ Again:
InfoTok = INFOTOK_STRCON;
break;
case '\'':
NextChar ();
if (C == EOF || IsControl (C)) {
InfoError ("Invalid character constant");
}
InfoIVal = C;
NextChar ();
if (C != '\'') {
InfoError ("Unterminated character constant");
}
NextChar ();
InfoTok = INFOTOK_CHARCON;
break;
case '#':
/* Comment */
while (C != '\n' && C != EOF) {
@@ -368,6 +382,16 @@ void InfoAssureStr (void)
void InfoAssureChar (void)
/* Make sure the next token is a char constant */
{
if (InfoTok != INFOTOK_STRCON) {
InfoError ("Character constant expected");
}
}
void InfoAssureIdent (void)
/* Make sure the next token is an identifier */
{
@@ -427,6 +451,8 @@ void InfoBoolToken (void)
{ "NO", INFOTOK_FALSE },
{ "TRUE", INFOTOK_TRUE },
{ "FALSE", INFOTOK_FALSE },
{ "ON", INFOTOK_TRUE },
{ "OFF", INFOTOK_FALSE },
};
/* If we have an identifier, map it to a boolean token */