View Issue Details

IDProjectCategoryView StatusLast Update
0019754LazarusIDEpublic2020-11-25 01:28
ReporterJuha Manninen Assigned To 
PrioritynormalSeverityfeatureReproducibilityhave not tried
Status acknowledgedResolutionopen 
Product Version0.9.31 (SVN) 
Summary0019754: Jedi Code Format (JCF) parser needs to be replaced with codetools parser
DescriptionThe Jedi parser does not support generics and some other new FPC syntax.
It should be replaced with the codetools scanner/parser provided by Lazarus project, which gets updated also in the future.

Alternatively a new code formatter tool should be created, based on codetools.
It could use the formatting settings that are already in environment settings.
In addition it could have a list of alternative settings to choose from.
TagsNo tags attached.
Fixed in Revision
LazTarget-
Widgetset
Attached Files

Relationships

related to 0018549 closedMichael Van Canneyt FPC Support generics in fpdoc 
related to 0016128 resolvedJuha Manninen Lazarus Code formatter fails with generics. 
related to 0027083 new Lazarus JCF fails in include files 
has duplicate 0026219 resolvedMaxim Ganetsky Lazarus Problem Jedi Code Format 
related to 0020603 closedJuha Manninen Lazarus jcf error, can't format unit 
related to 0018099 closedPaul Ishenin Lazarus JEDI codeformatter messes up breakpoints 
related to 0021246 acknowledged Lazarus Jedi code format corrupt the source 
related to 0021493 closedPaul Ishenin Lazarus JCF damages source code 
related to 0021658 resolvedJuha Manninen Lazarus Strg + D doesn't invoke Jedi Code formatter ? 
related to 0022024 closedJuha Manninen Lazarus Jedi Code Format doesn't parse cvar keyword 
related to 0023442 resolvedJuha Manninen Lazarus Using JEDI Code Format on MacOS (Widestrings and Ansistrings) 
related to 0024180 resolvedJuha Manninen Lazarus Jedi Code format jumps to parse tree if it finds nested {...{...}...} comments 
related to 0026610 closedJuha Manninen Lazarus IDE : Source -> Jedi Code Format >>> Fails on nested Curly comments <<< 
related to 0026986 closedJuha Manninen Lazarus JEDI formatter fails on binary constants 
related to 0030681 resolvedJuha Manninen Lazarus JEDI Code Formatter fails with generics 
related to 0031175 resolvedJuha Manninen Lazarus Jedi code formatter not working for helper types 
related to 0031348 resolvedJuha Manninen Packages JCF : Invalid work 
related to 0031472 resolvedJuha Manninen Lazarus JCF: Format Source error with alias 
related to 0032267 resolvedJuha Manninen Lazarus jcf2 Does not format everything 
related to 0033469 resolvedJuha Manninen Lazarus JEDI and typehelpers 
related to 0038125 new Lazarus JCF fails formatting using defines in uses 

Activities

TridenT

2012-11-25 21:24

reporter   ~0064032

I've worked few years ago on the JediCodeFormat parser, as I use it in my DelphiCodeToDoc project.
I think I can help to fix few issues on the parser (like cvar keyword, generics with specialize keyword) , I know it very well.

So if you are interested, well, just verify that all other parser bugs are linked to this tracker, and send me a message !

Or of you prefer to change the parser, well, good luck ;)

Juha Manninen

2012-11-25 23:07

developer   ~0064035

Last edited: 2012-11-26 01:14

Yes please.
Nobody is working on changing the parser, your improvements in the Jedi parser would help.
Generics is the biggest problem because they are already used by many people.

The only downside of this approach is that FPC's syntax is advancing as more new features from Delphi are introduced. Thus the Jedi parser must be improved also in the future.
On the other hand, fcl-passrc parser will be maintained in any case together with FPC.

But again, as nobody is replacing the parser now, improving the Jedi parser is a good idea. Not all its problems are reported though, for example class helpers or records with methods may not be supported (not tested).

Please attach your patches in this report, in the related reports or in a new report.

Juha Manninen

2014-08-19 00:01

developer   ~0076647

I changed the summary and description because I have realized fcl-passrc parser cannot be used for changing code in-place.
It creates a parse tree and loses information like comments in the process.

Issue History

Date Modified Username Field Change
2011-07-16 21:12 Juha Manninen New Issue
2011-07-16 21:12 Juha Manninen LazTarget => -
2011-07-16 23:24 Juha Manninen Summary Jedi Code Format (JCF) parser needs to replaced with fcl-passrc parser => Jedi Code Format (JCF) parser needs to be replaced with fcl-passrc parser
2011-07-17 07:58 Alexander S. Klenin Relationship added related to 0018549
2011-08-08 15:28 Juha Manninen Relationship added related to 0016128
2011-10-06 14:11 Vincent Snijders Severity minor => feature
2011-10-06 14:11 Vincent Snijders Status new => acknowledged
2011-11-01 08:42 Juha Manninen Relationship added related to 0020603
2011-11-27 18:19 Juha Manninen Relationship added related to 0018099
2012-02-08 22:06 Juha Manninen Relationship added related to 0021246
2012-03-22 18:22 Juha Manninen Relationship added related to 0021493
2012-04-06 18:08 Juha Manninen Relationship added related to 0021658
2012-05-13 22:15 Juha Manninen Relationship added related to 0022024
2012-11-25 21:24 TridenT Note Added: 0064032
2012-11-25 23:07 Juha Manninen Note Added: 0064035
2012-11-26 01:14 Juha Manninen Note Edited: 0064035
2012-12-07 00:00 Juha Manninen Relationship added related to 0023442
2013-04-28 00:01 Juha Manninen Relationship added related to 0024180
2014-05-25 23:44 Maxim Ganetsky Relationship added has duplicate 0026219
2014-08-18 23:15 Juha Manninen Relationship added related to 0026610
2014-08-18 23:59 Juha Manninen Summary Jedi Code Format (JCF) parser needs to be replaced with fcl-passrc parser => Jedi Code Format (JCF) parser needs to be replaced with codetools parser
2014-08-18 23:59 Juha Manninen Description Updated View Revisions
2014-08-19 00:01 Juha Manninen Note Added: 0076647
2014-11-02 16:44 Juha Manninen Relationship added related to 0026986
2016-10-08 11:19 Juha Manninen Relationship added related to 0030681
2016-12-30 10:28 Juha Manninen Relationship added related to 0031175
2017-02-04 22:12 Juha Manninen Relationship added related to 0031348
2017-03-03 21:43 Juha Manninen Relationship added related to 0031472
2017-08-13 18:03 Juha Manninen Relationship added related to 0032267
2018-01-05 22:25 Juha Manninen Relationship added related to 0027083
2018-03-20 21:34 Juha Manninen Relationship added related to 0033469
2020-11-25 01:28 Juha Manninen Relationship added related to 0038125