Code too large #2161
|
Hi, I am currently struggling with the Code too large problem while I am trying to implement the Did anyone already experience this problem and can provide a solution for that? Thank you in advance! |
Replies: 17 comments 11 replies
|
Greetings. I was worried that we will hit this at a time. Its a limitation of JavaCC when the Grammar is too complex and the generated Parser becomes to large (beyond the 64kb mark). In general, its a JavaCC issue and should be discussed there.
|
|
I opened a case at JavaCC, see javacc/javacc#297 |
|
Hi @manticore-projects , The error occurs in the So I guess my implementation is being blocked by that problem and we need to wait for a solution or workaround provided at JavaCC. |
|
@ssteinhauser: please give it a few days to collect feedback and then we will look for an acceptable way forward. |
|
Hi. You'll have to change yous Tell me how things evolve. |
|
Hi
By the way: the version you�ll find on Maven Central is 8.0.1; I�m on a
8.1.0 version, currently not released; it has a lot of �laundry� changes but
with normally no impact; main benefits for users should be prettier
generated code and better debug traces (lookahead, token manager, parser).
Will it be possible for you to check without too much effort that JSqlParser
works fine with 8.0.1, and then spend more time checking it works with 8.1.0
(for example on performance, traces�)?
TIA
Regards
Marc
De : manticore-projects ***@***.***>
Envoyé : mardi 11 février 2025 12:16
À : JSQLParser/JSqlParser ***@***.***>
Cc : Marc MAZAS ***@***.***>; Mention ***@***.***>
Objet : Re: [JSQLParser/JSqlParser] Code too large (Discussion #2161)
@MarcMazas <https://github.com/MarcMazas> : Thank you a lot! I definitely
will give this a try soonest and appreciate your help and support. I will
return with findings and hopefully a success story.
Cheers and best
Andreas
�
Reply to this email directly, view it on GitHub
<#2161 (comment)
-12139319> , or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQZRCZ7KCWMSSRUQHJOKUL2P
HLVHAVCNFSM6AAAAABW2GOQPOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTE
MJTHEZTCOI> .
You are receiving this because you were mentioned.
<https://github.com/notifications/beacon/AFQZRCYXTCVE7Z6DJ6MD5GL2PHLVHA5CNFS
M6AAAAABW2GOQPOWGG33NNVSW45C7OR4XAZNRIRUXGY3VONZWS33OINXW23LFNZ2KUY3PNVWWK3T
UL5UWJTQAXE5TO.gif> Message ID:
***@***.***
***@***.***
.com> >
|
About the "Code too large" issue: from what I've seen, you had 2 errrors:
|
|
@ssteinhauser: There is some good news. After running into
Here is the new branch: https://github.com/JSQLParser/JSqlParser/tree/javacc8 You can continue your implementation on that. |
|
@ssteinhauser: We have gotten a fully functional JavaCC-8 based JSQLParser, which passed all tests and is on par performance wise and function wise. Please see: https://github.com/JSQLParser/JSqlParser/tree/javacc8_without_semantic_lookahead It has no limitations to tokens, will be the basis for the next major release and can be used as a drop in replacement already. |
|
JSQLParser 5.4 Snapshot is running on JavaCC 8.1 Snapshot via 675e8b6. |
|
I will open another issue at JavaCC: javacc/javacc#309 |
|
I have just published a javacc-8-java snapshot that solves the error (I passed some static data in an inner static class). |
|
I can confirm this working now by hard refreshing dependencies: @MarcMazas : thank you so much! |
|
@ssteinhauser: please also keep an eye on the JHM benchmarks. I will not merge any changes resulting in any significant performance deterioration especially when then the dialect/feature was rather exotic. The following command will indicate problems early: gradle jmhAnd so far, your implementation looks very good: |
|
I take the opportuinity to suggest you to consider not defining as tokens the unfrequent keywords but rather keep them like identifiers matched by a semantic lookahead. Example 1 on simple cases: Example 2 on more choices: in the java section or in a helper class |
|
I’ll look at it next week.
I may have played a little too much with labels and images.
Checking before what getToken(1).image returns.
And I believe you need an Identifier() after the LOOKAHEAD.
Le mer. 18 juin 2025 à 10:02, manticore-projects ***@***.***>
a écrit :
… LOOKAHEAD( { "EMPTY_BLOB".equalsIgnoreCase(getToken(1).image)
Makes sense, but does not work with current JavaCC-8.
Please see javacc/javacc#307 (comment)
<javacc/javacc#307 (comment)>
—
Reply to this email directly, view it on GitHub
<#2161 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFQZRC4UATCHKPHBZHI6A4D3EEMKDAVCNFSM6AAAAABW2GOQPOVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTGNJQGU3TINA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
|
@MarcMazas: Thank you! We can continue this discussion here: javacc/javacc#307 (comment) |
Hi.
We advice you to take some time checking that JavaCC 8 solves your issue without functional & performance regressions.
I cloned https://github.com/ssteinhauser/JSqlParser/tree/feature/exasol-import-export, modified pom.xml: