View Issue Details

IDProjectCategoryView StatusLast Update
0030717FPCFCLpublic2017-01-28 13:26
ReporterMichalis KamburelisAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Platformx86-64OSDebian GNU/LinuxOS Version(testing)
Product Version3.1.1Product Build34702 
Target Version3.2.0Fixed in Version3.1.1 
Summary0030717: fcl-passrc fails to parse "else" right after a tricky case with "for"
DescriptionSee the attached example. FPC compiles it fine.

$ fpc for_else.lpr
$ ./test_passrc for_else.lpr
An unhandled exception occurred at $0000000000477825:
EParserError: Syntax error at token "else" in file for_else.lpr at line 8 column 6
TagsNo tags attached.
Fixed in Revision34882
FPCOldBugId
FPCTarget
Attached Files

Relationships

has duplicate 0031195 closedMichael Van Canneyt fcl-passrc fails to parse "Syntax error at token "else"" 

Activities

Michalis Kamburelis

2016-10-10 01:44

reporter  

for_else.lpr (177 bytes)

Michalis Kamburelis

2016-10-10 01:44

reporter  

test_passrc.lpr (2,184 bytes)

Michalis Kamburelis

2016-10-10 01:45

reporter  

raise_semicolon.lpr (242 bytes)

Michalis Kamburelis

2016-10-10 01:50

reporter   ~0095090

I am also attaching the raise_semicolon.lpr testcase that is (possibly) the same bug. It's a similar situation and error as with the for_else.lpr testcase, but this time with

      if ... then
        raise
      else

construction.

For fcl-passrc, the "else" is unexpected:

$ ./test_passrc raise_semicolon.lpr
An unhandled exception occurred at $0000000000477825:
EParserError: Identifier expected at token "else" in file raise_semicolon.lpr at line 12 column 10

I'm not submitting it as a separate bugreport, to avoid duplicates, as it seems the same root cause. If the cause (or fix) of the bug is different, I'll submit another bugreport:)

Michalis Kamburelis

2016-10-10 01:55

reporter   ~0095091

I'm also attaching the if_and_with.lpr testcase, that also looks like the same bug. If you write something like

  if RationalBezierCurvePointSelected then
    with SomeRecord do
      Writeln('foo')
  else

the the fcl-passrc is surprised by the "else" keyword:

$ ./test_passrc if_and_with.lpr
An unhandled exception occurred at $0000000000477825:
EParserError: Syntax error at token "else" in file if_and_with.lpr at line 8 column 6

Michalis Kamburelis

2016-10-10 01:56

reporter  

if_and_with.lpr (199 bytes)

Michael Van Canneyt

2016-11-12 23:47

administrator   ~0095810

Fixed, thanks for reporting!

Issue History

Date Modified Username Field Change
2016-10-10 01:44 Michalis Kamburelis New Issue
2016-10-10 01:44 Michalis Kamburelis File Added: for_else.lpr
2016-10-10 01:44 Michalis Kamburelis File Added: test_passrc.lpr
2016-10-10 01:45 Michalis Kamburelis File Added: raise_semicolon.lpr
2016-10-10 01:50 Michalis Kamburelis Note Added: 0095090
2016-10-10 01:55 Michalis Kamburelis Note Added: 0095091
2016-10-10 01:56 Michalis Kamburelis File Added: if_and_with.lpr
2016-10-10 08:09 Michael Van Canneyt Assigned To => Michael Van Canneyt
2016-10-10 08:09 Michael Van Canneyt Status new => assigned
2016-11-12 23:47 Michael Van Canneyt Fixed in Revision => 34882
2016-11-12 23:47 Michael Van Canneyt Note Added: 0095810
2016-11-12 23:47 Michael Van Canneyt Status assigned => resolved
2016-11-12 23:47 Michael Van Canneyt Fixed in Version => 3.1.1
2016-11-12 23:47 Michael Van Canneyt Resolution open => fixed
2016-11-12 23:47 Michael Van Canneyt Target Version => 3.2.0
2017-01-28 13:26 Michael Van Canneyt Relationship added has duplicate 0031195