Topic
1 reply Latest Post - ‏2011-05-03T12:44:45Z by SystemAdmin
Pierre.Bentkowski
Pierre.Bentkowski
1 Post
ACCEPTED ANSWER

Pinned topic Parser configuration - keyword with space

‏2009-02-23T16:31:03Z |
Hello

We want to build a Dialect for Qt

I one case there is an ACCESS_SPECIFIER: public slots

ex:
class ABox : public QWidget
{
// Q_OBJECT;
public slots:
void Print(QString msg);
};

What is the syntax to identify "public slots" as a ACCESS_SPECIFIER
The following did not work
%ACCESS_SPECIFIER : public slots ;

Regards
Updated on 2011-05-03T12:44:45Z at 2011-05-03T12:44:45Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    4 Posts
    ACCEPTED ANSWER

    Re: Parser configuration - keyword with space

    ‏2011-05-03T12:44:45Z  in response to Pierre.Bentkowski
    Hi,

    This is probably far too late for you Pierre, but in case anyone else is interested this works:

    %ACCESS_SPECIFIER : public ;
    %COMMENT_MACRO : slots ;

    The 1st line is usually already included. Basically the 2nd line says to treat "slots" as a comment. The "public" will still be recognized as an access specifier and will introduce the following declarations.

    Regards,
    Brigitte