Re: [cc65] "--feature labels_without_colons" not always working with 2.11.0?

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2005-11-15 12:02:00
Hello Uz,

* On Sun, Nov 13, 2005 at 01:45:09PM +0100 Ullrich von Bassewitz wrote:
 
> On Fri, Nov 11, 2005 at 04:50:43PM +0100, Spiro Trikaliotis wrote:
> > I have a problem with the "--feature labels_without_colons"
> > command-line option in 2.11.0. At least, this is a change in the
> > behaviour to the 2.10.x version.
> 
> I'm not aware of any changes, so I will need to have a look at the
> attached code when I'm home again. Thanks for the report!

I investigated a little bit (with 2.11.0 with both public patches
applied) and found the following:

The problem is related to HadWS in main.c(625). After the .include,
HadWS ("had Whitespace"?) is set, thus, the error is generated.

If I insert a blank line as first line of include.inc, the error is
gone. The same applies if I have any other line above the label without
colon.

To me, it seems that HadWS is not correctly reset if an include file is
opened.

I see the following possibilities to fix this:

1. remove HadWS completely from main.c; this way, you can define labels
   without colons even after spaces or tabs;
   (Is there a reason why a label without colon is not allowed after a
   whitespace?)
2. make HadWS more global to be able to update it accordingly when a
   file is included;
3. when a file is included, let the scanner generate a "CR" by itself.

Perhaps, you will come up with an even better solution (it is your
source, not mine. ;))

Regards,
   Spiro.

-- 
Spiro R. Trikaliotis
http://www.trikaliotis.net/
http://cbm4win.sf.net/
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Tue Nov 15 12:02:20 2005

This archive was generated by hypermail 2.1.8 : 2005-11-15 12:02:24 CET