gnupic: Thread: Re: gpasm doesn't treat 1[2468]00000 right


[<<] [<] Page 1 of 1 [>] [>>]
Subject: Re: gpasm doesn't treat 1[2468]00000 right
From: Craig Franklin ####@####.####
Date: 6 Feb 2004 02:49:17 -0000
Message-Id: <1076033887.1447.23.camel@r2d2>

On Fri, 2004-01-30 at 16:52, Mark Burton wrote:
> Hi,
> 
> I use your excellent gputils (currently 0.11.8) and have discovered
> that it doesn't like numeric constants with values like 1200000,
> 1400000, ...
> 

There is a bug report on this one.

https://sourceforge.net/tracker/index.php?func=detail&aid=813823&group_id=41924&atid=431665

> This is because your lex hack for recognising PIC processor numbers is
> matching those and so it considers them as IDENTIFIERs rather than NUMBERs.
> 
> 1[24678][CFHL0][CERV]?[0-9X][0-9X][0-9]?[0-9ABC]? {
> /* Ugh.  As a special case, treat processor names, such as 16C84
> as identifiers rather than as hex numbers. */
>                            yylval.s = strdup(yytext);
> 			   return IDENTIFIER;
> 			 }
> 
> Can this be altered to avoid matching sequences that don't contain a
> letter? How about making the second bracketed term [CFHL] instead of
> [CFHL0] ?
> 

Unfortunately, it isn't that simple.  It would still be broken for other
radices.  I have a fix in mind.  I will try to get it done for 0.12.1.

Until then, specify the radix as a work around.

d'1200000'
0x124f80

In fact, I would recommend always doing this.  It's a little more
typing, but you are no longer susceptible to an inadvertent radix
change.  See section ~3.2.1 of the gputils manual for more information
on number representations.

Thanks.

> Regards,
> 
> Mark

[<<] [<] Page 1 of 1 [>] [>>]


Powered by ezmlm-browse 0.20.