| 1 |
_baseclassheader: |
| 2 |
BASECLASSHEADER |
| 3 |
{ |
| 4 |
d_expect = "scanner base class header file name"; |
| 5 |
} |
| 6 |
; |
| 7 |
|
| 8 |
_baseclasspreinclude: |
| 9 |
BASECLASSPREINCLUDE |
| 10 |
{ |
| 11 |
d_expect = "base class preinclude file name"; |
| 12 |
} |
| 13 |
; |
| 14 |
|
| 15 |
_classheader: |
| 16 |
CLASSHEADER |
| 17 |
{ |
| 18 |
d_expect = "scanner class header file name"; |
| 19 |
} |
| 20 |
; |
| 21 |
|
| 22 |
_classname: |
| 23 |
CLASSNAME |
| 24 |
{ |
| 25 |
d_expect = "class name"; |
| 26 |
} |
| 27 |
; |
| 28 |
|
| 29 |
_filenames: |
| 30 |
FILENAMES |
| 31 |
{ |
| 32 |
d_expect = "generic filenames specification"; |
| 33 |
} |
| 34 |
; |
| 35 |
|
| 36 |
_implementationheader: |
| 37 |
IMPLEMENTATIONHEADER |
| 38 |
{ |
| 39 |
d_expect = "implementation header file name"; |
| 40 |
} |
| 41 |
; |
| 42 |
|
| 43 |
_inputinline: |
| 44 |
INPUTINLINE |
| 45 |
{ |
| 46 |
d_expect = "name of the file holding Input's inline implementations"; |
| 47 |
} |
| 48 |
; |
| 49 |
|
| 50 |
_inputinterface: |
| 51 |
INPUTINTERFACE |
| 52 |
{ |
| 53 |
d_expect = "name of the file holding Input's interface"; |
| 54 |
} |
| 55 |
; |
| 56 |
|
| 57 |
_inputimplementation: |
| 58 |
INPUTIMPLEMENTATION |
| 59 |
{ |
| 60 |
d_expect = "name of the file holding Input's implementations"; |
| 61 |
} |
| 62 |
; |
| 63 |
|
| 64 |
_lexfunctionname: |
| 65 |
LEXFUNCTIONNAME |
| 66 |
{ |
| 67 |
d_expect = "name of the lex() function"; |
| 68 |
} |
| 69 |
; |
| 70 |
|
| 71 |
_lexsource: |
| 72 |
LEXSOURCE |
| 73 |
{ |
| 74 |
d_expect = "source file name of the lex function"; |
| 75 |
} |
| 76 |
; |
| 77 |
|
| 78 |
_namespace: |
| 79 |
NAMESPACE |
| 80 |
{ |
| 81 |
d_expect = "name of the namespace to use"; |
| 82 |
} |
| 83 |
; |
| 84 |
|
| 85 |
_skeleton_directory: |
| 86 |
SKELETON_DIRECTORY |
| 87 |
{ |
| 88 |
d_expect = "directory name of the flexc++ skeleton files"; |
| 89 |
} |
| 90 |
; |
| 91 |
|
| 92 |
_startcondition_name: |
| 93 |
STARTCONDITION |
| 94 |
{ |
| 95 |
d_expect = "start-condition enum name"; |
| 96 |
} |
| 97 |
; |
| 98 |
|
| 99 |
_target_directory: |
| 100 |
TARGET_DIRECTORY |
| 101 |
{ |
| 102 |
d_expect = "target directory name for generated files"; |
| 103 |
} |
| 104 |
; |
| 105 |
|
| 106 |
_token_path: |
| 107 |
TOKEN_PATH |
| 108 |
{ |
| 109 |
d_expect = "tokens header path name"; |
| 110 |
} |
| 111 |
; |
| 112 |
|
| 113 |
_stringOrIdent: |
| 114 |
STRING |
| 115 |
{ |
| 116 |
$$ = TextType::STRING; |
| 117 |
} |
| 118 |
| |
| 119 |
IDENTIFIER |
| 120 |
{ |
| 121 |
$$ = TextType::IDENT; |
| 122 |
} |
| 123 |
| |
| 124 |
RAWSTRING |
| 125 |
{ |
| 126 |
$$ = rawString(); |
| 127 |
} |
| 128 |
; |
| 129 |
|
| 130 |
_opt_is: |
| 131 |
// empty |
| 132 |
| |
| 133 |
'=' |
| 134 |
; |
| 135 |
|
| 136 |
option: |
| 137 |
_inputinterface _opt_is _stringOrIdent |
| 138 |
{ |
| 139 |
d_options.setInputInterfacePath($3); |
| 140 |
} |
| 141 |
| |
| 142 |
_inputimplementation _opt_is _stringOrIdent |
| 143 |
{ |
| 144 |
d_options.setInputImplementationPath($3); |
| 145 |
} |
| 146 |
| |
| 147 |
_inputinline _opt_is _stringOrIdent |
| 148 |
{ |
| 149 |
d_options.setInputInlinePath($3); |
| 150 |
} |
| 151 |
| |
| 152 |
_classname _opt_is _stringOrIdent |
| 153 |
{ |
| 154 |
d_options.setClassName($3); |
| 155 |
} |
| 156 |
| |
| 157 |
_filenames _opt_is _stringOrIdent |
| 158 |
{ |
| 159 |
d_options.setFilenames($3); |
| 160 |
} |
| 161 |
| |
| 162 |
_lexfunctionname _opt_is _stringOrIdent |
| 163 |
{ |
| 164 |
d_options.setLexFunctionName($3); |
| 165 |
} |
| 166 |
| |
| 167 |
_baseclassheader _opt_is _stringOrIdent |
| 168 |
{ |
| 169 |
d_options.setBaseClassHeader($3); |
| 170 |
} |
| 171 |
| |
| 172 |
_baseclasspreinclude _opt_is _stringOrIdent |
| 173 |
{ |
| 174 |
d_options.setBaseClassPreinclude($3); |
| 175 |
} |
| 176 |
| |
| 177 |
_classheader _opt_is _stringOrIdent |
| 178 |
{ |
| 179 |
d_options.setClassHeader($3); |
| 180 |
} |
| 181 |
| |
| 182 |
_implementationheader _opt_is _stringOrIdent |
| 183 |
{ |
| 184 |
d_options.setImplementationHeader($3); |
| 185 |
} |
| 186 |
| |
| 187 |
_lexsource _opt_is _stringOrIdent |
| 188 |
{ |
| 189 |
d_options.setLexSource($3); |
| 190 |
} |
| 191 |
| |
| 192 |
_skeleton_directory _opt_is _stringOrIdent |
| 193 |
{ |
| 194 |
d_options.setSkeletonDirectory($3); |
| 195 |
} |
| 196 |
| |
| 197 |
_startcondition_name _opt_is _stringOrIdent |
| 198 |
{ |
| 199 |
d_options.setStartConditionName($3); |
| 200 |
} |
| 201 |
| |
| 202 |
_target_directory _opt_is _stringOrIdent |
| 203 |
{ |
| 204 |
d_options.setTargetDirectory($3); |
| 205 |
} |
| 206 |
| |
| 207 |
_token_path _opt_is _stringOrIdent |
| 208 |
{ |
| 209 |
d_options.setTokenPath($3); |
| 210 |
} |
| 211 |
| |
| 212 |
_namespace _opt_is _stringOrIdent |
| 213 |
{ |
| 214 |
d_options.setNameSpace($3); |
| 215 |
} |
| 216 |
| |
| 217 |
CASEINSENSITIVE |
| 218 |
{ |
| 219 |
d_options.setCaseInsensitive(); |
| 220 |
} |
| 221 |
| |
| 222 |
INTERACTIVE |
| 223 |
{ |
| 224 |
d_options.setInteractive(); |
| 225 |
} |
| 226 |
| |
| 227 |
PRINT |
| 228 |
{ |
| 229 |
d_options.setPrint(); |
| 230 |
} |
| 231 |
| |
| 232 |
NOLINES |
| 233 |
{ |
| 234 |
d_options.setLines(false); |
| 235 |
} |
| 236 |
| |
| 237 |
DEBUG |
| 238 |
{ |
| 239 |
d_options.setDebug(); |
| 240 |
} |
| 241 |
; |
| 242 |
|