.endscope
</verb></tscreen>
-
+
<sect>Address sizes<label id="address-sizes"><p>
removing the lines with the assignments may also be an option when porting
code written for older assemblers).
+ <tag><tt>missing_char_term</tt></tag>
+
+ Accept single quoted character constants where the terminating quote is
+ missing.
+ <tscreen><verb>
+ lda #'a
+ </verb></tscreen>
+ <bf/Note:/ This does not work in conjunction with <tt/.FEATURE
+ loose_string_term/, since in this case the input would be ambigous.
+
</descrip>
It is also possible to specify features on the command line using the
/* */
/* */
/* */
-/* (C) 2000-2002 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2000-2003 Ullrich von Bassewitz */
+/* Römerstraße 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
"dollar_in_identifiers",
"leading_dot_in_identifiers",
"pc_assignment",
+ "missing_char_term",
};
case FEAT_DOLLAR_IN_IDENTIFIERS: DollarInIdents = 1; break;
case FEAT_LEADING_DOT_IN_IDENTIFIERS: LeadingDotInIdents= 1; break;
case FEAT_PC_ASSIGNMENT: PCAssignment = 1; break;
+ case FEAT_MISSING_CHAR_TERM: MissingCharTerm = 1; break;
default: /* Keep gcc silent */ break;
}
/* */
/* */
/* */
-/* (C) 2000-2002 Ullrich von Bassewitz */
-/* Wacholderweg 14 */
-/* D-70597 Stuttgart */
-/* EMail: uz@musoftware.de */
+/* (C) 2000-2003 Ullrich von Bassewitz */
+/* Römerstraße 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
FEAT_DOLLAR_IN_IDENTIFIERS,
FEAT_LEADING_DOT_IN_IDENTIFIERS,
FEAT_PC_ASSIGNMENT,
+ FEAT_MISSING_CHAR_TERM,
/* Special value: Number of features available */
FEAT_COUNT
unsigned char DollarInIdents = 0; /* Allow '$' in identifiers */
unsigned char LeadingDotInIdents = 0; /* Allow '.' to start an identifier */
unsigned char PCAssignment = 0; /* Allow "* = $XXX" or "$ = $XXX" */
+unsigned char MissingCharTerm = 0; /* Allow lda #'a (no closing term) */
/* Misc stuff */
const char Copyright[] = "(C) Copyright 1998-2004 Ullrich von Bassewitz";
extern unsigned char DollarInIdents; /* Allow '$' in identifiers */
extern unsigned char LeadingDotInIdents; /* Allow '.' to start an identifier */
extern unsigned char PCAssignment; /* Allow "* = $XXX" or "$ = $XXX" */
+extern unsigned char MissingCharTerm; /* Allow lda #'a (no closing term) */
/* Misc stuff */
extern const char Copyright[]; /* Copyright string */
/* */
/* */
/* */
-/* (C) 1998-2003 Ullrich von Bassewitz */
+/* (C) 1998-2004 Ullrich von Bassewitz */
/* Römerstraße 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* End of current line reached, read next line */
if (fgets (IFile->Line, sizeof (IFile->Line), IFile->F) == 0) {
/* End of file. Add an empty line to the listing. This is a
- * small hack needed to keep the PC output in sync.
- */
+ * small hack needed to keep the PC output in sync.
+ */
NewListingLine ("", IFile->Pos.Name, ICount);
C = EOF;
return;
/* Return the length of the string */
return I;
-}
+}
} else {
/* Always a character constant */
NextChar ();
- if (C == '\n' || C == EOF) {
+ if (C == EOF || IsControl (C)) {
Error ("Illegal character constant");
goto CharAgain;
}
Tok = TOK_CHARCON;
NextChar ();
if (C != '\'') {
- Error ("Illegal character constant");
+ if (!MissingCharTerm) {
+ Error ("Illegal character constant");
+ }
} else {
NextChar ();
}