[fpc-pascal] problems building h2pas of 2.0.4 release compiler

Marc Santhoff M.Santhoff at t-online.de
Fri Jan 19 13:28:06 CET 2007


Am Freitag, den 19.01.2007, 12:33 +0100 schrieb Daniël Mantione:
> 
> Op Fri, 19 Jan 2007, schreef Marc Santhoff:
> 
> > Hi,
> > 
> > after checking out "release_2_0_4" of fpc the compiler seems to have
> > built correctly, but when it comes to building h2pas the following error
> > occurs:
> > 
> > <snip>
> > gmake -C h2pas all
> > gmake[3]: Entering directory `/usr/home/marc/program/fpc-svn/fpc/utils/h2pas'
> > /usr/local/bin/gmkdir -p units/i386-freebsd
> > /usr/home/marc/program/fpc-svn/fpc/compiler/ppc386 -Ur -Xs -OG2p3 -n -Sg -Fu/usr/home/marc/program/fpc-svn/fpc/rtl/units/i386-freebsd -FE. -FUunits/i386-freebsd -di386 -dRELEASE h2pas.pas
> > scan.pas(963,25) Error: High range limit < low range limit
> > scan.pas(963,25) Error: Upper bound of range is less than lower bound
> > scan.pas(966,2) Error: Illegal expression
> > scan.pas(966,2) Error: Illegal expression
> > scan.pas(966,2) Fatal: Syntax error, ")" expected but ";" found
> > scan.pas(30,42) Fatal: Compilation aborted
> 
> Are you sure your file isn't corrupt? This is the code there:
> 
> ----
> const
> 
> yynmarks   = 310;
> yynmatches = 310;
> yyntrans   = 559;
> yynstates  = 312;
> 
> yyk : array [1..yynmarks] of Integer = (
> ----
> 
> 310 is larger than 1, so the compiler should not complain.
> 
> Daniël

Maybe it is, although I think it is generated, so the source (scan.l ?)
must be defect ...

<snip>
const

yynmarks   = 0;
yynmatches = 0;
yyntrans   = 0;
yynstates  = 2;

yyk : array [1..yynmarks] of Integer = (
  { 0: }
  { 1: }
);
</snip>

Looks like the scanner generator does something fishy ...

Marc





More information about the fpc-pascal mailing list