[fpc-devel]h2pas problem

Jeff Pohlmeyer yetanothergeek at yahoo.com
Tue Feb 25 08:08:24 CET 2003


I am having a slight problem with the symbols "U" and "L" in h2pas...

/* sample header */
#define three 3u  // h2pas strips the "u" ( this is good )
#define big_three 3L  // h2pas strips the "L" ( this is good )

// But what about this...
int test_x ( int a );  // Syntax is OK
int test_y ( int l );  // Syntax error ???
int test_z ( int u );  // Syntax error ???


The problem seems to be with the regex for unsigned and long designators

The expression tests for:
  "starts with ZERO or more digits"

I think that should be:
  "starts with ONE or more digits"

So maybe change the expression on line 446 of "scan.l" ?

from:
  {D}*[Uu]?[Ll]?

to:
  {D}+[Uu]?[Ll]?



Thanks, 
 - Jeff



__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/



More information about the fpc-devel mailing list