Recent

Author Topic: Fcl-Passrc parser support of C style assignments  (Read 253 times)

simone

  • Full Member
  • ***
  • Posts: 163
Fcl-Passrc parser support of C style assignments
« on: April 14, 2019, 08:20:11 pm »
I'm doing some experiments with parser fcl-passrc. I noticed that when the parser process a C style assignments (for example a+=1) an exception is raised. So, my question is: does the parser not support the most recent syntactic updates?


Thaddy

  • Hero Member
  • *****
  • Posts: 7798
Re: Fcl-Passrc parser support of C style assignments
« Reply #1 on: April 14, 2019, 08:38:11 pm »
Are you using trunk? There have been many updates.
Ad Brexinitum (can't help it)

simone

  • Full Member
  • ***
  • Posts: 163
Re: Fcl-Passrc parser support of C style assignments
« Reply #2 on: April 14, 2019, 08:46:45 pm »
No, I'm using the version shipped with Lazarus 2.0. I will try the trunk version. Thanks for information.

simone

  • Full Member
  • ***
  • Posts: 163
Re: Fcl-Passrc parser support of C style assignments
« Reply #3 on: April 14, 2019, 11:47:02 pm »
With the trunk version I have the same problem… Can anyone confirm this? If so, I fill a bug report. Thanks in advance.

simone

  • Full Member
  • ***
  • Posts: 163
Re: Fcl-Passrc parser support of C style assignments
« Reply #4 on: April 15, 2019, 10:40:44 pm »
I reported the issue, but it's not a bug. By default C assignments are not allowed by parser.

So, with respect to example in the wiki

http://wiki.freepascal.org/fcl-passrc

It must be used -Sc option at command line. At parser level code, this corresponds to
 
Code: Pascal  [Select]
  1. Parser.Options:=Parser.Options+[po_cassignments]

Thanks to Mattias Gaertner for explanation.