%filenames parser

%scanner ../scanner/scanner.h

%baseclass-preinclude preheaders.h

%token  BASECLASS_HEADER BASECLASS_PREINCLUDE BLOCK CLASS_HEADER CLASS_NAME
        DEBUGFLAG ERROR_VERBOSE EXPECT FILENAMES IDENTIFIER
        IMPLEMENTATION_HEADER LEFT LINES LOCATIONSTRUCT LSP_NEEDED
        LTYPE NAMESPACE NEG_DOLLAR NONASSOC NUMBER PARSEFUN_SOURCE PREC PRINT 
        PSTRING QUOTE REQUIRED RIGHT SCANNER_INCLUDE SCANNER_TOKEN_FUNCTION
        START STRING STYPE TOKEN TWO_PERCENTS TYPE UNION XSTRING

%union
{
    std::string                *sp;
    FBB::PTag                  *tag;
    int                         type;
    bool                        logic;
};

%type <sp>      identifier_a
%type <tag>     productionElement productionElements
%type <type>    d_pxstring d_pushPrecedence p_precSpec 
%type <logic>   optNumber

%%

input:
    directives
    two_percents
    rules
    optTwo_percents
;

two_percents:
    TWO_PERCENTS
    {
        expectRules();
    }
;

%include spec/messages
%include spec/precedence
%include spec/optrules

%include spec/directives
%include spec/symbols

%include spec/rules
%include spec/productionlist

%include spec/auxiliary
