Creating Language Plugin not used for new language

Roland Plüss roland at rptd.ch
Tue Jul 17 18:11:13 BST 2018


Have been too happy too early. This Lexer generator is driving me
insane. It's claiming to use RegEx but it's not (what goes for [ ]
notation) which results in KDevelop constantly crashing left and right.
Culprit is a rather unhealty line of code generated:

    switch(lstate)
    {
    case 0:
        goto _fail; // no warning about unused label
_fail:
        {
            qDebug() << "error";
            exit(-1);
            lxFINISH
        }

... exit(-1) !!!

Whenever the generated lexer doesn't like one character in the parsed
file it right out kills the parent KDevelop instance without any warning!

You need to fix this as soon as possible since this could be the cause
for so many unexplainable kdevelop crashings.


On 07/16/2018 07:43 PM, Friedrich W. H. Kossebau wrote:
> Am Montag, 16. Juli 2018, 19:27:21 CEST schrieb Roland Plüss:
>> So I take it then this is not supposed to be the usual way to do the
>> parser? From the look of it I though this is how it should be.
> "this" = using kdevelop-pg-qt? If so, then I think there is no "usual way", 
> situation depends on the infrastructure provided around a language.
>
> If there are already parsers providing access to the AST/symbols tables/etc, 
> and which can be ideally interfaced from C++, then one would try to use those.
>
> If not, then one has to write their custom parser, and kdevelop-pg-qt is one 
> offer to that approach, with the feature of meshing Qt types into the game, 
> for those who prefer them.
>
> KDevelop infrastructure itself is parser-tool-agnostic. The DUChain API to 
> serve/implement takes generic data here.
>
> But again. this is not my domain, already between knowledge and best guess, 
> just replying another time to not appear ignoring you :)
>
>> Anyways I figured out the problem. 
> Cool. BTW, are you subscribed to the kdevelop-devel ml? If so, no need to cc: 
> me. If not, please do subscribe, as you might miss out other replies send 
> without cc:ing you.
>
> Cheers
> Friedrich
>
>
>
>


-- 
Mit freundlichen Grüssen
Plüss Roland

Leader und Head Programmer
- Game: Epsylon ( http://www.indiedb.com/games/epsylon )
- Game Engine: Drag[en]gine ( http://www.indiedb.com/engines/dragengine
, http://dragengine.rptd.ch/wiki )
- Sowie verschiedene Blender Export-Skripts und Game-Tools

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: OpenPGP digital signature
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180717/55d710c2/attachment.sig>


More information about the KDevelop-devel mailing list