KDevelop-PG-Qt lexer-branch merged into master

Hi folks!

I have finally merged my private lexer-branch of KDevelop-PG-Qt into the master-branch and pushed it to git.kde.org – after having run KDevelop-php-plugin unit-tests ;). Well, what are the changes?

  • Now there is support for lexer-generation, including unicode-support (UTF-8, UCS-2, UTF-16, UTF-32/UCS-4). I have talked about those features in some previous blog-posts.
  • You do not have to use “;;” any longer, just “;” will work, but for compatibility “;;” will be like a single semicolon.
  • Fixed a very old overflow when reading the grammar from an input-stream
  • With –error-aware-code (the default) error-messages will now work correctly, when you are compiling the generated file and there is an error in your hand-written code, you will get correct references to the corresponding line in the grammar-file, unfortunately kdev-pg-qt’s error-messages are still not perfect (wrong column-numbers etc.).
  • Added some command line options, marginal changes in their behaviour
  • Changed some messages (spelling etc.)

Maybe, some day, there will be KDev-PG-Qt 1.0 (currently it is called 0.9.5 ;)), so, what is still to do?

  • Make it possible to control what should happen when the lexer fails (it should not just be exit(-1))
  • Update the documentation at Techbase
  • Update the Kate-syntax-file
  • Decide which additional unicode-character classes are useful, add some aliases
  • Make new command-line-options available in the CMake-macro
  • Find out, how to enable C++0x support in CMake allowing different compilers (yes, I am using variadic templates ;))
  • Tokens should no longer be declared inside the parser-class (of course it should still be possible for compatibility)
  • Forward-declarations for AST-classes
  • Integration with QIODevice/KIO (optional)
  • Dumping automata (optional)

Of course there could be more nice stuff, but that would not be related to the recent changes, e.g. LL(k)/LL(*)-parsing, look-ahead, possibility to switch rules off, packed AST-nodes, making it usable as a library etc.

I hope there are really no regressions, and the changes will be useful for the small elite of KDevelop-PG-Qt users. ;)

5 Responses to “KDevelop-PG-Qt lexer-branch merged into master”

  1. krop Says:

    missing file ? CMake complains about unidata.qrc:

    – Found automoc4: /usr/bin/automoc4
    CMake Error at /usr/share/kde4/apps/cmake/modules/Qt4Macros.cmake:187 (FILE):
    file Internal CMake error when trying to open file:
    /kde/src/kdevelop/kdevelop-pg-qt/unidata.qrc for reading.
    Call Stack (most recent call first):
    kdev-pg/CMakeLists.txt:9 (QT4_ADD_RESOURCES)

  2. The User Says:

    Thank you very much, how could I forget that… Added it.

  3. krop Says:

    Thanks. Maybe you have a suggestion for the build error seen with the new snapshot:

    https://build.opensuse.org/package/rawlog?arch=x86_64&package=kdevelop4-pg-qt&project=KDE%3AUnstable%3APlayground&repository=openSUSE_11.2_KDE_Unstable_SC

  4. The User Says:

    Which gcc-version are you using? I tried to compile kdev-pg-regexp.cpp with the same flags, also x86_64, and it worked.

  5. The User Says:

    Okay, we discussed it in IRC and fixed it, gcc 4.4.1 does not like certain kinds of static-template-member-initializations (TableCharSet::nullData).

Leave a Reply

XHTML: Use <blockquote cite="name"> for quotations, <pre lang="text    ∨ cpp-qt ∨ cpp ∨ bash ∨ other language"> for code, [latex] for formulas and <em> for em. Contact me if the comment does not get published, it may have accidentally been marked as spam.

Anti-Spam Quiz: