Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-dev] Jikespg syntax description used in ...compiler.batch/grammar/java.g

I made a stab at documenting what I know about (the syntax of) java.g:
   https://wiki.eclipse.org/JDT_Core_Programmer_Guide/ECJ/Parse#The_Grammar

You will notice that a few details are written in a vague wording, simply because I'm not really sure.

It would be great if a couple of experts review (and improve?) this. Also feedback from Alexander would be appreciated :)

I'm slightly worried about still investing in the wiki after its best-before date. What is JDT's take at migrating "all that is relevant" into a "more modern" wiki?

best,
Stephan

Am 05.01.23 um 10:46 schrieb Jayaprakash Arthanareeswaran:
This is something we rarely do. So, nobody bothered to do this.
And as long as this being static, it doesn't help anyway.

About your question, I vaguely remember there being a difference
::= and ->. I and Manoj discussed this but I don't recall what the difference was.

Regards,
Jay

-----Original Message-----
From: jdt-dev <jdt-dev-bounces@xxxxxxxxxxx> On Behalf Of Alexander Kriegisch
Sent: 05 January 2023 13:40
To: jdt-dev@xxxxxxxxxxx
Subject: [EXTERNAL] Re: [jdt-dev] Jikespg syntax description used in ...compiler.batch/grammar/java.g

I also forgot to ask what the rationale behind making the DEBUG field final is? The compiler optimising the 'if (DEBUG)' statements? While trying to solve my issue, it would have bveen nice to be able to set the flag dynamically instead of having to recompile JDT Core.

--
Alexander Kriegisch
https://scrum-master.de

Alexander Kriegisch schrieb am 05.01.2023 um 09:03:

BTW, the way I was able to debug this was to set Parser.DEBUG to true
and compile a JDT Core version with it, running my regression test
against it, watching what was actually being parsed. Is there a more
elegant way to debug grammar problems? And is there an IntelliJ or
Eclipse plugin helping me to highlight the syntax of and navigate or
even code-complete stuff in files like java.g? Especially the
navigation part was difficult, repeatedly jumping around by searching
for production names. Please also note that the AspectJ grammar is
more complex than the plain Java grammar, the latter being just a
subset of the former.
_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev
_______________________________________________
jdt-dev mailing list
jdt-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/jdt-dev



Back to the top