_baseclassheader:
    BASECLASSHEADER
    {
        d_expect = "scanner base class header file name";
    }
;

_baseclasspreinclude:
    BASECLASSPREINCLUDE
    {
        d_expect = "base class preinclude file name";
    }
;

_classheader:
    CLASSHEADER
    {
        d_expect = "scanner class header file name";
    }
;

_classname:
    CLASSNAME
    {
        d_expect = "class name";
    }
;

_filenames:
    FILENAMES
    {
        d_expect = "generic filenames specification";
    }
;

_implementationheader:
    IMPLEMENTATIONHEADER
    {
        d_expect = "implementation header file name";
    }
;

_inputinline:
    INPUTINLINE
    {
        d_expect = "name of the file holding Input's inline implementations";
    }
;

_inputinterface:
    INPUTINTERFACE
    {
        d_expect = "name of the file holding Input's interface";
    }
;

_inputimplementation:
    INPUTIMPLEMENTATION
    {
        d_expect = "name of the file holding Input's implementations";
    }
;

_lexfunctionname:
    LEXFUNCTIONNAME
    {
        d_expect = "name of the lex() function";
    }
;

_lexsource:
    LEXSOURCE
    {
        d_expect = "source file name of the lex function";
    }
;

_namespace:
    NAMESPACE
    {
        d_expect = "name of the namespace to use";
    }
;

_skeleton_directory:
    SKELETON_DIRECTORY
    {
        d_expect = "directory name of the flexc++ skeleton files";
    }
;

_startcondition_name:
    STARTCONDITION
    {
        d_expect = "start-condition enum name";
    }
;

_target_directory:
    TARGET_DIRECTORY
    {
        d_expect = "target directory name for generated files";
    }
;

_stringOrIdent:
    STRING
    {
        $$ = TextType::STRING;
    }
|
    IDENTIFIER
    {
        $$ = TextType::IDENT;
    }
|
    RAWSTRING
    {
        $$ = rawString();
    }
;

_opt_is:
    // empty
|
    '='
;

option:
    _inputinterface _opt_is _stringOrIdent
    {
        d_options.setInputInterfacePath($3);
    }
|
    _inputimplementation _opt_is _stringOrIdent
    {
        d_options.setInputImplementationPath($3);
    }
|
    _inputinline _opt_is _stringOrIdent
    {
        d_options.setInputInlinePath($3);
    }
|
    _classname _opt_is _stringOrIdent
    {
        d_options.setClassName($3);
    }
|
    _filenames _opt_is _stringOrIdent
    {
        d_options.setFilenames($3);
    }
|
    _lexfunctionname _opt_is _stringOrIdent
    {
        d_options.setLexFunctionName($3);
    }
|
    _baseclassheader _opt_is _stringOrIdent
    {
        d_options.setBaseClassHeader($3);
    }
|
    _baseclasspreinclude _opt_is _stringOrIdent
    {
        d_options.setBaseClassPreinclude($3);
    }
|
    _classheader _opt_is _stringOrIdent
    {
        d_options.setClassHeader($3);
    }
|
    _implementationheader _opt_is _stringOrIdent
    {
        d_options.setImplementationHeader($3);
    }
|
    _lexsource _opt_is _stringOrIdent
    {
        d_options.setLexSource($3);
    }
|
    _skeleton_directory _opt_is _stringOrIdent
    {
        d_options.setSkeletonDirectory($3);
    }
|
    _startcondition_name _opt_is _stringOrIdent
    {
        d_options.setStartConditionName($3);
    }
|
    _target_directory _opt_is _stringOrIdent
    {
        d_options.setTargetDirectory($3);
    }
|
    _namespace _opt_is _stringOrIdent
    {
        d_options.setNameSpace($3);
    }
|
    CASEINSENSITIVE
    {
        d_options.setCaseInsensitive();
    }
|
    INTERACTIVE
    {
        d_options.setInteractive();
    }
|
    PRINT
    {
        d_options.setPrint();
    }
|
    NOLINES
    {
        d_options.setLines(false);
    }
|
    DEBUG
    {
        d_options.setDebug();
    }
;

