From e6697edb52cbb949432a07fa87f41c61a9a6f40e Mon Sep 17 00:00:00 2001 From: Mark Olesen <Mark.Olesen@esi-group.com> Date: Fri, 19 Nov 2021 12:06:32 +0100 Subject: [PATCH] ENH: robuster lemon parsing - previously simply reused the scan token, which works fine for non-nested tokenizations but becomes too fragile with nesting. Now changed to use tagged unions that can be copied about and still retain some rudimentary knowledge of their types, which can be manually triggered with a destroy() call. - provide an 'identifier' non-terminal as an additional catch to avoid potential leakage on parsing failure. - adjust lemon rules and infrastructure: - use %token to predefine standard tokens. Will reduce some noise on the generated headers by retaining the order on the initial token names. - Define BIT_NOT, internal token rename NOT -> LNOT - handle non-terminal vector values. Support vector::x, vector::y and vector::z constants - permit fieldExpr access to time(). Probably not usable or useful for an '#eval' expression, but useful for a Function1. - provisioning for hooks into function calls. Establishes token names for next commit(s). --- .../test/exprTraits/Test-exprTraits.C | 29 + src/OpenFOAM/Make/files | 1 + .../expressions/fields/fieldExprFwd.H | 3 +- .../expressions/fields/fieldExprLemonParser.h | 192 +- .../fields/fieldExprLemonParser.lyy-m4 | 90 +- .../expressions/fields/fieldExprParser.H | 11 +- .../expressions/fields/fieldExprScanner.H | 24 +- .../expressions/fields/fieldExprScanner.cc | 2901 +++++++------ .../expressions/fields/fieldExprScanner.rl | 121 +- .../expressions/scanToken/exprScanToken.C | 92 + .../expressions/scanToken/exprScanToken.H | 116 + .../include/m4/bison/named-characters.m4 | 3 +- src/OpenFOAM/include/m4/lemon/base-setup.m4 | 19 +- .../include/m4/lemon/operator-precedence.m4 | 45 +- .../include/m4/lemon/parser-methods.m4 | 3 +- .../include/m4/lemon/rules-components.m4 | 3 +- .../m4/lemon/rules-fields-components.m4 | 3 +- src/OpenFOAM/include/m4/lemon/rules-fields.m4 | 35 +- .../include/m4/lemon/rules-functions.m4 | 3 +- .../include/m4/lemon/rules-operations.m4 | 3 +- .../include/m4/lemon/rules-scalar-logic.m4 | 5 +- .../include/m4/lemon/rules-standard.m4 | 3 +- .../expressions/patch/patchExprFwd.H | 1 - .../expressions/patch/patchExprLemonParser.h | 240 +- .../patch/patchExprLemonParser.lyy-m4 | 128 +- .../patch/patchExprLemonParserMacros.m4 | 21 + .../expressions/patch/patchExprParser.H | 10 +- .../expressions/patch/patchExprScanner.H | 25 +- .../expressions/patch/patchExprScanner.cc | 3660 +++++++++-------- .../expressions/patch/patchExprScanner.rl | 170 +- .../expressions/volume/volumeExprFwd.H | 1 - .../volume/volumeExprLemonParser.h | 247 +- .../volume/volumeExprLemonParser.lyy-m4 | 162 +- .../volume/volumeExprLemonParserMacros.m4 | 30 +- .../expressions/volume/volumeExprParser.H | 10 +- .../expressions/volume/volumeExprScanner.H | 25 +- .../expressions/volume/volumeExprScanner.cc | 3208 ++++++++------- .../expressions/volume/volumeExprScanner.rl | 182 +- 38 files changed, 6416 insertions(+), 5409 deletions(-) create mode 100644 src/OpenFOAM/expressions/scanToken/exprScanToken.C create mode 100644 src/OpenFOAM/expressions/scanToken/exprScanToken.H diff --git a/applications/test/exprTraits/Test-exprTraits.C b/applications/test/exprTraits/Test-exprTraits.C index 3dee3b436ff..f6a835871d4 100644 --- a/applications/test/exprTraits/Test-exprTraits.C +++ b/applications/test/exprTraits/Test-exprTraits.C @@ -21,6 +21,7 @@ Description #include "uLabel.H" #include "error.H" #include "stringList.H" +#include "exprScanToken.H" using namespace Foam; @@ -71,6 +72,34 @@ int main() << getName(expressions::valueTypeCode::type_bool) << nl; + { + expressions::scanToken tok; + expressions::scanToken tok2; + + Info<< nl << "sizeof(scanToken): " + << sizeof(tok) << nl; + + Info<< " type:" << int(tok.type_) << nl; + Info<< " ptr:" << Foam::name(tok.name_) << nl; + + Info<< " type:" << int(tok2.type_) << nl; + Info<< " ptr:" << Foam::name(tok2.name_) << nl; + + tok.setWord("hello"); + + Info<< " type:" << int(tok.type_) << nl; + Info<< " ptr:" << Foam::name(tok.name_) << nl; + + tok2 = tok; + Info<< " type:" << int(tok2.type_) << nl; + Info<< " ptr:" << Foam::name(tok2.name_) << nl; + + tok2.destroy(); + + Info<< " type:" << int(tok2.type_) << nl; + Info<< " ptr:" << Foam::name(tok2.name_) << nl; + } + Info<< nl << "Done" << nl; return 0; } diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 47a7a41a0d2..d1ee7b2c622 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -162,6 +162,7 @@ $(expr)/exprResult/exprResultStored.C $(expr)/exprResult/exprResultStoredStack.C $(expr)/exprString/exprString.C $(expr)/exprTools/exprTools.C +$(expr)/scanToken/exprScanToken.C $(expr)/traits/exprTraits.C diff --git a/src/OpenFOAM/expressions/fields/fieldExprFwd.H b/src/OpenFOAM/expressions/fields/fieldExprFwd.H index b5fe79b2066..1cc5be18395 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprFwd.H +++ b/src/OpenFOAM/expressions/fields/fieldExprFwd.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -47,7 +47,6 @@ namespace fieldExpr class parser; class scanner; class parseDriver; -union scanToken; //- Static debugging option extern int debug; diff --git a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.h b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.h index 3624697ee51..f992c695525 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.h +++ b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.h @@ -1,93 +1,99 @@ -#define TOK_QUESTION 1 -#define TOK_COLON 2 -#define TOK_LOR 3 -#define TOK_LAND 4 -#define TOK_BIT_XOR 5 -#define TOK_BIT_AND 6 -#define TOK_EQUAL 7 -#define TOK_NOT_EQUAL 8 -#define TOK_LESS_EQ 9 -#define TOK_GREATER_EQ 10 -#define TOK_LESS 11 -#define TOK_GREATER 12 -#define TOK_PLUS 13 -#define TOK_MINUS 14 -#define TOK_TIMES 15 -#define TOK_DIVIDE 16 -#define TOK_PERCENT 17 -#define TOK_NEGATE 18 -#define TOK_NOT 19 -#define TOK_DOT 20 -#define TOK_NUMBER 21 -#define TOK_ZERO 22 -#define TOK_PI 23 -#define TOK_LPAREN 24 -#define TOK_RPAREN 25 -#define TOK_DEG_TO_RAD 26 -#define TOK_RAD_TO_DEG 27 -#define TOK_ARG 28 -#define TOK_TIME 29 -#define TOK_DELTA_T 30 -#define TOK_SCALAR_ID 31 -#define TOK_MIN 32 -#define TOK_COMMA 33 -#define TOK_MAX 34 -#define TOK_SUM 35 -#define TOK_AVERAGE 36 -#define TOK_EXP 37 -#define TOK_LOG 38 -#define TOK_LOG10 39 -#define TOK_SQR 40 -#define TOK_SQRT 41 -#define TOK_CBRT 42 -#define TOK_SIN 43 -#define TOK_COS 44 -#define TOK_TAN 45 -#define TOK_ASIN 46 -#define TOK_ACOS 47 -#define TOK_ATAN 48 -#define TOK_SINH 49 -#define TOK_COSH 50 -#define TOK_TANH 51 -#define TOK_POW 52 -#define TOK_ATAN2 53 -#define TOK_POS 54 -#define TOK_NEG 55 -#define TOK_POS0 56 -#define TOK_NEG0 57 -#define TOK_SIGN 58 -#define TOK_FLOOR 59 -#define TOK_CEIL 60 -#define TOK_ROUND 61 -#define TOK_HYPOT 62 -#define TOK_RAND 63 -#define TOK_VECTOR_ID 64 -#define TOK_SPH_TENSOR_ID 65 -#define TOK_SYM_TENSOR_ID 66 -#define TOK_IDENTITY_TENSOR 67 -#define TOK_TENSOR_ID 68 -#define TOK_LTRUE 69 -#define TOK_LFALSE 70 -#define TOK_BOOL 71 -#define TOK_BOOL_ID 72 -#define TOK_MAG 73 -#define TOK_MAGSQR 74 -#define TOK_VECTOR 75 -#define TOK_TENSOR 76 -#define TOK_SYM_TENSOR 77 -#define TOK_SPH_TENSOR 78 -#define TOK_CMPT_X 79 -#define TOK_CMPT_Y 80 -#define TOK_CMPT_Z 81 -#define TOK_CMPT_XX 82 -#define TOK_CMPT_XY 83 -#define TOK_CMPT_XZ 84 -#define TOK_CMPT_YX 85 -#define TOK_CMPT_YY 86 -#define TOK_CMPT_YZ 87 -#define TOK_CMPT_ZX 88 -#define TOK_CMPT_ZY 89 -#define TOK_CMPT_ZZ 90 -#define TOK_CMPT_II 91 -#define TOK_TRANSPOSE 92 -#define TOK_DIAG 93 +#define TOK_LPAREN 1 +#define TOK_RPAREN 2 +#define TOK_COMMA 3 +#define TOK_QUESTION 4 +#define TOK_COLON 5 +#define TOK_LOR 6 +#define TOK_LAND 7 +#define TOK_LNOT 8 +#define TOK_BIT_OR 9 +#define TOK_BIT_XOR 10 +#define TOK_BIT_AND 11 +#define TOK_BIT_NOT 12 +#define TOK_EQUAL 13 +#define TOK_NOT_EQUAL 14 +#define TOK_LESS 15 +#define TOK_LESS_EQ 16 +#define TOK_GREATER 17 +#define TOK_GREATER_EQ 18 +#define TOK_PLUS 19 +#define TOK_MINUS 20 +#define TOK_TIMES 21 +#define TOK_DIVIDE 22 +#define TOK_PERCENT 23 +#define TOK_NEGATE 24 +#define TOK_DOT 25 +#define TOK_BOOL 26 +#define TOK_LTRUE 27 +#define TOK_LFALSE 28 +#define TOK_NUMBER 29 +#define TOK_ZERO 30 +#define TOK_IDENTIFIER 31 +#define TOK_PI 32 +#define TOK_DEG_TO_RAD 33 +#define TOK_RAD_TO_DEG 34 +#define TOK_ARG 35 +#define TOK_TIME 36 +#define TOK_DELTA_T 37 +#define TOK_SCALAR_FUNCTION_ID 38 +#define TOK_VECTOR_VALUE 39 +#define TOK_VECTOR_FUNCTION_ID 40 +#define TOK_SCALAR_ID 41 +#define TOK_MIN 42 +#define TOK_MAX 43 +#define TOK_SUM 44 +#define TOK_AVERAGE 45 +#define TOK_EXP 46 +#define TOK_LOG 47 +#define TOK_LOG10 48 +#define TOK_SQR 49 +#define TOK_SQRT 50 +#define TOK_CBRT 51 +#define TOK_SIN 52 +#define TOK_COS 53 +#define TOK_TAN 54 +#define TOK_ASIN 55 +#define TOK_ACOS 56 +#define TOK_ATAN 57 +#define TOK_SINH 58 +#define TOK_COSH 59 +#define TOK_TANH 60 +#define TOK_POW 61 +#define TOK_ATAN2 62 +#define TOK_POS 63 +#define TOK_NEG 64 +#define TOK_POS0 65 +#define TOK_NEG0 66 +#define TOK_SIGN 67 +#define TOK_FLOOR 68 +#define TOK_CEIL 69 +#define TOK_ROUND 70 +#define TOK_HYPOT 71 +#define TOK_RAND 72 +#define TOK_VECTOR_ID 73 +#define TOK_SPH_TENSOR_ID 74 +#define TOK_SYM_TENSOR_ID 75 +#define TOK_IDENTITY_TENSOR 76 +#define TOK_TENSOR_ID 77 +#define TOK_BOOL_ID 78 +#define TOK_MAG 79 +#define TOK_MAGSQR 80 +#define TOK_VECTOR 81 +#define TOK_TENSOR 82 +#define TOK_SYM_TENSOR 83 +#define TOK_SPH_TENSOR 84 +#define TOK_CMPT_X 85 +#define TOK_CMPT_Y 86 +#define TOK_CMPT_Z 87 +#define TOK_CMPT_XX 88 +#define TOK_CMPT_XY 89 +#define TOK_CMPT_XZ 90 +#define TOK_CMPT_YX 91 +#define TOK_CMPT_YY 92 +#define TOK_CMPT_YZ 93 +#define TOK_CMPT_ZX 94 +#define TOK_CMPT_ZY 95 +#define TOK_CMPT_ZZ 96 +#define TOK_CMPT_II 97 +#define TOK_TRANSPOSE 98 +#define TOK_DIAG 99 diff --git a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 index a7797b50edc..b29f09dac0c 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 +++ b/src/OpenFOAM/expressions/fields/fieldExprLemonParser.lyy-m4 @@ -98,6 +98,7 @@ TBD */ %include { +#include "exprScanToken.H" #include "fieldExprDriver.H" #include "fieldExprParser.H" #include "fieldExprScanner.H" @@ -131,11 +132,8 @@ tmp_management() %token_prefix TOK_ // Terminals -%token_type {Foam::expressions::fieldExpr::scanToken*} -// Non-terminals -%type ivalue { Foam::label } -%type svalue { Foam::scalar } -%type ident { Foam::word* } +%token_type {Foam::expressions::scanToken} +%token_destructor { ($$).destroy(); } // Fields declare_field(lfield, Foam::boolField, bool, newField, getField) @@ -150,6 +148,7 @@ declare_field(tfield, Foam::tensorField, Foam::tensor, newField, getField) // Lemon does not generate a destructor for that. // So do not use Lemon destructors for anything. +standard_tokens() operator_precedence() %start_symbol evaluate @@ -160,7 +159,10 @@ operator_precedence() * Productions (scalar) \*---------------------------------------------------------------------------*/ -svalue (lhs) ::= NUMBER (a) . { lhs = (a)->svalue; } // From scanToken +%type svalue { Foam::scalar } + +svalue (lhs) ::= NUMBER (tok) . { lhs = (tok).scalarValue; } // scanToken + svalue (lhs) ::= ZERO . { lhs = Foam::Zero; } svalue (lhs) ::= PI LPAREN RPAREN . { lhs = Foam::constant::mathematical::pi; } svalue (lhs) ::= DEG_TO_RAD LPAREN RPAREN . { lhs = Foam::degToRad(); } @@ -169,6 +171,32 @@ svalue (lhs) ::= ARG LPAREN RPAREN . { lhs = driver->argValue(); } svalue (lhs) ::= TIME LPAREN RPAREN . { lhs = driver->timeValue(); } svalue (lhs) ::= DELTA_T LPAREN RPAREN . { lhs = driver->deltaT(); } +svalue (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = 0; +} + + +/*---------------------------------------------------------------------------*\ + * Productions (vector) +\*---------------------------------------------------------------------------*/ + +%type vvalue { Foam::vector* } +%destructor vvalue { delete($$); $$ = nullptr; } + +vvalue (lhs) ::= VECTOR_VALUE (tok) . +{ + // Take ownership of pointer from scan token + lhs = tok.vectorPtr; tok.vectorPtr = nullptr; +} + +vvalue (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = new Foam::vector(0,0,0); +} + /* * * * * * * * * * * * * * * * * * Fields * * * * * * * * * * * * * * * * *\ dnl @@ -184,7 +212,9 @@ dnl /*---------------------------------------------------------------------------*\ * Productions (scalarField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [sfield])dnl +define([_new_target_], [_new_sfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -200,9 +230,9 @@ rules_scalar_operations() rules_scalar_functions() // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but works directly for scalarField rule_binary_func(_target_, _target_, _target_, HYPOT, Foam::hypot) @@ -217,20 +247,30 @@ _target_ (lhs) ::= RAND LPAREN RPAREN. _target_ (lhs) ::= RAND LPAREN NUMBER (seed) RPAREN. { - lhs = driver->field_rand(std::round((seed)->svalue)).ptr(); + lhs = driver->field_rand(std::round((seed).scalarValue)).ptr(); +} + +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); } /*---------------------------------------------------------------------------*\ * Productions (vectorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [vfield])dnl +define([_new_target_], [_new_vfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a); } +rule_field_from_value(_target_, vvalue) rule_get_field(_target_, VECTOR_ID) rules_standard(_target_, _value_type_, _logic_) @@ -238,11 +278,22 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +// Other functions + +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (sphericalTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [hfield])dnl +define([_new_target_], [_new_hfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -260,7 +311,9 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (symmTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [yfield])dnl +define([_new_target_], [_new_yfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -278,7 +331,9 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (tensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [tfield])dnl +define([_new_target_], [_new_tfield])dnl define([_value_type_], [Foam::tensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -300,6 +355,7 @@ rules_tensor_functions() * Logic field productions (boolField) dnl define([_target_], [lfield])dnl +define([_new_target_], [_new_lfield])dnl define([_value_type_], [bool])dnl dnl \*---------------------------------------------------------------------------*/ @@ -393,13 +449,15 @@ void Foam::expressions::fieldExpr::parser::start(parseDriver& driver_) } -void Foam::expressions::fieldExpr::parser::parse -( - int tokenId, - scanToken* tokenVal -) +void Foam::expressions::fieldExpr::parser::parse(int tokenId) +{ + Parse(lemon_, tokenId, scanToken::null()); +} + + +void Foam::expressions::fieldExpr::parser::parse(int tokenId, scanToken tok) { - Parse(lemon_, tokenId, tokenVal); + Parse(lemon_, tokenId, tok); } diff --git a/src/OpenFOAM/expressions/fields/fieldExprParser.H b/src/OpenFOAM/expressions/fields/fieldExprParser.H index b8f902eb7f9..949768e28d6 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprParser.H +++ b/src/OpenFOAM/expressions/fields/fieldExprParser.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,6 +34,7 @@ Description #ifndef expressions_fieldExprParser_H #define expressions_fieldExprParser_H +#include "exprScanToken.H" #include "fieldExprFwd.H" namespace Foam @@ -97,10 +98,14 @@ public: //- Stop parsing, freeing the allocated parser void stop(); - //- Push token/value to parser - void parse(int tokenId, scanToken* tokenVal); + //- Push token type to parser with default token + void parse(int tokenId); + + //- Push token type/value to parser + void parse(int tokenId, scanToken tok); }; + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace fieldExpr diff --git a/src/OpenFOAM/expressions/fields/fieldExprScanner.H b/src/OpenFOAM/expressions/fields/fieldExprScanner.H index 2c7b877ec1b..4deeb5b5c2c 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprScanner.H +++ b/src/OpenFOAM/expressions/fields/fieldExprScanner.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -38,7 +38,6 @@ Note #define expressions_fieldExprScanner_H #include "fieldExprFwd.H" -#include "scalar.H" namespace Foam { @@ -47,21 +46,6 @@ namespace expressions namespace fieldExpr { -/*---------------------------------------------------------------------------*\ - Class scanToken Declaration -\*---------------------------------------------------------------------------*/ - -union scanToken -{ - Foam::label ivalue; - Foam::scalar svalue; - Foam::word* name; - - //- Default construct, bit-wise zero for union content - scanToken() : ivalue(0) {} -}; - - /*---------------------------------------------------------------------------*\ Class scanner Declaration \*---------------------------------------------------------------------------*/ @@ -83,16 +67,14 @@ class scanner bool dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; //- Dispatch identifier to parser (if possible) or Fatal bool dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; diff --git a/src/OpenFOAM/expressions/fields/fieldExprScanner.cc b/src/OpenFOAM/expressions/fields/fieldExprScanner.cc index fb34d6ec33b..99503b8e010 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprScanner.cc +++ b/src/OpenFOAM/expressions/fields/fieldExprScanner.cc @@ -30,6 +30,7 @@ Description \*---------------------------------------------------------------------------*/ +#include "exprScanToken.H" #include "fieldExprScanner.H" #include "fieldExprDriver.H" #include "fieldExprLemonParser.h" @@ -44,7 +45,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -57,8 +57,9 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +// No known look-back types #undef HAS_LOOKBEHIND_TOKENS // Special handling of predefined method types. Eg, .x(), .y(), ... @@ -123,22 +124,27 @@ static int driverTokenType const word& ident ) { + #ifdef HAS_LOOKBEHIND_TOKENS + // Get stashed "look-behind" to decide what type of identifier we expect + #endif + // Field variables #ifdef TOK_SCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isLocalVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isLocalVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SCALAR_ID, scalar); - checkFieldToken(TOK_VECTOR_ID, vector); - checkFieldToken(TOK_SYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_TENSOR_ID, tensor); - // Not tested: checkFieldToken(TOK_BOOL_ID, bool); + doLocalCode(TOK_SCALAR_ID, scalar); + doLocalCode(TOK_VECTOR_ID, vector); + doLocalCode(TOK_SYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_TENSOR_ID, tensor); + // Not tested: doLocalCode(TOK_BOOL_ID, bool); + #undef doLocalCode } #endif @@ -158,20 +164,28 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); -#line 167 "fieldExprScanner.cc" -static const int fieldExpr_start = 11; -static const int fieldExpr_first_final = 11; +#line 181 "fieldExprScanner.cc" +static const int fieldExpr_start = 13; +static const int fieldExpr_first_final = 13; static const int fieldExpr_error = 0; -static const int fieldExpr_en_main = 11; +static const int fieldExpr_en_main = 13; -#line 305 "fieldExprScanner.rl" +#line 326 "fieldExprScanner.rl" @@ -191,8 +205,7 @@ Foam::expressions::fieldExpr::scanner::~scanner() bool Foam::expressions::fieldExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -209,8 +222,8 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -223,10 +236,11 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_method bool Foam::expressions::fieldExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -251,12 +265,12 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -266,17 +280,28 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -284,8 +309,9 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -317,12 +343,13 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -385,9 +412,6 @@ bool Foam::expressions::fieldExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -403,7 +427,7 @@ bool Foam::expressions::fieldExpr::scanner::process // Initialize FSM variables -#line 407 "fieldExprScanner.cc" +#line 431 "fieldExprScanner.cc" { cs = fieldExpr_start; ts = 0; @@ -411,44 +435,49 @@ bool Foam::expressions::fieldExpr::scanner::process act = 0; } -#line 535 "fieldExprScanner.rl" +#line 566 "fieldExprScanner.rl" /* ^^^ FSM initialization here ^^^ */; -#line 419 "fieldExprScanner.cc" +#line 443 "fieldExprScanner.cc" { if ( p == pe ) goto _test_eof; switch ( cs ) { tr2: -#line 189 "fieldExprScanner.rl" +#line 206 "fieldExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr4: -#line 189 "fieldExprScanner.rl" +#line 206 "fieldExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr5: -#line 167 "fieldExprScanner.rl" +#line 181 "fieldExprScanner.rl" {{p = ((te))-1;}{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -460,103 +489,122 @@ tr5: driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr8: -#line 232 "fieldExprScanner.rl" +#line 250 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(EQUAL); }} - goto st11; + goto st13; tr9: -#line 284 "fieldExprScanner.rl" +#line 302 "fieldExprScanner.rl" {{p = ((te))-1;}{ EMIT_TOKEN(TENSOR); }} - goto st11; + goto st13; tr11: -#line 292 "fieldExprScanner.rl" +#line 313 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(IDENTITY_TENSOR); }} - goto st11; + goto st13; tr12: -#line 235 "fieldExprScanner.rl" - {te = p+1;{ EMIT_TOKEN(LOR); }} - goto st11; +#line 301 "fieldExprScanner.rl" + {{p = ((te))-1;}{ EMIT_TOKEN(VECTOR); }} + goto st13; +tr14: +#line 310 "fieldExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(1,0,0); }} + goto st13; +tr15: +#line 311 "fieldExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,1,0); }} + goto st13; tr16: -#line 217 "fieldExprScanner.rl" +#line 312 "fieldExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,0,1); }} + goto st13; +tr17: +#line 253 "fieldExprScanner.rl" + {te = p+1;{ EMIT_TOKEN(LOR); }} + goto st13; +tr21: +#line 235 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PERCENT); }} - goto st11; -tr19: -#line 218 "fieldExprScanner.rl" + goto st13; +tr24: +#line 236 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LPAREN); }} - goto st11; -tr20: -#line 219 "fieldExprScanner.rl" + goto st13; +tr25: +#line 237 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(RPAREN); }} - goto st11; -tr21: -#line 220 "fieldExprScanner.rl" + goto st13; +tr26: +#line 238 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(TIMES); }} - goto st11; -tr22: -#line 221 "fieldExprScanner.rl" + goto st13; +tr27: +#line 239 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PLUS); }} - goto st11; -tr23: -#line 223 "fieldExprScanner.rl" + goto st13; +tr28: +#line 241 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COMMA); }} - goto st11; -tr24: -#line 222 "fieldExprScanner.rl" + goto st13; +tr29: +#line 240 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(MINUS); }} - goto st11; -tr26: -#line 225 "fieldExprScanner.rl" + goto st13; +tr31: +#line 243 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(DIVIDE); }} - goto st11; -tr28: -#line 227 "fieldExprScanner.rl" + goto st13; +tr33: +#line 245 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COLON); }} - goto st11; -tr32: -#line 226 "fieldExprScanner.rl" + goto st13; +tr37: +#line 244 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(QUESTION); }} - goto st11; -tr35: -#line 238 "fieldExprScanner.rl" + goto st13; +tr40: +#line 256 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(BIT_XOR); }} - goto st11; -tr51: -#line 211 "fieldExprScanner.rl" + goto st13; +tr56: +#line 229 "fieldExprScanner.rl" {te = p;p--;} - goto st11; -tr52: -#line 216 "fieldExprScanner.rl" - {te = p;p--;{ EMIT_TOKEN(NOT); }} - goto st11; -tr53: -#line 233 "fieldExprScanner.rl" + goto st13; +tr57: +#line 234 "fieldExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(LNOT); }} + goto st13; +tr58: +#line 251 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(NOT_EQUAL); }} - goto st11; -tr54: -#line 236 "fieldExprScanner.rl" + goto st13; +tr59: +#line 254 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(BIT_AND); }} - goto st11; -tr55: -#line 234 "fieldExprScanner.rl" + goto st13; +tr60: +#line 252 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LAND); }} - goto st11; -tr56: -#line 224 "fieldExprScanner.rl" + goto st13; +tr61: +#line 242 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(DOT); }} - goto st11; -tr59: -#line 167 "fieldExprScanner.rl" + goto st13; +tr64: +#line 181 "fieldExprScanner.rl" {te = p;p--;{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -568,41 +616,42 @@ tr59: driver_.parsePosition() = (p-buf); }} - goto st11; -tr61: -#line 195 "fieldExprScanner.rl" + goto st13; +tr66: +#line 213 "fieldExprScanner.rl" {te = p;p--;{ // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr62: -#line 228 "fieldExprScanner.rl" + goto st13; +tr67: +#line 246 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LESS); }} - goto st11; -tr63: -#line 229 "fieldExprScanner.rl" + goto st13; +tr68: +#line 247 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LESS_EQ); }} - goto st11; -tr64: -#line 230 "fieldExprScanner.rl" + goto st13; +tr69: +#line 248 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(GREATER); }} - goto st11; -tr65: -#line 231 "fieldExprScanner.rl" + goto st13; +tr70: +#line 249 "fieldExprScanner.rl" {te = p+1;{ EMIT_TOKEN(GREATER_EQ); }} - goto st11; -tr66: -#line 189 "fieldExprScanner.rl" + goto st13; +tr71: +#line 206 "fieldExprScanner.rl" {te = p;p--;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr68: + goto st13; +tr73: #line 1 "NONE" { switch( act ) { case 26: @@ -677,9 +726,6 @@ tr68: case 58: {{p = ((te))-1;} EMIT_TOKEN(BOOL); } break; - case 59: - {{p = ((te))-1;} EMIT_TOKEN(VECTOR); } - break; case 61: {{p = ((te))-1;} EMIT_TOKEN(SYM_TENSOR); } break; @@ -687,146 +733,157 @@ tr68: {{p = ((te))-1;} EMIT_TOKEN(SPH_TENSOR); } break; case 63: - {{p = ((te))-1;} EMIT_TOKEN(ZERO); } + {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } break; case 64: - {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } + {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } break; case 65: - {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } + {{p = ((te))-1;} EMIT_TOKEN(ZERO); } break; - case 67: + case 70: {{p = ((te))-1;} EMIT_TOKEN(ARG); } break; - case 68: + case 71: + {{p = ((te))-1;} EMIT_TOKEN(TIME); } + break; + case 72: + {{p = ((te))-1;} EMIT_TOKEN(DELTA_T); } + break; + case 73: {{p = ((te))-1;} + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } break; } } - goto st11; -tr84: -#line 260 "fieldExprScanner.rl" + goto st13; +tr89: +#line 278 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(ATAN); }} - goto st11; -tr99: -#line 256 "fieldExprScanner.rl" + goto st13; +tr104: +#line 274 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(COS); }} - goto st11; -tr116: -#line 249 "fieldExprScanner.rl" + goto st13; +tr125: +#line 267 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LOG); }} - goto st11; -tr123: -#line 265 "fieldExprScanner.rl" + goto st13; +tr132: +#line 283 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(MAG); }} - goto st11; -tr130: -#line 269 "fieldExprScanner.rl" + goto st13; +tr139: +#line 287 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(NEG); }} - goto st11; -tr136: -#line 268 "fieldExprScanner.rl" + goto st13; +tr145: +#line 286 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(POS); }} - goto st11; -tr155: -#line 255 "fieldExprScanner.rl" + goto st13; +tr164: +#line 273 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SIN); }} - goto st11; -tr171: -#line 252 "fieldExprScanner.rl" + goto st13; +tr180: +#line 270 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SQR); }} - goto st11; -tr186: -#line 257 "fieldExprScanner.rl" + goto st13; +tr196: +#line 275 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TAN); }} - goto st11; -tr192: -#line 284 "fieldExprScanner.rl" + goto st13; +tr202: +#line 302 "fieldExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TENSOR); }} - goto st11; -st11: + goto st13; +tr213: +#line 301 "fieldExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(VECTOR); }} + goto st13; +st13: #line 1 "NONE" {ts = 0;} if ( ++p == pe ) - goto _test_eof11; -case 11: + goto _test_eof13; +case 13: #line 1 "NONE" {ts = p;} -#line 760 "fieldExprScanner.cc" +#line 817 "fieldExprScanner.cc" switch( (*p) ) { - case 32: goto st12; - case 33: goto st13; + case 32: goto st14; + case 33: goto st15; case 34: goto st1; - case 37: goto tr16; - case 38: goto st14; + case 37: goto tr21; + case 38: goto st16; case 39: goto st3; - case 40: goto tr19; - case 41: goto tr20; - case 42: goto tr21; - case 43: goto tr22; - case 44: goto tr23; - case 45: goto tr24; - case 46: goto st15; - case 47: goto tr26; - case 58: goto tr28; - case 60: goto st20; + case 40: goto tr24; + case 41: goto tr25; + case 42: goto tr26; + case 43: goto tr27; + case 44: goto tr28; + case 45: goto tr29; + case 46: goto st17; + case 47: goto tr31; + case 58: goto tr33; + case 60: goto st22; case 61: goto st7; - case 62: goto st21; - case 63: goto tr32; - case 90: goto st24; - case 94: goto tr35; - case 95: goto st22; - case 97: goto st27; - case 98: goto st41; - case 99: goto st44; - case 100: goto st49; - case 101: goto st56; - case 102: goto st58; - case 108: goto st62; - case 109: goto st66; - case 110: goto st72; - case 112: goto st75; - case 114: goto st78; - case 115: goto st86; - case 116: goto st114; - case 118: goto st124; - case 124: goto st10; + case 62: goto st23; + case 63: goto tr37; + case 90: goto st26; + case 94: goto tr40; + case 95: goto st24; + case 97: goto st29; + case 98: goto st43; + case 99: goto st46; + case 100: goto st51; + case 101: goto st61; + case 102: goto st63; + case 108: goto st67; + case 109: goto st71; + case 110: goto st77; + case 112: goto st80; + case 114: goto st83; + case 115: goto st91; + case 116: goto st119; + case 118: goto st131; + case 124: goto st12; } if ( (*p) < 48 ) { if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; + goto st14; } else if ( (*p) > 57 ) { if ( (*p) > 89 ) { if ( 103 <= (*p) && (*p) <= 122 ) - goto st22; + goto st24; } else if ( (*p) >= 65 ) - goto st22; + goto st24; } else - goto tr27; + goto tr32; goto st0; st0: cs = 0; goto _out; -st12: +st14: if ( ++p == pe ) - goto _test_eof12; -case 12: + goto _test_eof14; +case 14: if ( (*p) == 32 ) - goto st12; + goto st14; if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; - goto tr51; -st13: + goto st14; + goto tr56; +st15: if ( ++p == pe ) - goto _test_eof13; -case 13: + goto _test_eof15; +case 15: if ( (*p) == 61 ) - goto tr53; - goto tr52; + goto tr58; + goto tr57; st1: if ( ++p == pe ) goto _test_eof1; @@ -841,13 +898,13 @@ case 2: if ( (*p) == 34 ) goto tr2; goto st2; -st14: +st16: if ( ++p == pe ) - goto _test_eof14; -case 14: + goto _test_eof16; +case 16: if ( (*p) == 38 ) - goto tr55; - goto tr54; + goto tr60; + goto tr59; st3: if ( ++p == pe ) goto _test_eof3; @@ -862,35 +919,35 @@ case 4: if ( (*p) == 39 ) goto tr4; goto st4; -st15: +st17: if ( ++p == pe ) - goto _test_eof15; -case 15: + goto _test_eof17; +case 17: if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr57; + goto tr62; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else - goto st18; - goto tr56; -tr57: + goto st20; + goto tr61; +tr62: #line 1 "NONE" {te = p+1;} - goto st16; -st16: + goto st18; +st18: if ( ++p == pe ) - goto _test_eof16; -case 16: -#line 887 "fieldExprScanner.cc" + goto _test_eof18; +case 18: +#line 944 "fieldExprScanner.cc" switch( (*p) ) { case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr57; - goto tr59; + goto tr62; + goto tr64; st5: if ( ++p == pe ) goto _test_eof5; @@ -900,56 +957,56 @@ case 5: case 45: goto st6; } if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; st6: if ( ++p == pe ) goto _test_eof6; case 6: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; -st17: +st19: if ( ++p == pe ) - goto _test_eof17; -case 17: + goto _test_eof19; +case 19: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; - goto tr59; -st18: + goto st19; + goto tr64; +st20: if ( ++p == pe ) - goto _test_eof18; -case 18: + goto _test_eof20; +case 20: if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else if ( (*p) >= 65 ) - goto st18; - goto tr61; -tr27: + goto st20; + goto tr66; +tr32: #line 1 "NONE" {te = p+1;} - goto st19; -st19: + goto st21; +st21: if ( ++p == pe ) - goto _test_eof19; -case 19: -#line 938 "fieldExprScanner.cc" + goto _test_eof21; +case 21: +#line 995 "fieldExprScanner.cc" switch( (*p) ) { - case 46: goto tr57; + case 46: goto tr62; case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr27; - goto tr59; -st20: + goto tr32; + goto tr64; +st22: if ( ++p == pe ) - goto _test_eof20; -case 20: + goto _test_eof22; +case 22: if ( (*p) == 61 ) - goto tr63; - goto tr62; + goto tr68; + goto tr67; st7: if ( ++p == pe ) goto _test_eof7; @@ -957,2193 +1014,2329 @@ case 7: if ( (*p) == 61 ) goto tr8; goto st0; -st21: +st23: if ( ++p == pe ) - goto _test_eof21; -case 21: + goto _test_eof23; +case 23: if ( (*p) == 61 ) - goto tr65; - goto tr64; -st22: + goto tr70; + goto tr69; +st24: if ( ++p == pe ) - goto _test_eof22; -case 22: + goto _test_eof24; +case 24: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; -tr67: + goto tr72; + goto tr71; +tr72: #line 1 "NONE" {te = p+1;} -#line 189 "fieldExprScanner.rl" - {act = 68;} - goto st23; -tr71: +#line 206 "fieldExprScanner.rl" + {act = 73;} + goto st25; +tr76: #line 1 "NONE" {te = p+1;} -#line 289 "fieldExprScanner.rl" - {act = 63;} - goto st23; -tr78: +#line 309 "fieldExprScanner.rl" + {act = 65;} + goto st25; +tr83: #line 1 "NONE" {te = p+1;} -#line 259 "fieldExprScanner.rl" +#line 277 "fieldExprScanner.rl" {act = 40;} - goto st23; -tr79: + goto st25; +tr84: #line 1 "NONE" {te = p+1;} -#line 293 "fieldExprScanner.rl" - {act = 67;} - goto st23; -tr81: +#line 314 "fieldExprScanner.rl" + {act = 70;} + goto st25; +tr86: #line 1 "NONE" {te = p+1;} -#line 258 "fieldExprScanner.rl" +#line 276 "fieldExprScanner.rl" {act = 39;} - goto st23; -tr85: + goto st25; +tr90: #line 1 "NONE" {te = p+1;} -#line 261 "fieldExprScanner.rl" +#line 279 "fieldExprScanner.rl" {act = 42;} - goto st23; -tr90: + goto st25; +tr95: #line 1 "NONE" {te = p+1;} -#line 277 "fieldExprScanner.rl" +#line 295 "fieldExprScanner.rl" {act = 55;} - goto st23; -tr93: + goto st25; +tr98: #line 1 "NONE" {te = p+1;} -#line 282 "fieldExprScanner.rl" +#line 300 "fieldExprScanner.rl" {act = 58;} - goto st23; -tr97: + goto st25; +tr102: #line 1 "NONE" {te = p+1;} -#line 254 "fieldExprScanner.rl" +#line 272 "fieldExprScanner.rl" {act = 35;} - goto st23; -tr100: + goto st25; +tr105: #line 1 "NONE" {te = p+1;} -#line 263 "fieldExprScanner.rl" +#line 281 "fieldExprScanner.rl" {act = 44;} - goto st23; -tr107: + goto st25; +tr113: #line 1 "NONE" {te = p+1;} -#line 246 "fieldExprScanner.rl" +#line 264 "fieldExprScanner.rl" {act = 27;} - goto st23; -tr109: + goto st25; +tr116: #line 1 "NONE" {te = p+1;} -#line 248 "fieldExprScanner.rl" +#line 316 "fieldExprScanner.rl" + {act = 72;} + goto st25; +tr118: +#line 1 "NONE" + {te = p+1;} +#line 266 "fieldExprScanner.rl" {act = 29;} - goto st23; -tr113: + goto st25; +tr122: #line 1 "NONE" {te = p+1;} -#line 291 "fieldExprScanner.rl" - {act = 65;} - goto st23; -tr118: +#line 308 "fieldExprScanner.rl" + {act = 64;} + goto st25; +tr127: #line 1 "NONE" {te = p+1;} -#line 250 "fieldExprScanner.rl" +#line 268 "fieldExprScanner.rl" {act = 31;} - goto st23; -tr122: + goto st25; +tr131: #line 1 "NONE" {te = p+1;} -#line 276 "fieldExprScanner.rl" +#line 294 "fieldExprScanner.rl" {act = 54;} - goto st23; -tr126: + goto st25; +tr135: #line 1 "NONE" {te = p+1;} -#line 266 "fieldExprScanner.rl" +#line 284 "fieldExprScanner.rl" {act = 47;} - goto st23; -tr127: + goto st25; +tr136: #line 1 "NONE" {te = p+1;} -#line 275 "fieldExprScanner.rl" +#line 293 "fieldExprScanner.rl" {act = 53;} - goto st23; -tr131: + goto st25; +tr140: #line 1 "NONE" {te = p+1;} -#line 271 "fieldExprScanner.rl" +#line 289 "fieldExprScanner.rl" {act = 51;} - goto st23; -tr132: + goto st25; +tr141: #line 1 "NONE" {te = p+1;} -#line 245 "fieldExprScanner.rl" +#line 263 "fieldExprScanner.rl" {act = 26;} - goto st23; -tr135: + goto st25; +tr144: #line 1 "NONE" {te = p+1;} -#line 251 "fieldExprScanner.rl" +#line 269 "fieldExprScanner.rl" {act = 32;} - goto st23; -tr137: + goto st25; +tr146: #line 1 "NONE" {te = p+1;} -#line 270 "fieldExprScanner.rl" +#line 288 "fieldExprScanner.rl" {act = 50;} - goto st23; -tr145: + goto st25; +tr154: #line 1 "NONE" {te = p+1;} -#line 247 "fieldExprScanner.rl" +#line 265 "fieldExprScanner.rl" {act = 28;} - goto st23; -tr146: + goto st25; +tr155: #line 1 "NONE" {te = p+1;} -#line 279 "fieldExprScanner.rl" +#line 297 "fieldExprScanner.rl" {act = 57;} - goto st23; -tr154: + goto st25; +tr163: #line 1 "NONE" {te = p+1;} -#line 272 "fieldExprScanner.rl" +#line 290 "fieldExprScanner.rl" {act = 52;} - goto st23; -tr156: + goto st25; +tr165: #line 1 "NONE" {te = p+1;} -#line 262 "fieldExprScanner.rl" +#line 280 "fieldExprScanner.rl" {act = 43;} - goto st23; -tr169: + goto st25; +tr178: #line 1 "NONE" {te = p+1;} -#line 286 "fieldExprScanner.rl" +#line 304 "fieldExprScanner.rl" {act = 62;} - goto st23; -tr172: + goto st25; +tr181: #line 1 "NONE" {te = p+1;} -#line 253 "fieldExprScanner.rl" +#line 271 "fieldExprScanner.rl" {act = 34;} - goto st23; -tr173: + goto st25; +tr182: #line 1 "NONE" {te = p+1;} -#line 278 "fieldExprScanner.rl" +#line 296 "fieldExprScanner.rl" {act = 56;} - goto st23; -tr181: + goto st25; +tr190: #line 1 "NONE" {te = p+1;} -#line 285 "fieldExprScanner.rl" +#line 303 "fieldExprScanner.rl" {act = 61;} - goto st23; -tr187: + goto st25; +tr197: #line 1 "NONE" {te = p+1;} -#line 264 "fieldExprScanner.rl" +#line 282 "fieldExprScanner.rl" {act = 45;} - goto st23; -tr195: + goto st25; +tr205: #line 1 "NONE" {te = p+1;} -#line 290 "fieldExprScanner.rl" - {act = 64;} - goto st23; -tr200: +#line 315 "fieldExprScanner.rl" + {act = 71;} + goto st25; +tr207: #line 1 "NONE" {te = p+1;} -#line 283 "fieldExprScanner.rl" - {act = 59;} - goto st23; -st23: - if ( ++p == pe ) - goto _test_eof23; -case 23: -#line 1181 "fieldExprScanner.cc" - switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; - } else - goto tr67; - goto tr68; -st24: - if ( ++p == pe ) - goto _test_eof24; -case 24: - switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st25; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; - } else - goto tr67; - goto tr66; +#line 307 "fieldExprScanner.rl" + {act = 63;} + goto st25; st25: if ( ++p == pe ) goto _test_eof25; case 25: +#line 1244 "fieldExprScanner.cc" switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto st26; + case 46: goto tr72; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr73; st26: if ( ++p == pe ) goto _test_eof26; case 26: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto tr71; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st27; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st27: if ( ++p == pe ) goto _test_eof27; case 27: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 99: goto st28; - case 114: goto st30; - case 115: goto st31; - case 116: goto st33; - case 118: goto st36; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto st28; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st28: if ( ++p == pe ) goto _test_eof28; case 28: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st29; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto tr76; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st29: if ( ++p == pe ) goto _test_eof29; case 29: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto tr78; + case 46: goto tr72; + case 95: goto tr72; + case 99: goto st30; + case 114: goto st32; + case 115: goto st33; + case 116: goto st35; + case 118: goto st38; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st30: if ( ++p == pe ) goto _test_eof30; case 30: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto tr79; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st31; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st31: if ( ++p == pe ) goto _test_eof31; case 31: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 105: goto st32; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto tr83; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st32: if ( ++p == pe ) goto _test_eof32; case 32: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto tr81; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto tr84; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st33: if ( ++p == pe ) goto _test_eof33; case 33: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st34; + case 46: goto tr72; + case 95: goto tr72; + case 105: goto st34; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st34: if ( ++p == pe ) goto _test_eof34; case 34: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto st35; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto tr86; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st35: if ( ++p == pe ) goto _test_eof35; case 35: switch( (*p) ) { - case 46: goto tr67; - case 50: goto tr85; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st36; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr84; + goto tr72; + goto tr71; st36: if ( ++p == pe ) goto _test_eof36; case 36: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st37; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto st37; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st37: if ( ++p == pe ) goto _test_eof37; case 37: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto st38; + case 46: goto tr72; + case 50: goto tr90; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr89; st38: if ( ++p == pe ) goto _test_eof38; case 38: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st39; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st39; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st39: if ( ++p == pe ) goto _test_eof39; case 39: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st40; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto st40; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st40: if ( ++p == pe ) goto _test_eof40; case 40: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto tr90; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st41; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st41: if ( ++p == pe ) goto _test_eof41; case 41: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st42; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st42; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st42: if ( ++p == pe ) goto _test_eof42; case 42: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st43; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto tr95; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st43: if ( ++p == pe ) goto _test_eof43; case 43: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 108: goto tr93; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st44; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st44: if ( ++p == pe ) goto _test_eof44; case 44: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 98: goto st45; - case 111: goto st47; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st45; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st45: if ( ++p == pe ) goto _test_eof45; case 45: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto st46; + case 46: goto tr72; + case 95: goto tr72; + case 108: goto tr98; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st46: if ( ++p == pe ) goto _test_eof46; case 46: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 116: goto tr97; + case 46: goto tr72; + case 95: goto tr72; + case 98: goto st47; + case 111: goto st49; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st47: if ( ++p == pe ) goto _test_eof47; case 47: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st48; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto st48; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st48: if ( ++p == pe ) goto _test_eof48; case 48: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 104: goto tr100; + case 46: goto tr72; + case 95: goto tr72; + case 116: goto tr102; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr99; + goto tr72; + goto tr71; st49: if ( ++p == pe ) goto _test_eof49; case 49: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st50; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st50; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st50: if ( ++p == pe ) goto _test_eof50; case 50: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st51; + case 46: goto tr72; + case 95: goto tr72; + case 104: goto tr105; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr104; st51: if ( ++p == pe ) goto _test_eof51; case 51: switch( (*p) ) { - case 46: goto tr67; - case 84: goto st52; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st52; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st52: if ( ++p == pe ) goto _test_eof52; case 52: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st53; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st53; + case 108: goto st58; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st53: if ( ++p == pe ) goto _test_eof53; case 53: switch( (*p) ) { - case 46: goto tr67; - case 82: goto st54; - case 95: goto tr67; + case 46: goto tr72; + case 84: goto st54; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st54: if ( ++p == pe ) goto _test_eof54; case 54: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st55; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st55; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st55: if ( ++p == pe ) goto _test_eof55; case 55: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 100: goto tr107; + case 46: goto tr72; + case 82: goto st56; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st56: if ( ++p == pe ) goto _test_eof56; case 56: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 120: goto st57; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st57; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st57: if ( ++p == pe ) goto _test_eof57; case 57: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 112: goto tr109; + case 46: goto tr72; + case 95: goto tr72; + case 100: goto tr113; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st58: if ( ++p == pe ) goto _test_eof58; case 58: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st59; + case 46: goto tr72; + case 95: goto tr72; + case 116: goto st59; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st59: if ( ++p == pe ) goto _test_eof59; case 59: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 108: goto st60; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st60; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st60: if ( ++p == pe ) goto _test_eof60; case 60: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st61; + case 46: goto tr72; + case 84: goto tr116; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st61: if ( ++p == pe ) goto _test_eof61; case 61: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto tr113; + case 46: goto tr72; + case 95: goto tr72; + case 120: goto st62; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st62: if ( ++p == pe ) goto _test_eof62; case 62: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st63; + case 46: goto tr72; + case 95: goto tr72; + case 112: goto tr118; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st63: if ( ++p == pe ) goto _test_eof63; case 63: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st64; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st64; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st64: if ( ++p == pe ) goto _test_eof64; case 64: switch( (*p) ) { - case 46: goto tr67; - case 49: goto st65; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 108: goto st65; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr116; + goto tr72; + goto tr71; st65: if ( ++p == pe ) goto _test_eof65; case 65: switch( (*p) ) { - case 46: goto tr67; - case 48: goto tr118; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st66; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st66: if ( ++p == pe ) goto _test_eof66; case 66: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st67; - case 105: goto st71; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto tr122; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st67: if ( ++p == pe ) goto _test_eof67; case 67: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st68; - case 120: goto tr122; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st68; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st68: if ( ++p == pe ) goto _test_eof68; case 68: switch( (*p) ) { - case 46: goto tr67; - case 83: goto st69; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st69; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr123; + goto tr72; + goto tr71; st69: if ( ++p == pe ) goto _test_eof69; case 69: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 113: goto st70; + case 46: goto tr72; + case 49: goto st70; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr125; st70: if ( ++p == pe ) goto _test_eof70; case 70: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto tr126; + case 46: goto tr72; + case 48: goto tr127; + case 95: goto tr72; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st71: if ( ++p == pe ) goto _test_eof71; case 71: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto tr127; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st72; + case 105: goto st76; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st72: if ( ++p == pe ) goto _test_eof72; case 72: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st73; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st73; + case 120: goto tr131; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st73: if ( ++p == pe ) goto _test_eof73; case 73: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st74; + case 46: goto tr72; + case 83: goto st74; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr132; st74: if ( ++p == pe ) goto _test_eof74; case 74: switch( (*p) ) { - case 46: goto tr67; - case 48: goto tr131; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 113: goto st75; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr130; + goto tr72; + goto tr71; st75: if ( ++p == pe ) goto _test_eof75; case 75: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 105: goto tr132; - case 111: goto st76; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto tr135; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st76: if ( ++p == pe ) goto _test_eof76; case 76: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st77; - case 119: goto tr135; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto tr136; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st77: if ( ++p == pe ) goto _test_eof77; case 77: switch( (*p) ) { - case 46: goto tr67; - case 48: goto tr137; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st78; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr136; + goto tr72; + goto tr71; st78: if ( ++p == pe ) goto _test_eof78; case 78: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st79; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st79; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st79: if ( ++p == pe ) goto _test_eof79; case 79: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 100: goto st80; - case 110: goto st85; + case 46: goto tr72; + case 48: goto tr140; + case 95: goto tr72; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr139; st80: if ( ++p == pe ) goto _test_eof80; case 80: switch( (*p) ) { - case 46: goto tr67; - case 84: goto st81; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 105: goto tr141; + case 111: goto st81; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st81: if ( ++p == pe ) goto _test_eof81; case 81: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st82; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st82; + case 119: goto tr144; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st82: if ( ++p == pe ) goto _test_eof82; case 82: switch( (*p) ) { - case 46: goto tr67; - case 68: goto st83; - case 95: goto tr67; + case 46: goto tr72; + case 48: goto tr146; + case 95: goto tr72; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr145; st83: if ( ++p == pe ) goto _test_eof83; case 83: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st84; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st84; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st84: if ( ++p == pe ) goto _test_eof84; case 84: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto tr145; + case 46: goto tr72; + case 95: goto tr72; + case 100: goto st85; + case 110: goto st90; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st85: if ( ++p == pe ) goto _test_eof85; case 85: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 100: goto tr146; + case 46: goto tr72; + case 84: goto st86; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st86: if ( ++p == pe ) goto _test_eof86; case 86: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 105: goto st87; - case 112: goto st90; - case 113: goto st103; - case 117: goto st105; - case 121: goto st106; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st87; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st87: if ( ++p == pe ) goto _test_eof87; case 87: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 103: goto st88; - case 110: goto st89; + case 46: goto tr72; + case 68: goto st88; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st88: if ( ++p == pe ) goto _test_eof88; case 88: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto tr154; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st89; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st89: if ( ++p == pe ) goto _test_eof89; case 89: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 104: goto tr156; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto tr154; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr155; + goto tr72; + goto tr71; st90: if ( ++p == pe ) goto _test_eof90; case 90: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 104: goto st91; + case 46: goto tr72; + case 95: goto tr72; + case 100: goto tr155; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st91: if ( ++p == pe ) goto _test_eof91; case 91: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st92; + case 46: goto tr72; + case 95: goto tr72; + case 105: goto st92; + case 112: goto st95; + case 113: goto st108; + case 117: goto st110; + case 121: goto st111; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st92: if ( ++p == pe ) goto _test_eof92; case 92: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto st93; + case 46: goto tr72; + case 95: goto tr72; + case 103: goto st93; + case 110: goto st94; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st93: if ( ++p == pe ) goto _test_eof93; case 93: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 105: goto st94; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto tr163; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st94: if ( ++p == pe ) goto _test_eof94; case 94: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 99: goto st95; + case 46: goto tr72; + case 95: goto tr72; + case 104: goto tr165; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr164; st95: if ( ++p == pe ) goto _test_eof95; case 95: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st96; + case 46: goto tr72; + case 95: goto tr72; + case 104: goto st96; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st96: if ( ++p == pe ) goto _test_eof96; case 96: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 108: goto st97; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st97; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st97: if ( ++p == pe ) goto _test_eof97; case 97: switch( (*p) ) { - case 46: goto tr67; - case 84: goto st98; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto st98; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st98: if ( ++p == pe ) goto _test_eof98; case 98: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st99; + case 46: goto tr72; + case 95: goto tr72; + case 105: goto st99; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st99: if ( ++p == pe ) goto _test_eof99; case 99: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto st100; + case 46: goto tr72; + case 95: goto tr72; + case 99: goto st100; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st100: if ( ++p == pe ) goto _test_eof100; case 100: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st101; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st101; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st101: if ( ++p == pe ) goto _test_eof101; case 101: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st102; + case 46: goto tr72; + case 95: goto tr72; + case 108: goto st102; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st102: if ( ++p == pe ) goto _test_eof102; case 102: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto tr169; + case 46: goto tr72; + case 84: goto st103; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st103: if ( ++p == pe ) goto _test_eof103; case 103: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto st104; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st104; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st104: if ( ++p == pe ) goto _test_eof104; case 104: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 116: goto tr172; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto st105; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr171; + goto tr72; + goto tr71; st105: if ( ++p == pe ) goto _test_eof105; case 105: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 109: goto tr173; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st106; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st106: if ( ++p == pe ) goto _test_eof106; case 106: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 109: goto st107; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st107; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st107: if ( ++p == pe ) goto _test_eof107; case 107: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 109: goto st108; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto tr178; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st108: if ( ++p == pe ) goto _test_eof108; case 108: switch( (*p) ) { - case 46: goto tr67; - case 84: goto st109; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto st109; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st109: if ( ++p == pe ) goto _test_eof109; case 109: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st110; + case 46: goto tr72; + case 95: goto tr72; + case 116: goto tr181; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr180; st110: if ( ++p == pe ) goto _test_eof110; case 110: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto st111; + case 46: goto tr72; + case 95: goto tr72; + case 109: goto tr182; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st111: if ( ++p == pe ) goto _test_eof111; case 111: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st112; + case 46: goto tr72; + case 95: goto tr72; + case 109: goto st112; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st112: if ( ++p == pe ) goto _test_eof112; case 112: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st113; + case 46: goto tr72; + case 95: goto tr72; + case 109: goto st113; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st113: if ( ++p == pe ) goto _test_eof113; case 113: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto tr181; + case 46: goto tr72; + case 84: goto st114; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st114: if ( ++p == pe ) goto _test_eof114; case 114: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 97: goto st115; - case 101: goto st117; - case 114: goto st122; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st115; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st115: if ( ++p == pe ) goto _test_eof115; case 115: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; case 110: goto st116; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st116: if ( ++p == pe ) goto _test_eof116; case 116: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 104: goto tr187; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st117; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr186; + goto tr72; + goto tr71; st117: if ( ++p == pe ) goto _test_eof117; case 117: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 110: goto st118; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st118; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st118: if ( ++p == pe ) goto _test_eof118; case 118: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 115: goto st119; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto tr190; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st119: if ( ++p == pe ) goto _test_eof119; case 119: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st120; + case 46: goto tr72; + case 95: goto tr72; + case 97: goto st120; + case 101: goto st122; + case 105: goto st127; + case 114: goto st129; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st120: if ( ++p == pe ) goto _test_eof120; case 120: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto tr191; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto st121; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; -tr191: -#line 1 "NONE" - {te = p+1;} - goto st121; + goto tr72; + goto tr71; st121: if ( ++p == pe ) goto _test_eof121; case 121: -#line 2966 "fieldExprScanner.cc" switch( (*p) ) { - case 46: goto tr67; - case 58: goto st8; - case 95: goto tr67; + case 46: goto tr72; + case 95: goto tr72; + case 104: goto tr197; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr192; -st8: - if ( ++p == pe ) - goto _test_eof8; -case 8: - if ( (*p) == 58 ) - goto st9; - goto tr9; -st9: - if ( ++p == pe ) - goto _test_eof9; -case 9: - if ( (*p) == 73 ) - goto tr11; - goto tr9; + goto tr72; + goto tr196; st122: if ( ++p == pe ) goto _test_eof122; case 122: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 117: goto st123; + case 46: goto tr72; + case 95: goto tr72; + case 110: goto st123; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st123: if ( ++p == pe ) goto _test_eof123; case 123: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto tr195; + case 46: goto tr72; + case 95: goto tr72; + case 115: goto st124; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st124: if ( ++p == pe ) goto _test_eof124; case 124: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 101: goto st125; + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st125; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st125: if ( ++p == pe ) goto _test_eof125; case 125: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 99: goto st126; + case 46: goto tr72; + case 95: goto tr72; + case 114: goto tr201; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; +tr201: +#line 1 "NONE" + {te = p+1;} + goto st126; st126: if ( ++p == pe ) goto _test_eof126; case 126: +#line 3085 "fieldExprScanner.cc" switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 116: goto st127; + case 46: goto tr72; + case 58: goto st8; + case 95: goto tr72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr202; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + if ( (*p) == 58 ) + goto st9; + goto tr9; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + if ( (*p) == 73 ) + goto tr11; + goto tr9; st127: if ( ++p == pe ) goto _test_eof127; case 127: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 111: goto st128; + case 46: goto tr72; + case 95: goto tr72; + case 109: goto st128; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; st128: if ( ++p == pe ) goto _test_eof128; case 128: switch( (*p) ) { - case 46: goto tr67; - case 95: goto tr67; - case 114: goto tr200; + case 46: goto tr72; + case 95: goto tr72; + case 101: goto tr205; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr67; + goto tr72; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr67; + goto tr72; } else - goto tr67; - goto tr66; + goto tr72; + goto tr71; +st129: + if ( ++p == pe ) + goto _test_eof129; +case 129: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 117: goto st130; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st130: + if ( ++p == pe ) + goto _test_eof130; +case 130: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 101: goto tr207; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st131: + if ( ++p == pe ) + goto _test_eof131; +case 131: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 101: goto st132; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st132: + if ( ++p == pe ) + goto _test_eof132; +case 132: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 99: goto st133; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st133: + if ( ++p == pe ) + goto _test_eof133; +case 133: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 116: goto st134; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st134: + if ( ++p == pe ) + goto _test_eof134; +case 134: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 111: goto st135; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +st135: + if ( ++p == pe ) + goto _test_eof135; +case 135: + switch( (*p) ) { + case 46: goto tr72; + case 95: goto tr72; + case 114: goto tr212; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr71; +tr212: +#line 1 "NONE" + {te = p+1;} + goto st136; +st136: + if ( ++p == pe ) + goto _test_eof136; +case 136: +#line 3284 "fieldExprScanner.cc" + switch( (*p) ) { + case 46: goto tr72; + case 58: goto st10; + case 95: goto tr72; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr72; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr72; + } else + goto tr72; + goto tr213; st10: if ( ++p == pe ) goto _test_eof10; case 10: + if ( (*p) == 58 ) + goto st11; + goto tr12; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + switch( (*p) ) { + case 120: goto tr14; + case 121: goto tr15; + case 122: goto tr16; + } + goto tr12; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: if ( (*p) == 124 ) - goto tr12; + goto tr17; goto st0; } - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; _test_eof1: cs = 1; goto _test_eof; _test_eof2: cs = 2; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; _test_eof3: cs = 3; goto _test_eof; _test_eof4: cs = 4; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; _test_eof17: cs = 17; goto _test_eof; _test_eof18: cs = 18; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; _test_eof19: cs = 19; goto _test_eof; _test_eof20: cs = 20; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; _test_eof21: cs = 21; goto _test_eof; _test_eof22: cs = 22; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; _test_eof23: cs = 23; goto _test_eof; _test_eof24: cs = 24; goto _test_eof; _test_eof25: cs = 25; goto _test_eof; @@ -3243,149 +3436,167 @@ case 10: _test_eof119: cs = 119; goto _test_eof; _test_eof120: cs = 120; goto _test_eof; _test_eof121: cs = 121; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; _test_eof122: cs = 122; goto _test_eof; _test_eof123: cs = 123; goto _test_eof; _test_eof124: cs = 124; goto _test_eof; _test_eof125: cs = 125; goto _test_eof; _test_eof126: cs = 126; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; _test_eof127: cs = 127; goto _test_eof; _test_eof128: cs = 128; goto _test_eof; + _test_eof129: cs = 129; goto _test_eof; + _test_eof130: cs = 130; goto _test_eof; + _test_eof131: cs = 131; goto _test_eof; + _test_eof132: cs = 132; goto _test_eof; + _test_eof133: cs = 133; goto _test_eof; + _test_eof134: cs = 134; goto _test_eof; + _test_eof135: cs = 135; goto _test_eof; + _test_eof136: cs = 136; goto _test_eof; _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; _test_eof: {} if ( p == eof ) { switch ( cs ) { - case 12: goto tr51; - case 13: goto tr52; - case 14: goto tr54; - case 15: goto tr56; + case 14: goto tr56; + case 15: goto tr57; case 16: goto tr59; + case 17: goto tr61; + case 18: goto tr64; case 5: goto tr5; case 6: goto tr5; - case 17: goto tr59; - case 18: goto tr61; - case 19: goto tr59; - case 20: goto tr62; + case 19: goto tr64; + case 20: goto tr66; case 21: goto tr64; - case 22: goto tr66; - case 23: goto tr68; - case 24: goto tr66; - case 25: goto tr66; - case 26: goto tr66; - case 27: goto tr66; - case 28: goto tr66; - case 29: goto tr66; - case 30: goto tr66; - case 31: goto tr66; - case 32: goto tr66; - case 33: goto tr66; - case 34: goto tr66; - case 35: goto tr84; - case 36: goto tr66; - case 37: goto tr66; - case 38: goto tr66; - case 39: goto tr66; - case 40: goto tr66; - case 41: goto tr66; - case 42: goto tr66; - case 43: goto tr66; - case 44: goto tr66; - case 45: goto tr66; - case 46: goto tr66; - case 47: goto tr66; - case 48: goto tr99; - case 49: goto tr66; - case 50: goto tr66; - case 51: goto tr66; - case 52: goto tr66; - case 53: goto tr66; - case 54: goto tr66; - case 55: goto tr66; - case 56: goto tr66; - case 57: goto tr66; - case 58: goto tr66; - case 59: goto tr66; - case 60: goto tr66; - case 61: goto tr66; - case 62: goto tr66; - case 63: goto tr66; - case 64: goto tr116; - case 65: goto tr66; - case 66: goto tr66; - case 67: goto tr66; - case 68: goto tr123; - case 69: goto tr66; - case 70: goto tr66; - case 71: goto tr66; - case 72: goto tr66; - case 73: goto tr66; - case 74: goto tr130; - case 75: goto tr66; - case 76: goto tr66; - case 77: goto tr136; - case 78: goto tr66; - case 79: goto tr66; - case 80: goto tr66; - case 81: goto tr66; - case 82: goto tr66; - case 83: goto tr66; - case 84: goto tr66; - case 85: goto tr66; - case 86: goto tr66; - case 87: goto tr66; - case 88: goto tr66; - case 89: goto tr155; - case 90: goto tr66; - case 91: goto tr66; - case 92: goto tr66; - case 93: goto tr66; - case 94: goto tr66; - case 95: goto tr66; - case 96: goto tr66; - case 97: goto tr66; - case 98: goto tr66; - case 99: goto tr66; - case 100: goto tr66; - case 101: goto tr66; - case 102: goto tr66; - case 103: goto tr66; - case 104: goto tr171; - case 105: goto tr66; - case 106: goto tr66; - case 107: goto tr66; - case 108: goto tr66; - case 109: goto tr66; - case 110: goto tr66; - case 111: goto tr66; - case 112: goto tr66; - case 113: goto tr66; - case 114: goto tr66; - case 115: goto tr66; - case 116: goto tr186; - case 117: goto tr66; - case 118: goto tr66; - case 119: goto tr66; - case 120: goto tr66; - case 121: goto tr192; + case 22: goto tr67; + case 23: goto tr69; + case 24: goto tr71; + case 25: goto tr73; + case 26: goto tr71; + case 27: goto tr71; + case 28: goto tr71; + case 29: goto tr71; + case 30: goto tr71; + case 31: goto tr71; + case 32: goto tr71; + case 33: goto tr71; + case 34: goto tr71; + case 35: goto tr71; + case 36: goto tr71; + case 37: goto tr89; + case 38: goto tr71; + case 39: goto tr71; + case 40: goto tr71; + case 41: goto tr71; + case 42: goto tr71; + case 43: goto tr71; + case 44: goto tr71; + case 45: goto tr71; + case 46: goto tr71; + case 47: goto tr71; + case 48: goto tr71; + case 49: goto tr71; + case 50: goto tr104; + case 51: goto tr71; + case 52: goto tr71; + case 53: goto tr71; + case 54: goto tr71; + case 55: goto tr71; + case 56: goto tr71; + case 57: goto tr71; + case 58: goto tr71; + case 59: goto tr71; + case 60: goto tr71; + case 61: goto tr71; + case 62: goto tr71; + case 63: goto tr71; + case 64: goto tr71; + case 65: goto tr71; + case 66: goto tr71; + case 67: goto tr71; + case 68: goto tr71; + case 69: goto tr125; + case 70: goto tr71; + case 71: goto tr71; + case 72: goto tr71; + case 73: goto tr132; + case 74: goto tr71; + case 75: goto tr71; + case 76: goto tr71; + case 77: goto tr71; + case 78: goto tr71; + case 79: goto tr139; + case 80: goto tr71; + case 81: goto tr71; + case 82: goto tr145; + case 83: goto tr71; + case 84: goto tr71; + case 85: goto tr71; + case 86: goto tr71; + case 87: goto tr71; + case 88: goto tr71; + case 89: goto tr71; + case 90: goto tr71; + case 91: goto tr71; + case 92: goto tr71; + case 93: goto tr71; + case 94: goto tr164; + case 95: goto tr71; + case 96: goto tr71; + case 97: goto tr71; + case 98: goto tr71; + case 99: goto tr71; + case 100: goto tr71; + case 101: goto tr71; + case 102: goto tr71; + case 103: goto tr71; + case 104: goto tr71; + case 105: goto tr71; + case 106: goto tr71; + case 107: goto tr71; + case 108: goto tr71; + case 109: goto tr180; + case 110: goto tr71; + case 111: goto tr71; + case 112: goto tr71; + case 113: goto tr71; + case 114: goto tr71; + case 115: goto tr71; + case 116: goto tr71; + case 117: goto tr71; + case 118: goto tr71; + case 119: goto tr71; + case 120: goto tr71; + case 121: goto tr196; + case 122: goto tr71; + case 123: goto tr71; + case 124: goto tr71; + case 125: goto tr71; + case 126: goto tr202; case 8: goto tr9; case 9: goto tr9; - case 122: goto tr66; - case 123: goto tr66; - case 124: goto tr66; - case 125: goto tr66; - case 126: goto tr66; - case 127: goto tr66; - case 128: goto tr66; + case 127: goto tr71; + case 128: goto tr71; + case 129: goto tr71; + case 130: goto tr71; + case 131: goto tr71; + case 132: goto tr71; + case 133: goto tr71; + case 134: goto tr71; + case 135: goto tr71; + case 136: goto tr213; + case 10: goto tr12; + case 11: goto tr12; } } _out: {} } -#line 537 "fieldExprScanner.rl" +#line 568 "fieldExprScanner.rl" /* ^^^ FSM execution here ^^^ */; if (0 == cs) @@ -3399,7 +3610,7 @@ case 10: } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) diff --git a/src/OpenFOAM/expressions/fields/fieldExprScanner.rl b/src/OpenFOAM/expressions/fields/fieldExprScanner.rl index e2377ac5bc0..4fded905430 100644 --- a/src/OpenFOAM/expressions/fields/fieldExprScanner.rl +++ b/src/OpenFOAM/expressions/fields/fieldExprScanner.rl @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ +#include "exprScanToken.H" #include "fieldExprScanner.H" #include "fieldExprDriver.H" #include "fieldExprLemonParser.h" @@ -42,7 +43,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -55,8 +55,9 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +// No known look-back types #undef HAS_LOOKBEHIND_TOKENS // Special handling of predefined method types. Eg, .x(), .y(), ... @@ -121,22 +122,27 @@ static int driverTokenType const word& ident ) { + #ifdef HAS_LOOKBEHIND_TOKENS + // Get stashed "look-behind" to decide what type of identifier we expect + #endif + // Field variables #ifdef TOK_SCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isLocalVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isLocalVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SCALAR_ID, scalar); - checkFieldToken(TOK_VECTOR_ID, vector); - checkFieldToken(TOK_SYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_TENSOR_ID, tensor); - // Not tested: checkFieldToken(TOK_BOOL_ID, bool); + doLocalCode(TOK_SCALAR_ID, scalar); + doLocalCode(TOK_VECTOR_ID, vector); + doLocalCode(TOK_SYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_TENSOR_ID, tensor); + // Not tested: doLocalCode(TOK_BOOL_ID, bool); + #undef doLocalCode } #endif @@ -156,7 +162,15 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); @@ -165,15 +179,18 @@ static int driverTokenType write data; action emit_number { + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -187,15 +204,16 @@ static int driverTokenType } action emit_ident { + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } action emit_method { // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); } @@ -213,7 +231,7 @@ static int driverTokenType number => emit_number; ## Operators - '!' =>{ EMIT_TOKEN(NOT); }; + '!' =>{ EMIT_TOKEN(LNOT); }; '%' =>{ EMIT_TOKEN(PERCENT); }; '(' =>{ EMIT_TOKEN(LPAREN); }; ')' =>{ EMIT_TOKEN(RPAREN); }; @@ -234,7 +252,7 @@ static int driverTokenType '&&' =>{ EMIT_TOKEN(LAND); }; '||' =>{ EMIT_TOKEN(LOR); }; '&' =>{ EMIT_TOKEN(BIT_AND); }; -## Not needed? '|' =>{ EMIT_TOKEN(BIT_OK); }; +## Not needed? '|' =>{ EMIT_TOKEN(BIT_OR); }; '^' =>{ EMIT_TOKEN(BIT_XOR); }; ## Some '.method' - Error if unknown @@ -286,13 +304,16 @@ static int driverTokenType "sphericalTensor" =>{ EMIT_TOKEN(SPH_TENSOR); }; ## Single value (constants, etc) - "Zero" =>{ EMIT_TOKEN(ZERO); }; "true" =>{ EMIT_TOKEN(LTRUE); }; "false" =>{ EMIT_TOKEN(LFALSE); }; + "Zero" =>{ EMIT_TOKEN(ZERO); }; + "vector::x" =>{ EMIT_VECTOR_TOKEN(1,0,0); }; + "vector::y" =>{ EMIT_VECTOR_TOKEN(0,1,0); }; + "vector::z" =>{ EMIT_VECTOR_TOKEN(0,0,1); }; "tensor::I" =>{ EMIT_TOKEN(IDENTITY_TENSOR); }; "arg" =>{ EMIT_TOKEN(ARG); }; -## "time" =>{ EMIT_TOKEN(TIME); }; -## "deltaT" =>{ EMIT_TOKEN(DELTA_T); }; + "time" =>{ EMIT_TOKEN(TIME); }; + "deltaT" =>{ EMIT_TOKEN(DELTA_T); }; ## Identifier (field, etc - error if unknown) ## Handle 'bare' names and single/double quoted ones @@ -321,8 +342,7 @@ Foam::expressions::fieldExpr::scanner::~scanner() bool Foam::expressions::fieldExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -339,8 +359,8 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -353,10 +373,11 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_method bool Foam::expressions::fieldExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -381,12 +402,12 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -396,17 +417,28 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -414,8 +446,9 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -447,12 +480,13 @@ bool Foam::expressions::fieldExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -515,9 +549,6 @@ bool Foam::expressions::fieldExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -547,7 +578,7 @@ bool Foam::expressions::fieldExpr::scanner::process } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) diff --git a/src/OpenFOAM/expressions/scanToken/exprScanToken.C b/src/OpenFOAM/expressions/scanToken/exprScanToken.C new file mode 100644 index 00000000000..63d6f87f8cd --- /dev/null +++ b/src/OpenFOAM/expressions/scanToken/exprScanToken.C @@ -0,0 +1,92 @@ +/*--------------------------------*- C++ -*----------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "exprScanToken.H" + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +Foam::expressions::scanToken Foam::expressions::scanToken::null() +{ + scanToken tok; + tok.type_ = LABEL; + tok.labelValue = 0; + + return tok; +} + + +void Foam::expressions::scanToken::destroy() +{ + if (type_ == VECTOR) + { + delete vectorPtr; + vectorPtr = nullptr; + } + else if (type_ == WORD) + { + delete wordPtr; + wordPtr = nullptr; + } +} + + +void Foam::expressions::scanToken::setLabel(label val) +{ + type_ = LABEL; + labelValue = val; +} + + +void Foam::expressions::scanToken::setScalar(scalar val) +{ + type_ = SCALAR; + scalarValue = val; +} + + +void Foam::expressions::scanToken::setVector(scalar x, scalar y, scalar z) +{ + type_ = VECTOR; + vectorPtr = new Foam::vector(x, y, z); +} + + +void Foam::expressions::scanToken::setVector(const vector& val) +{ + type_ = VECTOR; + vectorPtr = new Foam::vector(val); +} + + +void Foam::expressions::scanToken::setWord(const word& val) +{ + type_ = WORD; + wordPtr = new Foam::word(val); +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/expressions/scanToken/exprScanToken.H b/src/OpenFOAM/expressions/scanToken/exprScanToken.H new file mode 100644 index 00000000000..5bdf2f6357c --- /dev/null +++ b/src/OpenFOAM/expressions/scanToken/exprScanToken.H @@ -0,0 +1,116 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | www.openfoam.com + \\/ M anipulation | +------------------------------------------------------------------------------- + Copyright (C) 2019-2021 OpenCFD Ltd. +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::expressions::scanToken + +Description + A low-level input/scan token content. + No defined constructors/destructors. + All memory management is manual! + +\*---------------------------------------------------------------------------*/ + +#ifndef expressions_scanToken_H +#define expressions_scanToken_H + +#include "scalar.H" +#include "vector.H" +#include "word.H" + +namespace Foam +{ +namespace expressions +{ + +/*---------------------------------------------------------------------------*\ + Class scanToken Declaration +\*---------------------------------------------------------------------------*/ + +struct scanToken +{ + //- Tagged union types + enum tokenType : unsigned char + { + LABEL = 0, + SCALAR, + VECTOR, + WORD + }; + + + // Data + + //- The data content (as a union). + // For memory alignment have this appear as the first member. + union + { + Foam::label labelValue; + Foam::scalar scalarValue; + Foam::vector* vectorPtr; + Foam::word* wordPtr; + Foam::word* name_; + }; + + //- The token type + tokenType type_; + + + // Member Functions + + //- Return a null token - in lieu of a default constructor + static scanToken null(); + + //- Assign type/value to be LABEL. Does not call destroy(). + void setLabel(label val); + + //- Assign type/value to be SCALAR. Does not call destroy(). + void setScalar(scalar val); + + //- Assign type/value to be VECTOR. Does not call destroy(). + void setVector(scalar x, scalar y, scalar z); + + //- Assign type/value to be VECTOR. Does not call destroy(). + void setVector(const vector& val); + + //- Assign type/value to be WORD (name). Does not call destroy(). + void setWord(const word& val); + + //- Manual deletion of pointer types + void destroy(); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace expressions +} // End namespace Foam + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/include/m4/bison/named-characters.m4 b/src/OpenFOAM/include/m4/bison/named-characters.m4 index 62f6ebdefda..57d9858a983 100644 --- a/src/OpenFOAM/include/m4/bison/named-characters.m4 +++ b/src/OpenFOAM/include/m4/bison/named-characters.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Named versions (as m4 macros) of single quoted characters to avoid diff --git a/src/OpenFOAM/include/m4/lemon/base-setup.m4 b/src/OpenFOAM/include/m4/lemon/base-setup.m4 index 6324a2419db..5942e5a4cf4 100644 --- a/src/OpenFOAM/include/m4/lemon/base-setup.m4 +++ b/src/OpenFOAM/include/m4/lemon/base-setup.m4 @@ -6,11 +6,10 @@ divert(-1)dnl # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------ -# Copyright (C) 2019 OpenCFD Ltd. +# Copyright (C) 2019-2021 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # A collection of 'base' setup of m4 macros for lemon, and setup @@ -34,7 +33,7 @@ divert(-1)dnl # _sphTensor_, _symTensor_, _tensor_ # # Values for the currently targeted rule -# _target_, _value_type_ +# _target_, _value_type_, _scalar_arg_ # # Note # The `undefine' occur immediately upon inclusion of this file. @@ -109,18 +108,19 @@ Foam::tmp<T> make_tmp(T* p) //- Default [make_obj] is pass-through template<class T> -const T& make_obj(const T& obj) +const T& make_obj(const T& o) noexcept { - return obj; + return o; } //- Move construct an object from a pointer and destroy the pointer template<class T> -T make_obj(T* p) +T make_obj(T*& p) { - T obj(std::move(*p)); + T o(std::move(*p)); delete p; - return obj; + p = nullptr; // Prevent caller from deleting too + return o; }] ) @@ -149,6 +149,7 @@ undefine([_tensor_]) undefine([_target_]) undefine([_value_type_]) +undefine([_scalar_arg_]) #------------------------------------------------------------------------------ divert(0)dnl diff --git a/src/OpenFOAM/include/m4/lemon/operator-precedence.m4 b/src/OpenFOAM/include/m4/lemon/operator-precedence.m4 index a8e1baa6980..33d317f45fc 100644 --- a/src/OpenFOAM/include/m4/lemon/operator-precedence.m4 +++ b/src/OpenFOAM/include/m4/lemon/operator-precedence.m4 @@ -6,11 +6,10 @@ divert(-1)dnl # \\ / A nd | www.openfoam.com # \\/ M anipulation | #------------------------------------------------------------------------------ -# Copyright (C) 2019 OpenCFD Ltd. +# Copyright (C) 2019-2021 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Defines standard operator precedence macro for lemon grammar. @@ -20,18 +19,34 @@ divert(-1)dnl define([operator_precedence], [// [https://en.cppreference.com/w/cpp/language/operator_precedence] -%right QUESTION COLON . // 16: right-to-left -%left LOR . // 15: -%left LAND . // 14: -// %left BIT_OR . // 13 (unused) -%left BIT_XOR . // 12 -%left BIT_AND . // 11 -%left EQUAL NOT_EQUAL . // 10 -%left LESS_EQ GREATER_EQ LESS GREATER . // 9 -%left PLUS MINUS . // 6 -%left TIMES DIVIDE PERCENT . // 5 -%right NEGATE NOT . // 3: right-to-left -%left DOT . // 2: (method)] +%right QUESTION COLON . // 13: right-to-left +%left LOR . // 12: +%left LAND . // 11: +%left BIT_OR . // 10 (unused) +%left BIT_XOR . // 9 +%left BIT_AND . // 8 +%left EQUAL NOT_EQUAL . // 7 +%left LESS LESS_EQ GREATER GREATER_EQ . // 6 +%left PLUS MINUS . // 4 +%left TIMES DIVIDE PERCENT . // 3 +%right NEGATE LNOT BIT_NOT . // 2: right-to-left +%left DOT . // 1: (method)] +) + + +define([standard_tokens], +[// Standard tokens for operators, constants and common types] +%token + LPAREN RPAREN COMMA + QUESTION COLON LOR LAND LNOT + BIT_OR BIT_XOR BIT_AND BIT_NOT + EQUAL NOT_EQUAL + LESS LESS_EQ GREATER GREATER_EQ + PLUS MINUS TIMES DIVIDE PERCENT + NEGATE DOT + BOOL LTRUE LFALSE + NUMBER ZERO IDENTIFIER +. ) #------------------------------------------------------------------------------ diff --git a/src/OpenFOAM/include/m4/lemon/parser-methods.m4 b/src/OpenFOAM/include/m4/lemon/parser-methods.m4 index 3fda03d3954..521bca03087 100644 --- a/src/OpenFOAM/include/m4/lemon/parser-methods.m4 +++ b/src/OpenFOAM/include/m4/lemon/parser-methods.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Various "boilerplate" parser methods (C++) diff --git a/src/OpenFOAM/include/m4/lemon/rules-components.m4 b/src/OpenFOAM/include/m4/lemon/rules-components.m4 index f39704f1e0a..7f98389b546 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-components.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-components.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Collection of VectorSpace `component' functions diff --git a/src/OpenFOAM/include/m4/lemon/rules-fields-components.m4 b/src/OpenFOAM/include/m4/lemon/rules-fields-components.m4 index 3aa67c0e3a7..93bcd77fc3b 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-fields-components.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-fields-components.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Rules for vector/tensor `zip' functions, which are used to combine diff --git a/src/OpenFOAM/include/m4/lemon/rules-fields.m4 b/src/OpenFOAM/include/m4/lemon/rules-fields.m4 index 2f2faf2169f..2b0f4396a6f 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-fields.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-fields.m4 @@ -62,39 +62,20 @@ define([_get_]$1, [driver->$5<$3>($][1).ptr()])dnl # Example # rule_get_field(sfield, SCALAR_ID) # -# sfield (lhs) ::= SCALAR_ID (ident) . +# sfield (lhs) ::= SCALAR_ID (name) . # { -# lhs = driver->getVolField<Foam::scalar>(make_obj(ident->name)).ptr(); +# lhs = driver->getVolField<Foam::scalar>(make_obj(name.name_)).ptr(); # } #------------------------------------------------------------------------------ define([rule_get_field], -[$1 (lhs) ::= $2 (ident) . +[$1 (lhs) ::= $2 (name) . { - lhs = _get_$1(make_obj(ident->name)); + lhs = _get_$1(make_obj(name.name_)); }] ) -#------------------------------------------------------------------------------ -# rule_driver_select(out, tok, method) -# -# Description -# Production rule for driver get cell/face/point selection methods -# -# Example -# rule_driver_select(sfield, CSET, field_cellSet) -# -# sfield (lhs) ::= CSET LPAREN IDENTIFIER (ident) RPAREN . -# { -# lhs = driver->field_cellSet(make_obj(ident->name)).ptr(); -# } -#------------------------------------------------------------------------------ - -define([rule_driver_select], -[rule_driver_unary_named($1, $2, IDENTIFIER, $3)]) - - #------------------------------------------------------------------------------ # rule_field_from_value(out, in, [prefix]) # @@ -454,19 +435,19 @@ ifelse($5,[],[],[<$5>])dnl # Optional template parameter (value_type) # Foam::scalar # ) # -# sfield(lhs) ::= SN_GRAD LPAREN SCALAR_ID (ident) RPAREN . +# sfield(lhs) ::= SN_GRAD LPAREN SCALAR_ID (name) RPAREN . # { -# lhs = driver->patchNormalField<Foam::scalar>(make_obj(ident->name)).ptr(); +# lhs = driver->patchNormalField<Foam::scalar>(make_obj(name.name_)).ptr(); # } # #------------------------------------------------------------------------------ define([rule_driver_unary_named], -[$1 (lhs) ::= $2 LPAREN $3 (ident) RPAREN . +[$1 (lhs) ::= $2 LPAREN $3 (name) RPAREN . { lhs = driver->$4[]dnl # The method call ifelse($5,[],[],[<$5>])dnl # Optional template parameter (value_type) -(make_obj(ident->name)).ptr(); +(make_obj(name.name_)).ptr(); }] ) diff --git a/src/OpenFOAM/include/m4/lemon/rules-functions.m4 b/src/OpenFOAM/include/m4/lemon/rules-functions.m4 index 57d5c429bf7..c59c38bb348 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-functions.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-functions.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Collection of `standard' functions and type-specific ones. diff --git a/src/OpenFOAM/include/m4/lemon/rules-operations.m4 b/src/OpenFOAM/include/m4/lemon/rules-operations.m4 index a1297a34ff5..7c68751b6ad 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-operations.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-operations.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Collection of `standard' operations and type-specific ones. diff --git a/src/OpenFOAM/include/m4/lemon/rules-scalar-logic.m4 b/src/OpenFOAM/include/m4/lemon/rules-scalar-logic.m4 index 60861e2805f..34329308b29 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-scalar-logic.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-scalar-logic.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Logic rules, using bool or Foam::scalar for its storage. @@ -98,7 +97,7 @@ define([rule_logical_or], ) define([rule_logical_negate], -[$1 (lhs) ::= NOT $1 (a). _lemon_precedence(NEGATE) +[$1 (lhs) ::= LNOT $1 (a). _lemon_precedence(NEGATE) { lhs = a; Foam::FieldOps::assign diff --git a/src/OpenFOAM/include/m4/lemon/rules-standard.m4 b/src/OpenFOAM/include/m4/lemon/rules-standard.m4 index f88ce9fc001..153be7f19c0 100644 --- a/src/OpenFOAM/include/m4/lemon/rules-standard.m4 +++ b/src/OpenFOAM/include/m4/lemon/rules-standard.m4 @@ -9,8 +9,7 @@ divert(-1)dnl # Copyright (C) 2019 OpenCFD Ltd. #------------------------------------------------------------------------------ # License -# This file is part of OpenFOAM, distributed under GNU General Public -# License GPL-3.0 or later <https://www.gnu.org/licenses/gpl-3.0> +# This file is part of OpenFOAM, distributed under GPL-3.0-or-later. # # Description # Collection of common functions that should work on all (non-logical) diff --git a/src/finiteVolume/expressions/patch/patchExprFwd.H b/src/finiteVolume/expressions/patch/patchExprFwd.H index cd04bcbf6ca..bb1a8bd6aff 100644 --- a/src/finiteVolume/expressions/patch/patchExprFwd.H +++ b/src/finiteVolume/expressions/patch/patchExprFwd.H @@ -47,7 +47,6 @@ namespace patchExpr class parser; class scanner; class parseDriver; -union scanToken; //- Static debugging option extern int debug; diff --git a/src/finiteVolume/expressions/patch/patchExprLemonParser.h b/src/finiteVolume/expressions/patch/patchExprLemonParser.h index c57d09d1190..a011499f5ad 100644 --- a/src/finiteVolume/expressions/patch/patchExprLemonParser.h +++ b/src/finiteVolume/expressions/patch/patchExprLemonParser.h @@ -1,115 +1,125 @@ -#define TOK_QUESTION 1 -#define TOK_COLON 2 -#define TOK_LOR 3 -#define TOK_LAND 4 -#define TOK_BIT_XOR 5 -#define TOK_BIT_AND 6 -#define TOK_EQUAL 7 -#define TOK_NOT_EQUAL 8 -#define TOK_LESS_EQ 9 -#define TOK_GREATER_EQ 10 -#define TOK_LESS 11 -#define TOK_GREATER 12 -#define TOK_PLUS 13 -#define TOK_MINUS 14 -#define TOK_TIMES 15 -#define TOK_DIVIDE 16 -#define TOK_PERCENT 17 -#define TOK_NEGATE 18 -#define TOK_NOT 19 -#define TOK_DOT 20 -#define TOK_NUMBER 21 -#define TOK_ZERO 22 -#define TOK_PI 23 -#define TOK_LPAREN 24 -#define TOK_RPAREN 25 -#define TOK_DEG_TO_RAD 26 -#define TOK_RAD_TO_DEG 27 -#define TOK_ARG 28 -#define TOK_TIME 29 -#define TOK_DELTA_T 30 -#define TOK_SCALAR_ID 31 -#define TOK_SSCALAR_ID 32 -#define TOK_INTERNAL_FIELD 33 -#define TOK_NEIGHBOUR_FIELD 34 -#define TOK_SN_GRAD 35 -#define TOK_MIN 36 -#define TOK_COMMA 37 -#define TOK_MAX 38 -#define TOK_SUM 39 -#define TOK_AVERAGE 40 -#define TOK_EXP 41 -#define TOK_LOG 42 -#define TOK_LOG10 43 -#define TOK_SQR 44 -#define TOK_SQRT 45 -#define TOK_CBRT 46 -#define TOK_SIN 47 -#define TOK_COS 48 -#define TOK_TAN 49 -#define TOK_ASIN 50 -#define TOK_ACOS 51 -#define TOK_ATAN 52 -#define TOK_SINH 53 -#define TOK_COSH 54 -#define TOK_TANH 55 -#define TOK_POW 56 -#define TOK_ATAN2 57 -#define TOK_POS 58 -#define TOK_NEG 59 -#define TOK_POS0 60 -#define TOK_NEG0 61 -#define TOK_SIGN 62 -#define TOK_FLOOR 63 -#define TOK_CEIL 64 -#define TOK_ROUND 65 -#define TOK_HYPOT 66 -#define TOK_RAND 67 -#define TOK_VECTOR_ID 68 -#define TOK_SVECTOR_ID 69 -#define TOK_SPH_TENSOR_ID 70 -#define TOK_SSPH_TENSOR_ID 71 -#define TOK_SYM_TENSOR_ID 72 -#define TOK_SSYM_TENSOR_ID 73 -#define TOK_IDENTITY_TENSOR 74 -#define TOK_TENSOR_ID 75 -#define TOK_STENSOR_ID 76 -#define TOK_LTRUE 77 -#define TOK_LFALSE 78 -#define TOK_BOOL 79 -#define TOK_SBOOL_ID 80 -#define TOK_FACE_AREA 81 -#define TOK_FACE_EXPR 82 -#define TOK_WEIGHT_AVERAGE 83 -#define TOK_WEIGHT_SUM 84 -#define TOK_POINT_EXPR 85 -#define TOK_PSCALAR_ID 86 -#define TOK_PVECTOR_ID 87 -#define TOK_PSPH_TENSOR_ID 88 -#define TOK_PSYM_TENSOR_ID 89 -#define TOK_PTENSOR_ID 90 -#define TOK_PBOOL_ID 91 -#define TOK_POINTS 92 -#define TOK_MAG 93 -#define TOK_MAGSQR 94 -#define TOK_VECTOR 95 -#define TOK_TENSOR 96 -#define TOK_SYM_TENSOR 97 -#define TOK_SPH_TENSOR 98 -#define TOK_CMPT_X 99 -#define TOK_CMPT_Y 100 -#define TOK_CMPT_Z 101 -#define TOK_CMPT_XX 102 -#define TOK_CMPT_XY 103 -#define TOK_CMPT_XZ 104 -#define TOK_CMPT_YX 105 -#define TOK_CMPT_YY 106 -#define TOK_CMPT_YZ 107 -#define TOK_CMPT_ZX 108 -#define TOK_CMPT_ZY 109 -#define TOK_CMPT_ZZ 110 -#define TOK_CMPT_II 111 -#define TOK_TRANSPOSE 112 -#define TOK_DIAG 113 -#define TOK_POINT_TO_FACE 114 -#define TOK_FACE_TO_POINT 115 +#define TOK_LPAREN 1 +#define TOK_RPAREN 2 +#define TOK_COMMA 3 +#define TOK_QUESTION 4 +#define TOK_COLON 5 +#define TOK_LOR 6 +#define TOK_LAND 7 +#define TOK_LNOT 8 +#define TOK_BIT_OR 9 +#define TOK_BIT_XOR 10 +#define TOK_BIT_AND 11 +#define TOK_BIT_NOT 12 +#define TOK_EQUAL 13 +#define TOK_NOT_EQUAL 14 +#define TOK_LESS 15 +#define TOK_LESS_EQ 16 +#define TOK_GREATER 17 +#define TOK_GREATER_EQ 18 +#define TOK_PLUS 19 +#define TOK_MINUS 20 +#define TOK_TIMES 21 +#define TOK_DIVIDE 22 +#define TOK_PERCENT 23 +#define TOK_NEGATE 24 +#define TOK_DOT 25 +#define TOK_BOOL 26 +#define TOK_LTRUE 27 +#define TOK_LFALSE 28 +#define TOK_NUMBER 29 +#define TOK_ZERO 30 +#define TOK_IDENTIFIER 31 +#define TOK_PI 32 +#define TOK_DEG_TO_RAD 33 +#define TOK_RAD_TO_DEG 34 +#define TOK_ARG 35 +#define TOK_TIME 36 +#define TOK_DELTA_T 37 +#define TOK_SCALAR_FUNCTION_ID 38 +#define TOK_VECTOR_VALUE 39 +#define TOK_VECTOR_FUNCTION_ID 40 +#define TOK_SCALAR_ID 41 +#define TOK_SSCALAR_ID 42 +#define TOK_INTERNAL_FIELD 43 +#define TOK_NEIGHBOUR_FIELD 44 +#define TOK_SN_GRAD 45 +#define TOK_MIN 46 +#define TOK_MAX 47 +#define TOK_SUM 48 +#define TOK_AVERAGE 49 +#define TOK_EXP 50 +#define TOK_LOG 51 +#define TOK_LOG10 52 +#define TOK_SQR 53 +#define TOK_SQRT 54 +#define TOK_CBRT 55 +#define TOK_SIN 56 +#define TOK_COS 57 +#define TOK_TAN 58 +#define TOK_ASIN 59 +#define TOK_ACOS 60 +#define TOK_ATAN 61 +#define TOK_SINH 62 +#define TOK_COSH 63 +#define TOK_TANH 64 +#define TOK_POW 65 +#define TOK_ATAN2 66 +#define TOK_POS 67 +#define TOK_NEG 68 +#define TOK_POS0 69 +#define TOK_NEG0 70 +#define TOK_SIGN 71 +#define TOK_FLOOR 72 +#define TOK_CEIL 73 +#define TOK_ROUND 74 +#define TOK_HYPOT 75 +#define TOK_RAND 76 +#define TOK_VECTOR_ID 77 +#define TOK_SVECTOR_ID 78 +#define TOK_SPH_TENSOR_ID 79 +#define TOK_SSPH_TENSOR_ID 80 +#define TOK_SYM_TENSOR_ID 81 +#define TOK_SSYM_TENSOR_ID 82 +#define TOK_IDENTITY_TENSOR 83 +#define TOK_TENSOR_ID 84 +#define TOK_STENSOR_ID 85 +#define TOK_SBOOL_ID 86 +#define TOK_CELL_SET 87 +#define TOK_CELL_ZONE 88 +#define TOK_FACE_SET 89 +#define TOK_FACE_ZONE 90 +#define TOK_FACE_AREA 91 +#define TOK_FACE_EXPR 92 +#define TOK_WEIGHT_AVERAGE 93 +#define TOK_WEIGHT_SUM 94 +#define TOK_POINT_EXPR 95 +#define TOK_PSCALAR_ID 96 +#define TOK_PVECTOR_ID 97 +#define TOK_PSPH_TENSOR_ID 98 +#define TOK_PSYM_TENSOR_ID 99 +#define TOK_PTENSOR_ID 100 +#define TOK_PBOOL_ID 101 +#define TOK_POINTS 102 +#define TOK_MAG 103 +#define TOK_MAGSQR 104 +#define TOK_VECTOR 105 +#define TOK_TENSOR 106 +#define TOK_SYM_TENSOR 107 +#define TOK_SPH_TENSOR 108 +#define TOK_CMPT_X 109 +#define TOK_CMPT_Y 110 +#define TOK_CMPT_Z 111 +#define TOK_CMPT_XX 112 +#define TOK_CMPT_XY 113 +#define TOK_CMPT_XZ 114 +#define TOK_CMPT_YX 115 +#define TOK_CMPT_YY 116 +#define TOK_CMPT_YZ 117 +#define TOK_CMPT_ZX 118 +#define TOK_CMPT_ZY 119 +#define TOK_CMPT_ZZ 120 +#define TOK_CMPT_II 121 +#define TOK_TRANSPOSE 122 +#define TOK_DIAG 123 +#define TOK_POINT_TO_FACE 124 +#define TOK_FACE_TO_POINT 125 diff --git a/src/finiteVolume/expressions/patch/patchExprLemonParser.lyy-m4 b/src/finiteVolume/expressions/patch/patchExprLemonParser.lyy-m4 index fe4d6067ef0..0ebd48bc6b3 100644 --- a/src/finiteVolume/expressions/patch/patchExprLemonParser.lyy-m4 +++ b/src/finiteVolume/expressions/patch/patchExprLemonParser.lyy-m4 @@ -42,6 +42,7 @@ Description */ %include { +#include "exprScanToken.H" #include "patchExprDriver.H" #include "patchExprParser.H" #include "patchExprScanner.H" @@ -77,11 +78,8 @@ tmp_management() %token_prefix TOK_ // Terminals -%token_type {Foam::expressions::patchExpr::scanToken*} -// Non-terminals -%type ivalue { Foam::label } -%type svalue { Foam::scalar } -%type ident { Foam::word* } +%token_type {Foam::expressions::scanToken} +%token_destructor { ($$).destroy(); } // Face fields declare_field(lfield, Foam::boolField, bool, newField, getSurfaceField) @@ -104,17 +102,33 @@ declare_field(ptfield, Foam::tensorField, Foam::tensor, newPointField, getPointF // Lemon does not generate a destructor for that. // So do not use Lemon destructors for anything. +standard_tokens() operator_precedence() %start_symbol evaluate // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +/*---------------------------------------------------------------------------*\ + * General Productions +\*---------------------------------------------------------------------------*/ + +%type identifier { Foam::word* } +%destructor identifier { delete($$); $$ = nullptr; } + +identifier (lhs) ::= IDENTIFIER (tok) . +{ + // Take ownership of pointer from scan token + lhs = tok.name_; tok.name_ = nullptr; +} + /*---------------------------------------------------------------------------*\ * Productions (scalar) \*---------------------------------------------------------------------------*/ -svalue (lhs) ::= NUMBER (a) . { lhs = (a)->svalue; } // From scanToken +%type svalue { Foam::scalar } + +svalue (lhs) ::= NUMBER (tok) . { lhs = (tok).scalarValue; } // scanToken svalue (lhs) ::= ZERO . { lhs = Foam::Zero; } svalue (lhs) ::= PI LPAREN RPAREN . { lhs = Foam::constant::mathematical::pi; } svalue (lhs) ::= DEG_TO_RAD LPAREN RPAREN . { lhs = Foam::degToRad(); } @@ -123,6 +137,31 @@ svalue (lhs) ::= ARG LPAREN RPAREN . { lhs = driver->argValue(); } svalue (lhs) ::= TIME LPAREN RPAREN . { lhs = driver->timeValue(); } svalue (lhs) ::= DELTA_T LPAREN RPAREN . { lhs = driver->deltaT(); } +svalue (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = 0; +} + +/*---------------------------------------------------------------------------*\ + * Productions (vector) +\*---------------------------------------------------------------------------*/ + +%type vvalue { Foam::vector* } +%destructor vvalue { delete($$); $$ = nullptr; } + +vvalue (lhs) ::= VECTOR_VALUE (tok) . +{ + // Take ownership of pointer from scan token + lhs = tok.vectorPtr; tok.vectorPtr = nullptr; +} + +vvalue (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = new Foam::vector(0,0,0); +} + /* * * * * * * * * * * * * * * * * Face Fields * * * * * * * * * * * * * * * *\ dnl @@ -138,7 +177,9 @@ dnl /*---------------------------------------------------------------------------*\ * Productions (scalarField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [sfield])dnl +define([_new_target_], [_new_sfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -156,9 +197,9 @@ rules_scalar_operations() rules_scalar_functions() // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but works directly for scalarField rule_binary_func(_target_, _target_, _target_, HYPOT, Foam::hypot) @@ -174,20 +215,30 @@ _target_ (lhs) ::= RAND LPAREN RPAREN. _target_ (lhs) ::= RAND LPAREN NUMBER (seed) RPAREN. { // Call with -ve seed to signal use of time index as seed - lhs = driver->field_rand(std::round(-(seed)->svalue)).ptr(); + lhs = driver->field_rand(std::round(-(seed).scalarValue)).ptr(); +} + +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); } /*---------------------------------------------------------------------------*\ * Productions (vectorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [vfield])dnl +define([_new_target_], [_new_vfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a); } +rule_field_from_value(_target_, vvalue) rule_get_field(_target_, VECTOR_ID) rule_get_field(_target_, SVECTOR_ID) rule_get_patchfields(_target_, _value_type_, VECTOR_ID) @@ -197,11 +248,22 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +// Other functions + +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (sphericalTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [hfield])dnl +define([_new_target_], [_new_hfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -221,7 +283,9 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (symmTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [yfield])dnl +define([_new_target_], [_new_yfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -241,7 +305,9 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (tensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [tfield])dnl +define([_new_target_], [_new_tfield])dnl define([_value_type_], [Foam::tensor])dnl dnl \*---------------------------------------------------------------------------*/ @@ -303,7 +369,9 @@ dnl /*---------------------------------------------------------------------------*\ * Productions (point scalarField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [psfield])dnl +define([_new_target_], [_new_psfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -319,24 +387,34 @@ rules_scalar_operations() rules_scalar_functions() // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but works directly for scalarField rule_binary_func(_target_, _target_, _target_, HYPOT, Foam::hypot) +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (point vectorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [pvfield])dnl +define([_new_target_], [_new_pvfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a, true); /* Point */ } +rule_field_from_value(_target_, vvalue, POINT_EXPR) rule_get_field(_target_, PVECTOR_ID) rules_standard(_target_, _value_type_, _logic_) @@ -344,10 +422,18 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (point sphericalTensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [phfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl @@ -366,6 +452,7 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (point symmTensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [pyfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl @@ -384,6 +471,7 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (point tensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [ptfield])dnl define([_value_type_], [Foam::tensor])dnl dnl @@ -544,13 +632,15 @@ void Foam::expressions::patchExpr::parser::start(parseDriver& driver_) } -void Foam::expressions::patchExpr::parser::parse -( - int tokenId, - scanToken* tokenVal -) +void Foam::expressions::patchExpr::parser::parse(int tokenId) +{ + Parse(lemon_, tokenId, scanToken::null()); +} + + +void Foam::expressions::patchExpr::parser::parse(int tokenId, scanToken tok) { - Parse(lemon_, tokenId, tokenVal); + Parse(lemon_, tokenId, tok); } diff --git a/src/finiteVolume/expressions/patch/patchExprLemonParserMacros.m4 b/src/finiteVolume/expressions/patch/patchExprLemonParserMacros.m4 index 6e77e033c05..1c7eee301a9 100644 --- a/src/finiteVolume/expressions/patch/patchExprLemonParserMacros.m4 +++ b/src/finiteVolume/expressions/patch/patchExprLemonParserMacros.m4 @@ -59,6 +59,27 @@ rule_driver_unary_named($1, SN_GRAD, $3, patchNormalField, $2)dnl define([rules_driver_surface_functions], [dnl +_logic_ (lhs) ::= CELL_SET LPAREN identifier (name) RPAREN .dnl +{dnl + driver->reportFatal("Not implemented: " + make_obj(name)); + lhs = nullptr;dnl +}dnl +_logic_ (lhs) ::= CELL_ZONE LPAREN identifier (name) RPAREN .dnl +{dnl + driver->reportFatal("Not implemented: " + make_obj(name)); + lhs = nullptr;dnl +}dnl +_logic_ (lhs) ::= FACE_SET LPAREN identifier (name) RPAREN .dnl +{dnl + driver->reportFatal("Not implemented: " + make_obj(name)); + lhs = nullptr;dnl +}dnl +_logic_ (lhs) ::= FACE_ZONE LPAREN identifier (name) RPAREN .dnl +{dnl + driver->reportFatal("Not implemented: " + make_obj(name)); + lhs = nullptr;dnl +}dnl +dnl rule_driver_nullary(_scalar_, FACE_AREA, field_faceArea)dnl rule_driver_nullary(_vector_, POS, field_faceCentre)dnl FACE_CENTRE rule_driver_nullary(_vector_, FACE_EXPR, field_areaNormal)dnl diff --git a/src/finiteVolume/expressions/patch/patchExprParser.H b/src/finiteVolume/expressions/patch/patchExprParser.H index 45d4adfbdf9..1a160230c73 100644 --- a/src/finiteVolume/expressions/patch/patchExprParser.H +++ b/src/finiteVolume/expressions/patch/patchExprParser.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,6 +34,7 @@ Description #ifndef expressions_patchExprParser_H #define expressions_patchExprParser_H +#include "exprScanToken.H" #include "patchExprFwd.H" namespace Foam @@ -97,8 +98,11 @@ public: //- Stop parsing, freeing the allocated parser void stop(); - //- Push token/value to parser - void parse(int tokenId, scanToken* tokenVal); + //- Push token type to parser with default token + void parse(int tokenId); + + //- Push token type/value to parser + void parse(int tokenId, scanToken tok); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/expressions/patch/patchExprScanner.H b/src/finiteVolume/expressions/patch/patchExprScanner.H index aa991d41946..d2dfbdf1399 100644 --- a/src/finiteVolume/expressions/patch/patchExprScanner.H +++ b/src/finiteVolume/expressions/patch/patchExprScanner.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,8 +37,8 @@ Note #ifndef expressions_patchExprScanner_H #define expressions_patchExprScanner_H +#include "exprScanToken.H" #include "patchExprFwd.H" -#include "scalar.H" namespace Foam { @@ -47,21 +47,6 @@ namespace expressions namespace patchExpr { -/*---------------------------------------------------------------------------*\ - Class scanToken Declaration -\*---------------------------------------------------------------------------*/ - -union scanToken -{ - Foam::label ivalue; - Foam::scalar svalue; - Foam::word* name; - - //- Default construct, bit-wise zero for union content - scanToken() : ivalue(0) {} -}; - - /*---------------------------------------------------------------------------*\ Class scanner Declaration \*---------------------------------------------------------------------------*/ @@ -83,16 +68,14 @@ class scanner bool dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; //- Dispatch identifier to parser (if possible) or Fatal bool dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; diff --git a/src/finiteVolume/expressions/patch/patchExprScanner.cc b/src/finiteVolume/expressions/patch/patchExprScanner.cc index 4507003dcfe..6b6c37a8601 100644 --- a/src/finiteVolume/expressions/patch/patchExprScanner.cc +++ b/src/finiteVolume/expressions/patch/patchExprScanner.cc @@ -30,6 +30,7 @@ Description \*---------------------------------------------------------------------------*/ +#include "exprScanToken.H" #include "patchExprScanner.H" #include "patchExprDriver.H" #include "patchExprLemonParser.h" @@ -44,7 +45,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -57,9 +57,21 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } #undef HAS_LOOKBEHIND_TOKENS +#ifdef HAS_LOOKBEHIND_TOKENS +// Special handling for these known (stashed) look-back types +static const Enum<int> lookBehindTokenEnums +({ + TOKEN_PAIR("cellZone", CELL_ZONE), TOKEN_PAIR("cellSet", CELL_SET), + TOKEN_PAIR("faceZone", FACE_ZONE), TOKEN_PAIR("faceSet", FACE_SET), + #ifdef TOK_POINT_ZONE + TOKEN_PAIR("pointZone", POINT_ZONE), TOKEN_PAIR("pointSet", POINT_SET), + #endif +}); +#endif + // Special handling of predefined method types. Eg, .x(), .y(), ... static const Enum<int> fieldMethodEnums @@ -178,7 +190,7 @@ static int driverTokenType const word& ident ) { -#if 0 + #if 0 // Get stashed "look-behind" to decide what type of identifier we expect const int lookBehind = driver_.resetStashedTokenId(); @@ -188,12 +200,17 @@ static int driverTokenType switch (lookBehind) { - case TOK_CELL_SET : good = driver_.isCellSet(ident); break; - case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; - case TOK_POINT_SET : good = driver_.isPointSet(ident); break; case TOK_CELL_ZONE : good = driver_.isCellZone(ident); break; + case TOK_CELL_SET : good = driver_.isCellSet(ident); break; + case TOK_FACE_ZONE : good = driver_.isFaceZone(ident); break; + case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; + + #ifdef TOK_POINT_ZONE + // Not yet ready or particularly useful it seems case TOK_POINT_ZONE : good = driver_.isPointZone(ident); break; + case TOK_POINT_SET : good = driver_.isPointSet(ident); break; + #endif } if (good) @@ -209,51 +226,49 @@ static int driverTokenType return -2; // Extra safety } -#endif + #endif // Face variables #ifdef TOK_SSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SSCALAR_ID, scalar); - checkFieldToken(TOK_SVECTOR_ID, vector); - checkFieldToken(TOK_SSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_STENSOR_ID, tensor); - - // Not tested: checkFieldToken(TOK_SBOOL_ID, bool); + doLocalCode(TOK_SSCALAR_ID, scalar); + doLocalCode(TOK_SVECTOR_ID, vector); + doLocalCode(TOK_SSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_STENSOR_ID, tensor); + // Untested: doLocalCode(TOK_SBOOL_ID, bool); + #undef doLocalCode } #endif // Point variables #ifdef TOK_PSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, true)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, true)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_PSCALAR_ID, scalar); - checkFieldToken(TOK_PVECTOR_ID, vector); - checkFieldToken(TOK_PTENSOR_ID, tensor); - checkFieldToken(TOK_PTENSOR_ID, tensor); - checkFieldToken(TOK_PSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_PSPH_TENSOR_ID, sphericalTensor); - - // Not tested: checkFieldToken(TOK_PBOOL_ID, bool); + doLocalCode(TOK_PSCALAR_ID, scalar); + doLocalCode(TOK_PVECTOR_ID, vector); + doLocalCode(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_PSPH_TENSOR_ID, sphericalTensor); + // Untested: doLocalCode(TOK_SBOOL_ID, bool); + #undef doLocalCode } #endif - #undef checkFieldToken - // Check registered fields and/or disk-files { const word fieldType(driver_.getFieldClassName(ident)); @@ -269,7 +284,7 @@ static int driverTokenType return -1; } -} // End anonymous namespace +} // End namespace Foam /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -282,20 +297,28 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); -#line 291 "patchExprScanner.cc" -static const int patchExpr_start = 11; -static const int patchExpr_first_final = 11; +#line 314 "patchExprScanner.cc" +static const int patchExpr_start = 13; +static const int patchExpr_first_final = 13; static const int patchExpr_error = 0; -static const int patchExpr_en_main = 11; +static const int patchExpr_en_main = 13; -#line 436 "patchExprScanner.rl" +#line 466 "patchExprScanner.rl" @@ -315,8 +338,7 @@ Foam::expressions::patchExpr::scanner::~scanner() bool Foam::expressions::patchExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -333,8 +355,8 @@ bool Foam::expressions::patchExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -347,10 +369,11 @@ bool Foam::expressions::patchExpr::scanner::dispatch_method bool Foam::expressions::patchExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -375,12 +398,12 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -390,17 +413,28 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -408,8 +442,9 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -441,12 +476,13 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -509,9 +545,6 @@ bool Foam::expressions::patchExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -527,7 +560,7 @@ bool Foam::expressions::patchExpr::scanner::process // Initialize FSM variables -#line 531 "patchExprScanner.cc" +#line 564 "patchExprScanner.cc" { cs = patchExpr_start; ts = 0; @@ -535,44 +568,49 @@ bool Foam::expressions::patchExpr::scanner::process act = 0; } -#line 666 "patchExprScanner.rl" +#line 706 "patchExprScanner.rl" /* ^^^ FSM initialization here ^^^ */; -#line 543 "patchExprScanner.cc" +#line 576 "patchExprScanner.cc" { if ( p == pe ) goto _test_eof; switch ( cs ) { tr2: -#line 313 "patchExprScanner.rl" +#line 339 "patchExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr4: -#line 313 "patchExprScanner.rl" +#line 339 "patchExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr5: -#line 291 "patchExprScanner.rl" +#line 314 "patchExprScanner.rl" {{p = ((te))-1;}{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -584,103 +622,122 @@ tr5: driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr8: -#line 356 "patchExprScanner.rl" +#line 383 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(EQUAL); }} - goto st11; + goto st13; tr9: -#line 415 "patchExprScanner.rl" +#line 442 "patchExprScanner.rl" {{p = ((te))-1;}{ EMIT_TOKEN(TENSOR); }} - goto st11; + goto st13; tr11: -#line 423 "patchExprScanner.rl" +#line 453 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(IDENTITY_TENSOR); }} - goto st11; + goto st13; tr12: -#line 359 "patchExprScanner.rl" - {te = p+1;{ EMIT_TOKEN(LOR); }} - goto st11; +#line 441 "patchExprScanner.rl" + {{p = ((te))-1;}{ EMIT_TOKEN(VECTOR); }} + goto st13; +tr14: +#line 450 "patchExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(1,0,0); }} + goto st13; +tr15: +#line 451 "patchExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,1,0); }} + goto st13; tr16: -#line 341 "patchExprScanner.rl" +#line 452 "patchExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,0,1); }} + goto st13; +tr17: +#line 386 "patchExprScanner.rl" + {te = p+1;{ EMIT_TOKEN(LOR); }} + goto st13; +tr21: +#line 368 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PERCENT); }} - goto st11; -tr19: -#line 342 "patchExprScanner.rl" + goto st13; +tr24: +#line 369 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LPAREN); }} - goto st11; -tr20: -#line 343 "patchExprScanner.rl" + goto st13; +tr25: +#line 370 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(RPAREN); }} - goto st11; -tr21: -#line 344 "patchExprScanner.rl" + goto st13; +tr26: +#line 371 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(TIMES); }} - goto st11; -tr22: -#line 345 "patchExprScanner.rl" + goto st13; +tr27: +#line 372 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PLUS); }} - goto st11; -tr23: -#line 347 "patchExprScanner.rl" + goto st13; +tr28: +#line 374 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COMMA); }} - goto st11; -tr24: -#line 346 "patchExprScanner.rl" + goto st13; +tr29: +#line 373 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(MINUS); }} - goto st11; -tr26: -#line 349 "patchExprScanner.rl" + goto st13; +tr31: +#line 376 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(DIVIDE); }} - goto st11; -tr28: -#line 351 "patchExprScanner.rl" + goto st13; +tr33: +#line 378 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COLON); }} - goto st11; -tr32: -#line 350 "patchExprScanner.rl" + goto st13; +tr37: +#line 377 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(QUESTION); }} - goto st11; -tr35: -#line 362 "patchExprScanner.rl" + goto st13; +tr40: +#line 389 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(BIT_XOR); }} - goto st11; -tr53: -#line 335 "patchExprScanner.rl" + goto st13; +tr58: +#line 362 "patchExprScanner.rl" {te = p;p--;} - goto st11; -tr54: -#line 340 "patchExprScanner.rl" - {te = p;p--;{ EMIT_TOKEN(NOT); }} - goto st11; -tr55: -#line 357 "patchExprScanner.rl" + goto st13; +tr59: +#line 367 "patchExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(LNOT); }} + goto st13; +tr60: +#line 384 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(NOT_EQUAL); }} - goto st11; -tr56: -#line 360 "patchExprScanner.rl" + goto st13; +tr61: +#line 387 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(BIT_AND); }} - goto st11; -tr57: -#line 358 "patchExprScanner.rl" + goto st13; +tr62: +#line 385 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LAND); }} - goto st11; -tr58: -#line 348 "patchExprScanner.rl" + goto st13; +tr63: +#line 375 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(DOT); }} - goto st11; -tr61: -#line 291 "patchExprScanner.rl" + goto st13; +tr66: +#line 314 "patchExprScanner.rl" {te = p;p--;{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -692,41 +749,42 @@ tr61: driver_.parsePosition() = (p-buf); }} - goto st11; -tr63: -#line 319 "patchExprScanner.rl" + goto st13; +tr68: +#line 346 "patchExprScanner.rl" {te = p;p--;{ // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr64: -#line 352 "patchExprScanner.rl" + goto st13; +tr69: +#line 379 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LESS); }} - goto st11; -tr65: -#line 353 "patchExprScanner.rl" + goto st13; +tr70: +#line 380 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LESS_EQ); }} - goto st11; -tr66: -#line 354 "patchExprScanner.rl" + goto st13; +tr71: +#line 381 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(GREATER); }} - goto st11; -tr67: -#line 355 "patchExprScanner.rl" + goto st13; +tr72: +#line 382 "patchExprScanner.rl" {te = p+1;{ EMIT_TOKEN(GREATER_EQ); }} - goto st11; -tr68: -#line 313 "patchExprScanner.rl" + goto st13; +tr73: +#line 339 "patchExprScanner.rl" {te = p;p--;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr70: + goto st13; +tr75: #line 1 "NONE" { switch( act ) { case 26: @@ -816,9 +874,6 @@ tr70: case 63: {{p = ((te))-1;} EMIT_TOKEN(BOOL); } break; - case 64: - {{p = ((te))-1;} EMIT_TOKEN(VECTOR); } - break; case 66: {{p = ((te))-1;} EMIT_TOKEN(SYM_TENSOR); } break; @@ -826,154 +881,159 @@ tr70: {{p = ((te))-1;} EMIT_TOKEN(SPH_TENSOR); } break; case 68: - {{p = ((te))-1;} EMIT_TOKEN(ZERO); } + {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } break; case 69: - {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } + {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } break; case 70: - {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } + {{p = ((te))-1;} EMIT_TOKEN(ZERO); } break; - case 72: + case 75: {{p = ((te))-1;} EMIT_TOKEN(ARG); } break; - case 73: + case 76: {{p = ((te))-1;} EMIT_TOKEN(TIME); } break; - case 74: + case 77: {{p = ((te))-1;} EMIT_TOKEN(DELTA_T); } break; - case 75: + case 78: {{p = ((te))-1;} + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } break; } } - goto st11; -tr86: -#line 384 "patchExprScanner.rl" + goto st13; +tr91: +#line 411 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(ATAN); }} - goto st11; -tr101: -#line 380 "patchExprScanner.rl" + goto st13; +tr106: +#line 407 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(COS); }} - goto st11; -tr134: -#line 373 "patchExprScanner.rl" + goto st13; +tr139: +#line 400 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LOG); }} - goto st11; -tr141: -#line 389 "patchExprScanner.rl" + goto st13; +tr146: +#line 416 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(MAG); }} - goto st11; -tr149: -#line 393 "patchExprScanner.rl" + goto st13; +tr154: +#line 420 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(NEG); }} - goto st11; -tr166: -#line 392 "patchExprScanner.rl" + goto st13; +tr171: +#line 419 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(POS); }} - goto st11; -tr186: -#line 379 "patchExprScanner.rl" + goto st13; +tr191: +#line 406 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SIN); }} - goto st11; -tr206: -#line 376 "patchExprScanner.rl" + goto st13; +tr211: +#line 403 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SQR); }} - goto st11; -tr222: -#line 381 "patchExprScanner.rl" + goto st13; +tr227: +#line 408 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TAN); }} - goto st11; -tr228: -#line 415 "patchExprScanner.rl" + goto st13; +tr233: +#line 442 "patchExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TENSOR); }} - goto st11; -st11: + goto st13; +tr244: +#line 441 "patchExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(VECTOR); }} + goto st13; +st13: #line 1 "NONE" {ts = 0;} if ( ++p == pe ) - goto _test_eof11; -case 11: + goto _test_eof13; +case 13: #line 1 "NONE" {ts = p;} -#line 905 "patchExprScanner.cc" +#line 965 "patchExprScanner.cc" switch( (*p) ) { - case 32: goto st12; - case 33: goto st13; + case 32: goto st14; + case 33: goto st15; case 34: goto st1; - case 37: goto tr16; - case 38: goto st14; + case 37: goto tr21; + case 38: goto st16; case 39: goto st3; - case 40: goto tr19; - case 41: goto tr20; - case 42: goto tr21; - case 43: goto tr22; - case 44: goto tr23; - case 45: goto tr24; - case 46: goto st15; - case 47: goto tr26; - case 58: goto tr28; - case 60: goto st20; + case 40: goto tr24; + case 41: goto tr25; + case 42: goto tr26; + case 43: goto tr27; + case 44: goto tr28; + case 45: goto tr29; + case 46: goto st17; + case 47: goto tr31; + case 58: goto tr33; + case 60: goto st22; case 61: goto st7; - case 62: goto st21; - case 63: goto tr32; - case 90: goto st24; - case 94: goto tr35; - case 95: goto st22; - case 97: goto st27; - case 98: goto st41; - case 99: goto st44; - case 100: goto st49; - case 101: goto st59; - case 102: goto st61; - case 105: goto st65; - case 108: goto st77; - case 109: goto st81; - case 110: goto st87; - case 112: goto st101; - case 114: goto st104; - case 115: goto st112; - case 116: goto st144; - case 118: goto st156; - case 119: goto st161; - case 124: goto st10; + case 62: goto st23; + case 63: goto tr37; + case 90: goto st26; + case 94: goto tr40; + case 95: goto st24; + case 97: goto st29; + case 98: goto st43; + case 99: goto st46; + case 100: goto st51; + case 101: goto st61; + case 102: goto st63; + case 105: goto st67; + case 108: goto st79; + case 109: goto st83; + case 110: goto st89; + case 112: goto st103; + case 114: goto st106; + case 115: goto st114; + case 116: goto st146; + case 118: goto st158; + case 119: goto st164; + case 124: goto st12; } if ( (*p) < 48 ) { if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; + goto st14; } else if ( (*p) > 57 ) { if ( (*p) > 89 ) { if ( 103 <= (*p) && (*p) <= 122 ) - goto st22; + goto st24; } else if ( (*p) >= 65 ) - goto st22; + goto st24; } else - goto tr27; + goto tr32; goto st0; st0: cs = 0; goto _out; -st12: +st14: if ( ++p == pe ) - goto _test_eof12; -case 12: + goto _test_eof14; +case 14: if ( (*p) == 32 ) - goto st12; + goto st14; if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; - goto tr53; -st13: + goto st14; + goto tr58; +st15: if ( ++p == pe ) - goto _test_eof13; -case 13: + goto _test_eof15; +case 15: if ( (*p) == 61 ) - goto tr55; - goto tr54; + goto tr60; + goto tr59; st1: if ( ++p == pe ) goto _test_eof1; @@ -988,13 +1048,13 @@ case 2: if ( (*p) == 34 ) goto tr2; goto st2; -st14: +st16: if ( ++p == pe ) - goto _test_eof14; -case 14: + goto _test_eof16; +case 16: if ( (*p) == 38 ) - goto tr57; - goto tr56; + goto tr62; + goto tr61; st3: if ( ++p == pe ) goto _test_eof3; @@ -1009,35 +1069,35 @@ case 4: if ( (*p) == 39 ) goto tr4; goto st4; -st15: +st17: if ( ++p == pe ) - goto _test_eof15; -case 15: + goto _test_eof17; +case 17: if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr59; + goto tr64; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else - goto st18; - goto tr58; -tr59: + goto st20; + goto tr63; +tr64: #line 1 "NONE" {te = p+1;} - goto st16; -st16: + goto st18; +st18: if ( ++p == pe ) - goto _test_eof16; -case 16: -#line 1034 "patchExprScanner.cc" + goto _test_eof18; +case 18: +#line 1094 "patchExprScanner.cc" switch( (*p) ) { case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr59; - goto tr61; + goto tr64; + goto tr66; st5: if ( ++p == pe ) goto _test_eof5; @@ -1047,56 +1107,56 @@ case 5: case 45: goto st6; } if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; st6: if ( ++p == pe ) goto _test_eof6; case 6: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; -st17: +st19: if ( ++p == pe ) - goto _test_eof17; -case 17: + goto _test_eof19; +case 19: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; - goto tr61; -st18: + goto st19; + goto tr66; +st20: if ( ++p == pe ) - goto _test_eof18; -case 18: + goto _test_eof20; +case 20: if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else if ( (*p) >= 65 ) - goto st18; - goto tr63; -tr27: + goto st20; + goto tr68; +tr32: #line 1 "NONE" {te = p+1;} - goto st19; -st19: + goto st21; +st21: if ( ++p == pe ) - goto _test_eof19; -case 19: -#line 1085 "patchExprScanner.cc" + goto _test_eof21; +case 21: +#line 1145 "patchExprScanner.cc" switch( (*p) ) { - case 46: goto tr59; + case 46: goto tr64; case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr27; - goto tr61; -st20: + goto tr32; + goto tr66; +st22: if ( ++p == pe ) - goto _test_eof20; -case 20: + goto _test_eof22; +case 22: if ( (*p) == 61 ) - goto tr65; - goto tr64; + goto tr70; + goto tr69; st7: if ( ++p == pe ) goto _test_eof7; @@ -1104,3068 +1164,3100 @@ case 7: if ( (*p) == 61 ) goto tr8; goto st0; -st21: +st23: if ( ++p == pe ) - goto _test_eof21; -case 21: + goto _test_eof23; +case 23: if ( (*p) == 61 ) - goto tr67; - goto tr66; -st22: + goto tr72; + goto tr71; +st24: if ( ++p == pe ) - goto _test_eof22; -case 22: + goto _test_eof24; +case 24: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; -tr69: + goto tr74; + goto tr73; +tr74: #line 1 "NONE" {te = p+1;} -#line 313 "patchExprScanner.rl" - {act = 75;} - goto st23; -tr73: +#line 339 "patchExprScanner.rl" + {act = 78;} + goto st25; +tr78: #line 1 "NONE" {te = p+1;} -#line 420 "patchExprScanner.rl" - {act = 68;} - goto st23; -tr80: +#line 449 "patchExprScanner.rl" + {act = 70;} + goto st25; +tr85: #line 1 "NONE" {te = p+1;} -#line 383 "patchExprScanner.rl" +#line 410 "patchExprScanner.rl" {act = 40;} - goto st23; -tr81: + goto st25; +tr86: #line 1 "NONE" {te = p+1;} -#line 424 "patchExprScanner.rl" - {act = 72;} - goto st23; -tr83: +#line 454 "patchExprScanner.rl" + {act = 75;} + goto st25; +tr88: #line 1 "NONE" {te = p+1;} -#line 382 "patchExprScanner.rl" +#line 409 "patchExprScanner.rl" {act = 39;} - goto st23; -tr87: + goto st25; +tr92: #line 1 "NONE" {te = p+1;} -#line 385 "patchExprScanner.rl" +#line 412 "patchExprScanner.rl" {act = 42;} - goto st23; -tr92: + goto st25; +tr97: #line 1 "NONE" {te = p+1;} -#line 401 "patchExprScanner.rl" +#line 428 "patchExprScanner.rl" {act = 55;} - goto st23; -tr95: + goto st25; +tr100: #line 1 "NONE" {te = p+1;} -#line 413 "patchExprScanner.rl" +#line 440 "patchExprScanner.rl" {act = 63;} - goto st23; -tr99: + goto st25; +tr104: #line 1 "NONE" {te = p+1;} -#line 378 "patchExprScanner.rl" +#line 405 "patchExprScanner.rl" {act = 35;} - goto st23; -tr102: + goto st25; +tr107: #line 1 "NONE" {te = p+1;} -#line 387 "patchExprScanner.rl" +#line 414 "patchExprScanner.rl" {act = 44;} - goto st23; -tr110: + goto st25; +tr115: #line 1 "NONE" {te = p+1;} -#line 370 "patchExprScanner.rl" +#line 397 "patchExprScanner.rl" {act = 27;} - goto st23; -tr113: + goto st25; +tr118: #line 1 "NONE" {te = p+1;} -#line 426 "patchExprScanner.rl" - {act = 74;} - goto st23; -tr115: +#line 456 "patchExprScanner.rl" + {act = 77;} + goto st25; +tr120: #line 1 "NONE" {te = p+1;} -#line 372 "patchExprScanner.rl" +#line 399 "patchExprScanner.rl" {act = 29;} - goto st23; -tr119: + goto st25; +tr124: #line 1 "NONE" {te = p+1;} -#line 422 "patchExprScanner.rl" - {act = 70;} - goto st23; -tr131: +#line 448 "patchExprScanner.rl" + {act = 69;} + goto st25; +tr136: #line 1 "NONE" {te = p+1;} -#line 409 "patchExprScanner.rl" +#line 436 "patchExprScanner.rl" {act = 61;} - goto st23; -tr136: + goto st25; +tr141: #line 1 "NONE" {te = p+1;} -#line 374 "patchExprScanner.rl" +#line 401 "patchExprScanner.rl" {act = 31;} - goto st23; -tr140: + goto st25; +tr145: #line 1 "NONE" {te = p+1;} -#line 400 "patchExprScanner.rl" +#line 427 "patchExprScanner.rl" {act = 54;} - goto st23; -tr144: + goto st25; +tr149: #line 1 "NONE" {te = p+1;} -#line 390 "patchExprScanner.rl" +#line 417 "patchExprScanner.rl" {act = 47;} - goto st23; -tr145: + goto st25; +tr150: #line 1 "NONE" {te = p+1;} -#line 399 "patchExprScanner.rl" +#line 426 "patchExprScanner.rl" {act = 53;} - goto st23; -tr150: + goto st25; +tr155: #line 1 "NONE" {te = p+1;} -#line 395 "patchExprScanner.rl" +#line 422 "patchExprScanner.rl" {act = 51;} - goto st23; -tr161: + goto st25; +tr166: #line 1 "NONE" {te = p+1;} -#line 410 "patchExprScanner.rl" +#line 437 "patchExprScanner.rl" {act = 62;} - goto st23; -tr162: + goto st25; +tr167: #line 1 "NONE" {te = p+1;} -#line 369 "patchExprScanner.rl" +#line 396 "patchExprScanner.rl" {act = 26;} - goto st23; -tr165: + goto st25; +tr170: #line 1 "NONE" {te = p+1;} -#line 375 "patchExprScanner.rl" +#line 402 "patchExprScanner.rl" {act = 32;} - goto st23; -tr167: + goto st25; +tr172: #line 1 "NONE" {te = p+1;} -#line 394 "patchExprScanner.rl" +#line 421 "patchExprScanner.rl" {act = 50;} - goto st23; -tr175: + goto st25; +tr180: #line 1 "NONE" {te = p+1;} -#line 371 "patchExprScanner.rl" +#line 398 "patchExprScanner.rl" {act = 28;} - goto st23; -tr176: + goto st25; +tr181: #line 1 "NONE" {te = p+1;} -#line 405 "patchExprScanner.rl" +#line 432 "patchExprScanner.rl" {act = 59;} - goto st23; -tr185: + goto st25; +tr190: #line 1 "NONE" {te = p+1;} -#line 396 "patchExprScanner.rl" +#line 423 "patchExprScanner.rl" {act = 52;} - goto st23; -tr187: + goto st25; +tr192: #line 1 "NONE" {te = p+1;} -#line 386 "patchExprScanner.rl" +#line 413 "patchExprScanner.rl" {act = 43;} - goto st23; -tr191: + goto st25; +tr196: #line 1 "NONE" {te = p+1;} -#line 408 "patchExprScanner.rl" +#line 435 "patchExprScanner.rl" {act = 60;} - goto st23; -tr204: + goto st25; +tr209: #line 1 "NONE" {te = p+1;} -#line 417 "patchExprScanner.rl" +#line 444 "patchExprScanner.rl" {act = 67;} - goto st23; -tr207: + goto st25; +tr212: #line 1 "NONE" {te = p+1;} -#line 377 "patchExprScanner.rl" +#line 404 "patchExprScanner.rl" {act = 34;} - goto st23; -tr208: + goto st25; +tr213: #line 1 "NONE" {te = p+1;} -#line 402 "patchExprScanner.rl" +#line 429 "patchExprScanner.rl" {act = 56;} - goto st23; -tr216: + goto st25; +tr221: #line 1 "NONE" {te = p+1;} -#line 416 "patchExprScanner.rl" +#line 443 "patchExprScanner.rl" {act = 66;} - goto st23; -tr223: + goto st25; +tr228: #line 1 "NONE" {te = p+1;} -#line 388 "patchExprScanner.rl" +#line 415 "patchExprScanner.rl" {act = 45;} - goto st23; -tr231: -#line 1 "NONE" - {te = p+1;} -#line 425 "patchExprScanner.rl" - {act = 73;} - goto st23; -tr233: + goto st25; +tr236: #line 1 "NONE" {te = p+1;} -#line 421 "patchExprScanner.rl" - {act = 69;} - goto st23; +#line 455 "patchExprScanner.rl" + {act = 76;} + goto st25; tr238: #line 1 "NONE" {te = p+1;} -#line 414 "patchExprScanner.rl" - {act = 64;} - goto st23; -tr251: +#line 447 "patchExprScanner.rl" + {act = 68;} + goto st25; +tr258: #line 1 "NONE" {te = p+1;} -#line 403 "patchExprScanner.rl" +#line 430 "patchExprScanner.rl" {act = 57;} - goto st23; -tr253: + goto st25; +tr260: #line 1 "NONE" {te = p+1;} -#line 404 "patchExprScanner.rl" +#line 431 "patchExprScanner.rl" {act = 58;} - goto st23; -st23: - if ( ++p == pe ) - goto _test_eof23; -case 23: -#line 1370 "patchExprScanner.cc" - switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; - } else - goto tr69; - goto tr70; -st24: - if ( ++p == pe ) - goto _test_eof24; -case 24: - switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st25; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; - } else - goto tr69; - goto tr68; + goto st25; st25: if ( ++p == pe ) goto _test_eof25; case 25: +#line 1424 "patchExprScanner.cc" switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st26; + case 46: goto tr74; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr75; st26: if ( ++p == pe ) goto _test_eof26; case 26: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto tr73; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st27; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st27: if ( ++p == pe ) goto _test_eof27; case 27: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 99: goto st28; - case 114: goto st30; - case 115: goto st31; - case 116: goto st33; - case 118: goto st36; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st28; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st28: if ( ++p == pe ) goto _test_eof28; case 28: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st29; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto tr78; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st29: if ( ++p == pe ) goto _test_eof29; case 29: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto tr80; + case 46: goto tr74; + case 95: goto tr74; + case 99: goto st30; + case 114: goto st32; + case 115: goto st33; + case 116: goto st35; + case 118: goto st38; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st30: if ( ++p == pe ) goto _test_eof30; case 30: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto tr81; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st31; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st31: if ( ++p == pe ) goto _test_eof31; case 31: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st32; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto tr85; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st32: if ( ++p == pe ) goto _test_eof32; case 32: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto tr83; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto tr86; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st33: if ( ++p == pe ) goto _test_eof33; case 33: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st34; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st34; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st34: if ( ++p == pe ) goto _test_eof34; case 34: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st35; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto tr88; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st35: if ( ++p == pe ) goto _test_eof35; case 35: switch( (*p) ) { - case 46: goto tr69; - case 50: goto tr87; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st36; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr86; + goto tr74; + goto tr73; st36: if ( ++p == pe ) goto _test_eof36; case 36: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st37; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st37; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st37: if ( ++p == pe ) goto _test_eof37; case 37: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st38; + case 46: goto tr74; + case 50: goto tr92; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr91; st38: if ( ++p == pe ) goto _test_eof38; case 38: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st39; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st39; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st39: if ( ++p == pe ) goto _test_eof39; case 39: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st40; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st40; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st40: if ( ++p == pe ) goto _test_eof40; case 40: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto tr92; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st41; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st41: if ( ++p == pe ) goto _test_eof41; case 41: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st42; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st42; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st42: if ( ++p == pe ) goto _test_eof42; case 42: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st43; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto tr97; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st43: if ( ++p == pe ) goto _test_eof43; case 43: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto tr95; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st44; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st44: if ( ++p == pe ) goto _test_eof44; case 44: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 98: goto st45; - case 111: goto st47; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st45; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st45: if ( ++p == pe ) goto _test_eof45; case 45: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st46; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto tr100; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st46: if ( ++p == pe ) goto _test_eof46; case 46: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto tr99; + case 46: goto tr74; + case 95: goto tr74; + case 98: goto st47; + case 111: goto st49; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st47: if ( ++p == pe ) goto _test_eof47; case 47: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st48; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st48; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st48: if ( ++p == pe ) goto _test_eof48; case 48: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto tr102; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto tr104; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr101; + goto tr74; + goto tr73; st49: if ( ++p == pe ) goto _test_eof49; case 49: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st50; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st50; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st50: if ( ++p == pe ) goto _test_eof50; case 50: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st51; - case 108: goto st56; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto tr107; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr106; st51: if ( ++p == pe ) goto _test_eof51; case 51: switch( (*p) ) { - case 46: goto tr69; - case 84: goto st52; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st52; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st52: if ( ++p == pe ) goto _test_eof52; case 52: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st53; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st53; + case 108: goto st58; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st53: if ( ++p == pe ) goto _test_eof53; case 53: switch( (*p) ) { - case 46: goto tr69; - case 82: goto st54; - case 95: goto tr69; + case 46: goto tr74; + case 84: goto st54; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st54: if ( ++p == pe ) goto _test_eof54; case 54: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st55; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st55; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st55: if ( ++p == pe ) goto _test_eof55; case 55: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto tr110; + case 46: goto tr74; + case 82: goto st56; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st56: if ( ++p == pe ) goto _test_eof56; case 56: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto st57; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st57; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st57: if ( ++p == pe ) goto _test_eof57; case 57: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st58; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto tr115; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st58: if ( ++p == pe ) goto _test_eof58; case 58: switch( (*p) ) { - case 46: goto tr69; - case 84: goto tr113; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto st59; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st59: if ( ++p == pe ) goto _test_eof59; case 59: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 120: goto st60; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st60; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st60: if ( ++p == pe ) goto _test_eof60; case 60: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 112: goto tr115; + case 46: goto tr74; + case 84: goto tr118; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st61: if ( ++p == pe ) goto _test_eof61; case 61: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st62; + case 46: goto tr74; + case 95: goto tr74; + case 120: goto st62; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st62: if ( ++p == pe ) goto _test_eof62; case 62: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto st63; + case 46: goto tr74; + case 95: goto tr74; + case 112: goto tr120; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st63: if ( ++p == pe ) goto _test_eof63; case 63: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st64; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st64; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st64: if ( ++p == pe ) goto _test_eof64; case 64: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto tr119; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto st65; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st65: if ( ++p == pe ) goto _test_eof65; case 65: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st66; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st66; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st66: if ( ++p == pe ) goto _test_eof66; case 66: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto st67; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto tr124; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st67: if ( ++p == pe ) goto _test_eof67; case 67: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st68; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st68; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st68: if ( ++p == pe ) goto _test_eof68; case 68: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st69; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto st69; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st69: if ( ++p == pe ) goto _test_eof69; case 69: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st70; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st70; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st70: if ( ++p == pe ) goto _test_eof70; case 70: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st71; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st71; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st71: if ( ++p == pe ) goto _test_eof71; case 71: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto st72; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st72; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st72: if ( ++p == pe ) goto _test_eof72; case 72: switch( (*p) ) { - case 46: goto tr69; - case 70: goto st73; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st73: if ( ++p == pe ) goto _test_eof73; case 73: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st74; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto st74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st74: if ( ++p == pe ) goto _test_eof74; case 74: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st75; + case 46: goto tr74; + case 70: goto st75; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st75: if ( ++p == pe ) goto _test_eof75; case 75: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto st76; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st76; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st76: if ( ++p == pe ) goto _test_eof76; case 76: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto tr131; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st77; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st77: if ( ++p == pe ) goto _test_eof77; case 77: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st78; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto st78; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st78: if ( ++p == pe ) goto _test_eof78; case 78: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st79; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto tr136; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st79: if ( ++p == pe ) goto _test_eof79; case 79: switch( (*p) ) { - case 46: goto tr69; - case 49: goto st80; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st80; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr134; + goto tr74; + goto tr73; st80: if ( ++p == pe ) goto _test_eof80; case 80: switch( (*p) ) { - case 46: goto tr69; - case 48: goto tr136; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st81; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st81: if ( ++p == pe ) goto _test_eof81; case 81: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st82; - case 105: goto st86; + case 46: goto tr74; + case 49: goto st82; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr139; st82: if ( ++p == pe ) goto _test_eof82; case 82: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st83; - case 120: goto tr140; + case 46: goto tr74; + case 48: goto tr141; + case 95: goto tr74; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st83: if ( ++p == pe ) goto _test_eof83; case 83: switch( (*p) ) { - case 46: goto tr69; - case 83: goto st84; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st84; + case 105: goto st88; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr141; + goto tr74; + goto tr73; st84: if ( ++p == pe ) goto _test_eof84; case 84: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 113: goto st85; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st85; + case 120: goto tr145; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st85: if ( ++p == pe ) goto _test_eof85; case 85: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto tr144; + case 46: goto tr74; + case 83: goto st86; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr146; st86: if ( ++p == pe ) goto _test_eof86; case 86: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto tr145; + case 46: goto tr74; + case 95: goto tr74; + case 113: goto st87; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st87: if ( ++p == pe ) goto _test_eof87; case 87: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st88; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto tr149; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st88: if ( ++p == pe ) goto _test_eof88; case 88: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st89; - case 105: goto st90; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto tr150; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st89: if ( ++p == pe ) goto _test_eof89; case 89: switch( (*p) ) { - case 46: goto tr69; - case 48: goto tr150; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st90; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr149; + goto tr74; + goto tr73; st90: if ( ++p == pe ) goto _test_eof90; case 90: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; case 103: goto st91; + case 105: goto st92; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st91: if ( ++p == pe ) goto _test_eof91; case 91: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto st92; + case 46: goto tr74; + case 48: goto tr155; + case 95: goto tr74; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr154; st92: if ( ++p == pe ) goto _test_eof92; case 92: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 98: goto st93; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st93; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st93: if ( ++p == pe ) goto _test_eof93; case 93: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st94; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto st94; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st94: if ( ++p == pe ) goto _test_eof94; case 94: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 117: goto st95; + case 46: goto tr74; + case 95: goto tr74; + case 98: goto st95; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st95: if ( ++p == pe ) goto _test_eof95; case 95: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st96; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st96; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st96: if ( ++p == pe ) goto _test_eof96; case 96: switch( (*p) ) { - case 46: goto tr69; - case 70: goto st97; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 117: goto st97; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st97: if ( ++p == pe ) goto _test_eof97; case 97: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st98; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st98; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st98: if ( ++p == pe ) goto _test_eof98; case 98: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st99; + case 46: goto tr74; + case 70: goto st99; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st99: if ( ++p == pe ) goto _test_eof99; case 99: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto st100; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st100; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st100: if ( ++p == pe ) goto _test_eof100; case 100: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto tr161; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st101; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st101: if ( ++p == pe ) goto _test_eof101; case 101: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto tr162; - case 111: goto st102; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto st102; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st102: if ( ++p == pe ) goto _test_eof102; case 102: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st103; - case 119: goto tr165; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto tr166; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st103: if ( ++p == pe ) goto _test_eof103; case 103: switch( (*p) ) { - case 46: goto tr69; - case 48: goto tr167; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto tr167; + case 111: goto st104; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr166; + goto tr74; + goto tr73; st104: if ( ++p == pe ) goto _test_eof104; case 104: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st105; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st105; + case 119: goto tr170; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st105: if ( ++p == pe ) goto _test_eof105; case 105: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto st106; - case 110: goto st111; + case 46: goto tr74; + case 48: goto tr172; + case 95: goto tr74; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr171; st106: if ( ++p == pe ) goto _test_eof106; case 106: switch( (*p) ) { - case 46: goto tr69; - case 84: goto st107; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st107; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st107: if ( ++p == pe ) goto _test_eof107; case 107: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st108; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto st108; + case 110: goto st113; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st108: if ( ++p == pe ) goto _test_eof108; case 108: switch( (*p) ) { - case 46: goto tr69; - case 68: goto st109; - case 95: goto tr69; + case 46: goto tr74; + case 84: goto st109; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st109: if ( ++p == pe ) goto _test_eof109; case 109: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st110; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st110; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st110: if ( ++p == pe ) goto _test_eof110; case 110: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto tr175; + case 46: goto tr74; + case 68: goto st111; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st111: if ( ++p == pe ) goto _test_eof111; case 111: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto tr176; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st112; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st112: if ( ++p == pe ) goto _test_eof112; case 112: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st113; - case 110: goto st116; - case 112: goto st120; - case 113: goto st133; - case 117: goto st135; - case 121: goto st136; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto tr180; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st113: if ( ++p == pe ) goto _test_eof113; case 113: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st114; - case 110: goto st115; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto tr181; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st114: if ( ++p == pe ) goto _test_eof114; case 114: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto tr185; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st115; + case 110: goto st118; + case 112: goto st122; + case 113: goto st135; + case 117: goto st137; + case 121: goto st138; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st115: if ( ++p == pe ) goto _test_eof115; case 115: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto tr187; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st116; + case 110: goto st117; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr186; + goto tr74; + goto tr73; st116: if ( ++p == pe ) goto _test_eof116; case 116: switch( (*p) ) { - case 46: goto tr69; - case 71: goto st117; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto tr190; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st117: if ( ++p == pe ) goto _test_eof117; case 117: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st118; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto tr192; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr191; st118: if ( ++p == pe ) goto _test_eof118; case 118: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st119; + case 46: goto tr74; + case 71: goto st119; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st119: if ( ++p == pe ) goto _test_eof119; case 119: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 100: goto tr191; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st120; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st120: if ( ++p == pe ) goto _test_eof120; case 120: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto st121; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st121; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st121: if ( ++p == pe ) goto _test_eof121; case 121: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st122; + case 46: goto tr74; + case 95: goto tr74; + case 100: goto tr196; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st122: if ( ++p == pe ) goto _test_eof122; case 122: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st123; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto st123; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st123: if ( ++p == pe ) goto _test_eof123; case 123: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st124; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st124; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st124: if ( ++p == pe ) goto _test_eof124; case 124: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 99: goto st125; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st125; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st125: if ( ++p == pe ) goto _test_eof125; case 125: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st126; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st126; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st126: if ( ++p == pe ) goto _test_eof126; case 126: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 108: goto st127; + case 46: goto tr74; + case 95: goto tr74; + case 99: goto st127; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st127: if ( ++p == pe ) goto _test_eof127; case 127: switch( (*p) ) { - case 46: goto tr69; - case 84: goto st128; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st128; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st128: if ( ++p == pe ) goto _test_eof128; case 128: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st129; + case 46: goto tr74; + case 95: goto tr74; + case 108: goto st129; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st129: if ( ++p == pe ) goto _test_eof129; case 129: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st130; + case 46: goto tr74; + case 84: goto st130; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st130: if ( ++p == pe ) goto _test_eof130; case 130: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st131; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st131; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st131: if ( ++p == pe ) goto _test_eof131; case 131: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st132; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st132; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st132: if ( ++p == pe ) goto _test_eof132; case 132: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto tr204; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st133; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st133: if ( ++p == pe ) goto _test_eof133; case 133: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st134; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st134; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st134: if ( ++p == pe ) goto _test_eof134; case 134: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto tr207; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto tr209; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr206; + goto tr74; + goto tr73; st135: if ( ++p == pe ) goto _test_eof135; case 135: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 109: goto tr208; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st136; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st136: if ( ++p == pe ) goto _test_eof136; case 136: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 109: goto st137; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto tr212; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr211; st137: if ( ++p == pe ) goto _test_eof137; case 137: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 109: goto st138; + case 46: goto tr74; + case 95: goto tr74; + case 109: goto tr213; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st138: if ( ++p == pe ) goto _test_eof138; case 138: switch( (*p) ) { - case 46: goto tr69; - case 84: goto st139; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 109: goto st139; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st139: if ( ++p == pe ) goto _test_eof139; case 139: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st140; + case 46: goto tr74; + case 95: goto tr74; + case 109: goto st140; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st140: if ( ++p == pe ) goto _test_eof140; case 140: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st141; + case 46: goto tr74; + case 84: goto st141; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st141: if ( ++p == pe ) goto _test_eof141; case 141: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st142; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st142; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st142: if ( ++p == pe ) goto _test_eof142; case 142: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st143; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st143; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st143: if ( ++p == pe ) goto _test_eof143; case 143: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto tr216; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st144; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st144: if ( ++p == pe ) goto _test_eof144; case 144: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st145; - case 101: goto st147; - case 105: goto st152; - case 114: goto st154; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st145; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st145: if ( ++p == pe ) goto _test_eof145; case 145: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 110: goto st146; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto tr221; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st146: if ( ++p == pe ) goto _test_eof146; case 146: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto tr223; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st147; + case 101: goto st149; + case 105: goto st154; + case 114: goto st156; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr222; + goto tr74; + goto tr73; st147: if ( ++p == pe ) goto _test_eof147; case 147: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; case 110: goto st148; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st148: if ( ++p == pe ) goto _test_eof148; case 148: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 115: goto st149; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto tr228; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr227; st149: if ( ++p == pe ) goto _test_eof149; case 149: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st150; + case 46: goto tr74; + case 95: goto tr74; + case 110: goto st150; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st150: if ( ++p == pe ) goto _test_eof150; case 150: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto tr227; + case 46: goto tr74; + case 95: goto tr74; + case 115: goto st151; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; -tr227: -#line 1 "NONE" - {te = p+1;} - goto st151; + goto tr74; + goto tr73; st151: if ( ++p == pe ) goto _test_eof151; case 151: -#line 3699 "patchExprScanner.cc" switch( (*p) ) { - case 46: goto tr69; - case 58: goto st8; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st152; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr228; -st8: - if ( ++p == pe ) - goto _test_eof8; -case 8: - if ( (*p) == 58 ) - goto st9; - goto tr9; -st9: - if ( ++p == pe ) - goto _test_eof9; -case 9: - if ( (*p) == 73 ) - goto tr11; - goto tr9; + goto tr74; + goto tr73; st152: if ( ++p == pe ) goto _test_eof152; case 152: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 109: goto st153; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto tr232; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; +tr232: +#line 1 "NONE" + {te = p+1;} + goto st153; st153: if ( ++p == pe ) goto _test_eof153; case 153: +#line 3753 "patchExprScanner.cc" switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto tr231; + case 46: goto tr74; + case 58: goto st8; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr233; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + if ( (*p) == 58 ) + goto st9; + goto tr9; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + if ( (*p) == 73 ) + goto tr11; + goto tr9; st154: if ( ++p == pe ) goto _test_eof154; case 154: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 117: goto st155; + case 46: goto tr74; + case 95: goto tr74; + case 109: goto st155; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st155: if ( ++p == pe ) goto _test_eof155; case 155: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto tr233; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto tr236; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st156: if ( ++p == pe ) goto _test_eof156; case 156: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st157; + case 46: goto tr74; + case 95: goto tr74; + case 117: goto st157; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st157: if ( ++p == pe ) goto _test_eof157; case 157: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 99: goto st158; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto tr238; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st158: if ( ++p == pe ) goto _test_eof158; case 158: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto st159; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st159; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st159: if ( ++p == pe ) goto _test_eof159; case 159: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 111: goto st160; + case 46: goto tr74; + case 95: goto tr74; + case 99: goto st160; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st160: if ( ++p == pe ) goto _test_eof160; case 160: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto tr238; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto st161; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st161: if ( ++p == pe ) goto _test_eof161; case 161: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st162; + case 46: goto tr74; + case 95: goto tr74; + case 111: goto st162; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st162: if ( ++p == pe ) goto _test_eof162; case 162: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 105: goto st163; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto tr243; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; +tr243: +#line 1 "NONE" + {te = p+1;} + goto st163; st163: if ( ++p == pe ) goto _test_eof163; case 163: +#line 3952 "patchExprScanner.cc" switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st164; + case 46: goto tr74; + case 58: goto st10; + case 95: goto tr74; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr244; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: + if ( (*p) == 58 ) + goto st11; + goto tr12; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + switch( (*p) ) { + case 120: goto tr14; + case 121: goto tr15; + case 122: goto tr16; + } + goto tr12; st164: if ( ++p == pe ) goto _test_eof164; case 164: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 104: goto st165; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st165; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st165: if ( ++p == pe ) goto _test_eof165; case 165: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 116: goto st166; + case 46: goto tr74; + case 95: goto tr74; + case 105: goto st166; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st166: if ( ++p == pe ) goto _test_eof166; case 166: switch( (*p) ) { - case 46: goto tr69; - case 65: goto st167; - case 83: goto st173; - case 95: goto tr69; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st167; } - if ( (*p) < 66 ) { + if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st167: if ( ++p == pe ) goto _test_eof167; case 167: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 118: goto st168; + case 46: goto tr74; + case 95: goto tr74; + case 104: goto st168; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st168: if ( ++p == pe ) goto _test_eof168; case 168: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto st169; + case 46: goto tr74; + case 95: goto tr74; + case 116: goto st169; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st169: if ( ++p == pe ) goto _test_eof169; case 169: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 114: goto st170; + case 46: goto tr74; + case 65: goto st170; + case 83: goto st176; + case 95: goto tr74; } - if ( (*p) < 65 ) { + if ( (*p) < 66 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st170: if ( ++p == pe ) goto _test_eof170; case 170: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 97: goto st171; + case 46: goto tr74; + case 95: goto tr74; + case 118: goto st171; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st171: if ( ++p == pe ) goto _test_eof171; case 171: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 103: goto st172; + case 46: goto tr74; + case 95: goto tr74; + case 101: goto st172; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st172: if ( ++p == pe ) goto _test_eof172; case 172: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 101: goto tr251; + case 46: goto tr74; + case 95: goto tr74; + case 114: goto st173; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st173: if ( ++p == pe ) goto _test_eof173; case 173: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 117: goto st174; + case 46: goto tr74; + case 95: goto tr74; + case 97: goto st174; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr74; } else - goto tr69; - goto tr68; + goto tr74; + goto tr73; st174: if ( ++p == pe ) goto _test_eof174; case 174: switch( (*p) ) { - case 46: goto tr69; - case 95: goto tr69; - case 109: goto tr253; + case 46: goto tr74; + case 95: goto tr74; + case 103: goto st175; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr69; + goto tr74; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr69; + goto tr74; } else - goto tr69; - goto tr68; -st10: + goto tr74; + goto tr73; +st175: if ( ++p == pe ) - goto _test_eof10; -case 10: + goto _test_eof175; +case 175: + switch( (*p) ) { + case 46: goto tr74; + case 95: goto tr74; + case 101: goto tr258; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; + } else + goto tr74; + goto tr73; +st176: + if ( ++p == pe ) + goto _test_eof176; +case 176: + switch( (*p) ) { + case 46: goto tr74; + case 95: goto tr74; + case 117: goto st177; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; + } else + goto tr74; + goto tr73; +st177: + if ( ++p == pe ) + goto _test_eof177; +case 177: + switch( (*p) ) { + case 46: goto tr74; + case 95: goto tr74; + case 109: goto tr260; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr74; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr74; + } else + goto tr74; + goto tr73; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: if ( (*p) == 124 ) - goto tr12; + goto tr17; goto st0; } - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; _test_eof1: cs = 1; goto _test_eof; _test_eof2: cs = 2; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; _test_eof3: cs = 3; goto _test_eof; _test_eof4: cs = 4; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; _test_eof17: cs = 17; goto _test_eof; _test_eof18: cs = 18; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; _test_eof19: cs = 19; goto _test_eof; _test_eof20: cs = 20; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; _test_eof21: cs = 21; goto _test_eof; _test_eof22: cs = 22; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; _test_eof23: cs = 23; goto _test_eof; _test_eof24: cs = 24; goto _test_eof; _test_eof25: cs = 25; goto _test_eof; @@ -4295,10 +4387,10 @@ case 10: _test_eof149: cs = 149; goto _test_eof; _test_eof150: cs = 150; goto _test_eof; _test_eof151: cs = 151; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; _test_eof152: cs = 152; goto _test_eof; _test_eof153: cs = 153; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; _test_eof154: cs = 154; goto _test_eof; _test_eof155: cs = 155; goto _test_eof; _test_eof156: cs = 156; goto _test_eof; @@ -4309,6 +4401,8 @@ case 10: _test_eof161: cs = 161; goto _test_eof; _test_eof162: cs = 162; goto _test_eof; _test_eof163: cs = 163; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; _test_eof164: cs = 164; goto _test_eof; _test_eof165: cs = 165; goto _test_eof; _test_eof166: cs = 166; goto _test_eof; @@ -4320,186 +4414,192 @@ case 10: _test_eof172: cs = 172; goto _test_eof; _test_eof173: cs = 173; goto _test_eof; _test_eof174: cs = 174; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; + _test_eof175: cs = 175; goto _test_eof; + _test_eof176: cs = 176; goto _test_eof; + _test_eof177: cs = 177; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; _test_eof: {} if ( p == eof ) { switch ( cs ) { - case 12: goto tr53; - case 13: goto tr54; - case 14: goto tr56; - case 15: goto tr58; + case 14: goto tr58; + case 15: goto tr59; case 16: goto tr61; + case 17: goto tr63; + case 18: goto tr66; case 5: goto tr5; case 6: goto tr5; - case 17: goto tr61; - case 18: goto tr63; - case 19: goto tr61; - case 20: goto tr64; + case 19: goto tr66; + case 20: goto tr68; case 21: goto tr66; - case 22: goto tr68; - case 23: goto tr70; - case 24: goto tr68; - case 25: goto tr68; - case 26: goto tr68; - case 27: goto tr68; - case 28: goto tr68; - case 29: goto tr68; - case 30: goto tr68; - case 31: goto tr68; - case 32: goto tr68; - case 33: goto tr68; - case 34: goto tr68; - case 35: goto tr86; - case 36: goto tr68; - case 37: goto tr68; - case 38: goto tr68; - case 39: goto tr68; - case 40: goto tr68; - case 41: goto tr68; - case 42: goto tr68; - case 43: goto tr68; - case 44: goto tr68; - case 45: goto tr68; - case 46: goto tr68; - case 47: goto tr68; - case 48: goto tr101; - case 49: goto tr68; - case 50: goto tr68; - case 51: goto tr68; - case 52: goto tr68; - case 53: goto tr68; - case 54: goto tr68; - case 55: goto tr68; - case 56: goto tr68; - case 57: goto tr68; - case 58: goto tr68; - case 59: goto tr68; - case 60: goto tr68; - case 61: goto tr68; - case 62: goto tr68; - case 63: goto tr68; - case 64: goto tr68; - case 65: goto tr68; - case 66: goto tr68; - case 67: goto tr68; - case 68: goto tr68; - case 69: goto tr68; - case 70: goto tr68; - case 71: goto tr68; - case 72: goto tr68; - case 73: goto tr68; - case 74: goto tr68; - case 75: goto tr68; - case 76: goto tr68; - case 77: goto tr68; - case 78: goto tr68; - case 79: goto tr134; - case 80: goto tr68; - case 81: goto tr68; - case 82: goto tr68; - case 83: goto tr141; - case 84: goto tr68; - case 85: goto tr68; - case 86: goto tr68; - case 87: goto tr68; - case 88: goto tr68; - case 89: goto tr149; - case 90: goto tr68; - case 91: goto tr68; - case 92: goto tr68; - case 93: goto tr68; - case 94: goto tr68; - case 95: goto tr68; - case 96: goto tr68; - case 97: goto tr68; - case 98: goto tr68; - case 99: goto tr68; - case 100: goto tr68; - case 101: goto tr68; - case 102: goto tr68; - case 103: goto tr166; - case 104: goto tr68; - case 105: goto tr68; - case 106: goto tr68; - case 107: goto tr68; - case 108: goto tr68; - case 109: goto tr68; - case 110: goto tr68; - case 111: goto tr68; - case 112: goto tr68; - case 113: goto tr68; - case 114: goto tr68; - case 115: goto tr186; - case 116: goto tr68; - case 117: goto tr68; - case 118: goto tr68; - case 119: goto tr68; - case 120: goto tr68; - case 121: goto tr68; - case 122: goto tr68; - case 123: goto tr68; - case 124: goto tr68; - case 125: goto tr68; - case 126: goto tr68; - case 127: goto tr68; - case 128: goto tr68; - case 129: goto tr68; - case 130: goto tr68; - case 131: goto tr68; - case 132: goto tr68; - case 133: goto tr68; - case 134: goto tr206; - case 135: goto tr68; - case 136: goto tr68; - case 137: goto tr68; - case 138: goto tr68; - case 139: goto tr68; - case 140: goto tr68; - case 141: goto tr68; - case 142: goto tr68; - case 143: goto tr68; - case 144: goto tr68; - case 145: goto tr68; - case 146: goto tr222; - case 147: goto tr68; - case 148: goto tr68; - case 149: goto tr68; - case 150: goto tr68; - case 151: goto tr228; + case 22: goto tr69; + case 23: goto tr71; + case 24: goto tr73; + case 25: goto tr75; + case 26: goto tr73; + case 27: goto tr73; + case 28: goto tr73; + case 29: goto tr73; + case 30: goto tr73; + case 31: goto tr73; + case 32: goto tr73; + case 33: goto tr73; + case 34: goto tr73; + case 35: goto tr73; + case 36: goto tr73; + case 37: goto tr91; + case 38: goto tr73; + case 39: goto tr73; + case 40: goto tr73; + case 41: goto tr73; + case 42: goto tr73; + case 43: goto tr73; + case 44: goto tr73; + case 45: goto tr73; + case 46: goto tr73; + case 47: goto tr73; + case 48: goto tr73; + case 49: goto tr73; + case 50: goto tr106; + case 51: goto tr73; + case 52: goto tr73; + case 53: goto tr73; + case 54: goto tr73; + case 55: goto tr73; + case 56: goto tr73; + case 57: goto tr73; + case 58: goto tr73; + case 59: goto tr73; + case 60: goto tr73; + case 61: goto tr73; + case 62: goto tr73; + case 63: goto tr73; + case 64: goto tr73; + case 65: goto tr73; + case 66: goto tr73; + case 67: goto tr73; + case 68: goto tr73; + case 69: goto tr73; + case 70: goto tr73; + case 71: goto tr73; + case 72: goto tr73; + case 73: goto tr73; + case 74: goto tr73; + case 75: goto tr73; + case 76: goto tr73; + case 77: goto tr73; + case 78: goto tr73; + case 79: goto tr73; + case 80: goto tr73; + case 81: goto tr139; + case 82: goto tr73; + case 83: goto tr73; + case 84: goto tr73; + case 85: goto tr146; + case 86: goto tr73; + case 87: goto tr73; + case 88: goto tr73; + case 89: goto tr73; + case 90: goto tr73; + case 91: goto tr154; + case 92: goto tr73; + case 93: goto tr73; + case 94: goto tr73; + case 95: goto tr73; + case 96: goto tr73; + case 97: goto tr73; + case 98: goto tr73; + case 99: goto tr73; + case 100: goto tr73; + case 101: goto tr73; + case 102: goto tr73; + case 103: goto tr73; + case 104: goto tr73; + case 105: goto tr171; + case 106: goto tr73; + case 107: goto tr73; + case 108: goto tr73; + case 109: goto tr73; + case 110: goto tr73; + case 111: goto tr73; + case 112: goto tr73; + case 113: goto tr73; + case 114: goto tr73; + case 115: goto tr73; + case 116: goto tr73; + case 117: goto tr191; + case 118: goto tr73; + case 119: goto tr73; + case 120: goto tr73; + case 121: goto tr73; + case 122: goto tr73; + case 123: goto tr73; + case 124: goto tr73; + case 125: goto tr73; + case 126: goto tr73; + case 127: goto tr73; + case 128: goto tr73; + case 129: goto tr73; + case 130: goto tr73; + case 131: goto tr73; + case 132: goto tr73; + case 133: goto tr73; + case 134: goto tr73; + case 135: goto tr73; + case 136: goto tr211; + case 137: goto tr73; + case 138: goto tr73; + case 139: goto tr73; + case 140: goto tr73; + case 141: goto tr73; + case 142: goto tr73; + case 143: goto tr73; + case 144: goto tr73; + case 145: goto tr73; + case 146: goto tr73; + case 147: goto tr73; + case 148: goto tr227; + case 149: goto tr73; + case 150: goto tr73; + case 151: goto tr73; + case 152: goto tr73; + case 153: goto tr233; case 8: goto tr9; case 9: goto tr9; - case 152: goto tr68; - case 153: goto tr68; - case 154: goto tr68; - case 155: goto tr68; - case 156: goto tr68; - case 157: goto tr68; - case 158: goto tr68; - case 159: goto tr68; - case 160: goto tr68; - case 161: goto tr68; - case 162: goto tr68; - case 163: goto tr68; - case 164: goto tr68; - case 165: goto tr68; - case 166: goto tr68; - case 167: goto tr68; - case 168: goto tr68; - case 169: goto tr68; - case 170: goto tr68; - case 171: goto tr68; - case 172: goto tr68; - case 173: goto tr68; - case 174: goto tr68; + case 154: goto tr73; + case 155: goto tr73; + case 156: goto tr73; + case 157: goto tr73; + case 158: goto tr73; + case 159: goto tr73; + case 160: goto tr73; + case 161: goto tr73; + case 162: goto tr73; + case 163: goto tr244; + case 10: goto tr12; + case 11: goto tr12; + case 164: goto tr73; + case 165: goto tr73; + case 166: goto tr73; + case 167: goto tr73; + case 168: goto tr73; + case 169: goto tr73; + case 170: goto tr73; + case 171: goto tr73; + case 172: goto tr73; + case 173: goto tr73; + case 174: goto tr73; + case 175: goto tr73; + case 176: goto tr73; + case 177: goto tr73; } } _out: {} } -#line 668 "patchExprScanner.rl" +#line 708 "patchExprScanner.rl" /* ^^^ FSM execution here ^^^ */; if (0 == cs) @@ -4513,7 +4613,7 @@ case 10: } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) diff --git a/src/finiteVolume/expressions/patch/patchExprScanner.rl b/src/finiteVolume/expressions/patch/patchExprScanner.rl index a56f7d3edb6..4ba56036212 100644 --- a/src/finiteVolume/expressions/patch/patchExprScanner.rl +++ b/src/finiteVolume/expressions/patch/patchExprScanner.rl @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ +#include "exprScanToken.H" #include "patchExprScanner.H" #include "patchExprDriver.H" #include "patchExprLemonParser.h" @@ -42,7 +43,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -55,9 +55,21 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } #undef HAS_LOOKBEHIND_TOKENS +#ifdef HAS_LOOKBEHIND_TOKENS +// Special handling for these known (stashed) look-back types +static const Enum<int> lookBehindTokenEnums +({ + TOKEN_PAIR("cellZone", CELL_ZONE), TOKEN_PAIR("cellSet", CELL_SET), + TOKEN_PAIR("faceZone", FACE_ZONE), TOKEN_PAIR("faceSet", FACE_SET), + #ifdef TOK_POINT_ZONE + TOKEN_PAIR("pointZone", POINT_ZONE), TOKEN_PAIR("pointSet", POINT_SET), + #endif +}); +#endif + // Special handling of predefined method types. Eg, .x(), .y(), ... static const Enum<int> fieldMethodEnums @@ -176,7 +188,7 @@ static int driverTokenType const word& ident ) { -#if 0 + #if 0 // Get stashed "look-behind" to decide what type of identifier we expect const int lookBehind = driver_.resetStashedTokenId(); @@ -186,12 +198,17 @@ static int driverTokenType switch (lookBehind) { - case TOK_CELL_SET : good = driver_.isCellSet(ident); break; - case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; - case TOK_POINT_SET : good = driver_.isPointSet(ident); break; case TOK_CELL_ZONE : good = driver_.isCellZone(ident); break; + case TOK_CELL_SET : good = driver_.isCellSet(ident); break; + case TOK_FACE_ZONE : good = driver_.isFaceZone(ident); break; + case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; + + #ifdef TOK_POINT_ZONE + // Not yet ready or particularly useful it seems case TOK_POINT_ZONE : good = driver_.isPointZone(ident); break; + case TOK_POINT_SET : good = driver_.isPointSet(ident); break; + #endif } if (good) @@ -207,51 +224,49 @@ static int driverTokenType return -2; // Extra safety } -#endif + #endif // Face variables #ifdef TOK_SSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SSCALAR_ID, scalar); - checkFieldToken(TOK_SVECTOR_ID, vector); - checkFieldToken(TOK_SSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_STENSOR_ID, tensor); - - // Not tested: checkFieldToken(TOK_SBOOL_ID, bool); + doLocalCode(TOK_SSCALAR_ID, scalar); + doLocalCode(TOK_SVECTOR_ID, vector); + doLocalCode(TOK_SSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_STENSOR_ID, tensor); + // Untested: doLocalCode(TOK_SBOOL_ID, bool); + #undef doLocalCode } #endif // Point variables #ifdef TOK_PSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, true)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, true)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_PSCALAR_ID, scalar); - checkFieldToken(TOK_PVECTOR_ID, vector); - checkFieldToken(TOK_PTENSOR_ID, tensor); - checkFieldToken(TOK_PTENSOR_ID, tensor); - checkFieldToken(TOK_PSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_PSPH_TENSOR_ID, sphericalTensor); - - // Not tested: checkFieldToken(TOK_PBOOL_ID, bool); + doLocalCode(TOK_PSCALAR_ID, scalar); + doLocalCode(TOK_PVECTOR_ID, vector); + doLocalCode(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_PSPH_TENSOR_ID, sphericalTensor); + // Untested: doLocalCode(TOK_SBOOL_ID, bool); + #undef doLocalCode } #endif - #undef checkFieldToken - // Check registered fields and/or disk-files { const word fieldType(driver_.getFieldClassName(ident)); @@ -267,7 +282,7 @@ static int driverTokenType return -1; } -} // End anonymous namespace +} // End namespace Foam /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -280,7 +295,15 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); @@ -289,15 +312,18 @@ static int driverTokenType write data; action emit_number { + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -311,15 +337,16 @@ static int driverTokenType } action emit_ident { + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } action emit_method { // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); } @@ -337,7 +364,7 @@ static int driverTokenType number => emit_number; ## Operators - '!' =>{ EMIT_TOKEN(NOT); }; + '!' =>{ EMIT_TOKEN(LNOT); }; '%' =>{ EMIT_TOKEN(PERCENT); }; '(' =>{ EMIT_TOKEN(LPAREN); }; ')' =>{ EMIT_TOKEN(RPAREN); }; @@ -358,7 +385,7 @@ static int driverTokenType '&&' =>{ EMIT_TOKEN(LAND); }; '||' =>{ EMIT_TOKEN(LOR); }; '&' =>{ EMIT_TOKEN(BIT_AND); }; -## Not needed? '|' =>{ EMIT_TOKEN(BIT_OK); }; +## Not needed? '|' =>{ EMIT_TOKEN(BIT_OR); }; '^' =>{ EMIT_TOKEN(BIT_XOR); }; ## Some '.method' - Error if unknown @@ -417,9 +444,12 @@ static int driverTokenType "sphericalTensor" =>{ EMIT_TOKEN(SPH_TENSOR); }; ## Single value (constants, etc) - "Zero" =>{ EMIT_TOKEN(ZERO); }; "true" =>{ EMIT_TOKEN(LTRUE); }; "false" =>{ EMIT_TOKEN(LFALSE); }; + "Zero" =>{ EMIT_TOKEN(ZERO); }; + "vector::x" =>{ EMIT_VECTOR_TOKEN(1,0,0); }; + "vector::y" =>{ EMIT_VECTOR_TOKEN(0,1,0); }; + "vector::z" =>{ EMIT_VECTOR_TOKEN(0,0,1); }; "tensor::I" =>{ EMIT_TOKEN(IDENTITY_TENSOR); }; "arg" =>{ EMIT_TOKEN(ARG); }; "time" =>{ EMIT_TOKEN(TIME); }; @@ -452,8 +482,7 @@ Foam::expressions::patchExpr::scanner::~scanner() bool Foam::expressions::patchExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -470,8 +499,8 @@ bool Foam::expressions::patchExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -484,10 +513,11 @@ bool Foam::expressions::patchExpr::scanner::dispatch_method bool Foam::expressions::patchExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -512,12 +542,12 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -527,17 +557,28 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -545,8 +586,9 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -578,12 +620,13 @@ bool Foam::expressions::patchExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -646,9 +689,6 @@ bool Foam::expressions::patchExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -678,7 +718,7 @@ bool Foam::expressions::patchExpr::scanner::process } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) diff --git a/src/finiteVolume/expressions/volume/volumeExprFwd.H b/src/finiteVolume/expressions/volume/volumeExprFwd.H index bff30718d10..4187dfab058 100644 --- a/src/finiteVolume/expressions/volume/volumeExprFwd.H +++ b/src/finiteVolume/expressions/volume/volumeExprFwd.H @@ -47,7 +47,6 @@ namespace volumeExpr class parser; class scanner; class parseDriver; -union scanToken; //- Static debugging option extern int debug; diff --git a/src/finiteVolume/expressions/volume/volumeExprLemonParser.h b/src/finiteVolume/expressions/volume/volumeExprLemonParser.h index b24aa9a4371..830ea29d255 100644 --- a/src/finiteVolume/expressions/volume/volumeExprLemonParser.h +++ b/src/finiteVolume/expressions/volume/volumeExprLemonParser.h @@ -1,121 +1,126 @@ -#define TOK_QUESTION 1 -#define TOK_COLON 2 -#define TOK_LOR 3 -#define TOK_LAND 4 -#define TOK_BIT_XOR 5 -#define TOK_BIT_AND 6 -#define TOK_EQUAL 7 -#define TOK_NOT_EQUAL 8 -#define TOK_LESS_EQ 9 -#define TOK_GREATER_EQ 10 -#define TOK_LESS 11 -#define TOK_GREATER 12 -#define TOK_PLUS 13 -#define TOK_MINUS 14 -#define TOK_TIMES 15 -#define TOK_DIVIDE 16 -#define TOK_PERCENT 17 -#define TOK_NEGATE 18 -#define TOK_NOT 19 -#define TOK_DOT 20 -#define TOK_NUMBER 21 -#define TOK_ZERO 22 -#define TOK_PI 23 -#define TOK_LPAREN 24 -#define TOK_RPAREN 25 -#define TOK_DEG_TO_RAD 26 -#define TOK_RAD_TO_DEG 27 -#define TOK_ARG 28 -#define TOK_TIME 29 -#define TOK_DELTA_T 30 -#define TOK_SCALAR_ID 31 -#define TOK_MIN 32 -#define TOK_COMMA 33 -#define TOK_MAX 34 -#define TOK_SUM 35 -#define TOK_AVERAGE 36 -#define TOK_EXP 37 -#define TOK_LOG 38 -#define TOK_LOG10 39 -#define TOK_SQR 40 -#define TOK_SQRT 41 -#define TOK_CBRT 42 -#define TOK_SIN 43 -#define TOK_COS 44 -#define TOK_TAN 45 -#define TOK_ASIN 46 -#define TOK_ACOS 47 -#define TOK_ATAN 48 -#define TOK_SINH 49 -#define TOK_COSH 50 -#define TOK_TANH 51 -#define TOK_POW 52 -#define TOK_ATAN2 53 -#define TOK_POS 54 -#define TOK_NEG 55 -#define TOK_POS0 56 -#define TOK_NEG0 57 -#define TOK_SIGN 58 -#define TOK_FLOOR 59 -#define TOK_CEIL 60 -#define TOK_ROUND 61 -#define TOK_HYPOT 62 -#define TOK_RAND 63 -#define TOK_VECTOR_ID 64 -#define TOK_SPH_TENSOR_ID 65 -#define TOK_SYM_TENSOR_ID 66 -#define TOK_IDENTITY_TENSOR 67 -#define TOK_TENSOR_ID 68 -#define TOK_LTRUE 69 -#define TOK_LFALSE 70 -#define TOK_BOOL 71 -#define TOK_CELL_SET 72 -#define TOK_IDENTIFIER 73 -#define TOK_CELL_ZONE 74 -#define TOK_CELL_VOLUME 75 -#define TOK_WEIGHT_AVERAGE 76 -#define TOK_WEIGHT_SUM 77 -#define TOK_FACE_EXPR 78 -#define TOK_SSCALAR_ID 79 -#define TOK_SVECTOR_ID 80 -#define TOK_SSPH_TENSOR_ID 81 -#define TOK_SSYM_TENSOR_ID 82 -#define TOK_STENSOR_ID 83 -#define TOK_FACE_SET 84 -#define TOK_FACE_ZONE 85 -#define TOK_FACE_AREA 86 -#define TOK_FACE_CENTRE 87 -#define TOK_POINT_EXPR 88 -#define TOK_PSCALAR_ID 89 -#define TOK_PVECTOR_ID 90 -#define TOK_PSPH_TENSOR_ID 91 -#define TOK_PSYM_TENSOR_ID 92 -#define TOK_PTENSOR_ID 93 -#define TOK_POINT_SET 94 -#define TOK_POINT_ZONE 95 -#define TOK_POINTS 96 -#define TOK_MAG 97 -#define TOK_MAGSQR 98 -#define TOK_VECTOR 99 -#define TOK_TENSOR 100 -#define TOK_SYM_TENSOR 101 -#define TOK_SPH_TENSOR 102 -#define TOK_CMPT_X 103 -#define TOK_CMPT_Y 104 -#define TOK_CMPT_Z 105 -#define TOK_CMPT_XX 106 -#define TOK_CMPT_XY 107 -#define TOK_CMPT_XZ 108 -#define TOK_CMPT_YX 109 -#define TOK_CMPT_YY 110 -#define TOK_CMPT_YZ 111 -#define TOK_CMPT_ZX 112 -#define TOK_CMPT_ZY 113 -#define TOK_CMPT_ZZ 114 -#define TOK_CMPT_II 115 -#define TOK_TRANSPOSE 116 -#define TOK_DIAG 117 -#define TOK_POINT_TO_CELL 118 -#define TOK_RECONSTRUCT 119 -#define TOK_CELL_TO_FACE 120 -#define TOK_CELL_TO_POINT 121 +#define TOK_LPAREN 1 +#define TOK_RPAREN 2 +#define TOK_COMMA 3 +#define TOK_QUESTION 4 +#define TOK_COLON 5 +#define TOK_LOR 6 +#define TOK_LAND 7 +#define TOK_LNOT 8 +#define TOK_BIT_OR 9 +#define TOK_BIT_XOR 10 +#define TOK_BIT_AND 11 +#define TOK_BIT_NOT 12 +#define TOK_EQUAL 13 +#define TOK_NOT_EQUAL 14 +#define TOK_LESS 15 +#define TOK_LESS_EQ 16 +#define TOK_GREATER 17 +#define TOK_GREATER_EQ 18 +#define TOK_PLUS 19 +#define TOK_MINUS 20 +#define TOK_TIMES 21 +#define TOK_DIVIDE 22 +#define TOK_PERCENT 23 +#define TOK_NEGATE 24 +#define TOK_DOT 25 +#define TOK_BOOL 26 +#define TOK_LTRUE 27 +#define TOK_LFALSE 28 +#define TOK_NUMBER 29 +#define TOK_ZERO 30 +#define TOK_IDENTIFIER 31 +#define TOK_PI 32 +#define TOK_DEG_TO_RAD 33 +#define TOK_RAD_TO_DEG 34 +#define TOK_ARG 35 +#define TOK_TIME 36 +#define TOK_DELTA_T 37 +#define TOK_SCALAR_FUNCTION_ID 38 +#define TOK_VECTOR_VALUE 39 +#define TOK_VECTOR_FUNCTION_ID 40 +#define TOK_SCALAR_ID 41 +#define TOK_MIN 42 +#define TOK_MAX 43 +#define TOK_SUM 44 +#define TOK_AVERAGE 45 +#define TOK_EXP 46 +#define TOK_LOG 47 +#define TOK_LOG10 48 +#define TOK_SQR 49 +#define TOK_SQRT 50 +#define TOK_CBRT 51 +#define TOK_SIN 52 +#define TOK_COS 53 +#define TOK_TAN 54 +#define TOK_ASIN 55 +#define TOK_ACOS 56 +#define TOK_ATAN 57 +#define TOK_SINH 58 +#define TOK_COSH 59 +#define TOK_TANH 60 +#define TOK_POW 61 +#define TOK_ATAN2 62 +#define TOK_POS 63 +#define TOK_NEG 64 +#define TOK_POS0 65 +#define TOK_NEG0 66 +#define TOK_SIGN 67 +#define TOK_FLOOR 68 +#define TOK_CEIL 69 +#define TOK_ROUND 70 +#define TOK_HYPOT 71 +#define TOK_RAND 72 +#define TOK_VECTOR_ID 73 +#define TOK_SPH_TENSOR_ID 74 +#define TOK_SYM_TENSOR_ID 75 +#define TOK_IDENTITY_TENSOR 76 +#define TOK_TENSOR_ID 77 +#define TOK_CELL_SET 78 +#define TOK_CELL_ZONE 79 +#define TOK_CELL_VOLUME 80 +#define TOK_WEIGHT_AVERAGE 81 +#define TOK_WEIGHT_SUM 82 +#define TOK_FACE_EXPR 83 +#define TOK_SSCALAR_ID 84 +#define TOK_SVECTOR_ID 85 +#define TOK_SSPH_TENSOR_ID 86 +#define TOK_SSYM_TENSOR_ID 87 +#define TOK_STENSOR_ID 88 +#define TOK_FACE_SET 89 +#define TOK_FACE_ZONE 90 +#define TOK_FACE_AREA 91 +#define TOK_FACE_CENTRE 92 +#define TOK_POINT_EXPR 93 +#define TOK_PSCALAR_ID 94 +#define TOK_PVECTOR_ID 95 +#define TOK_PSPH_TENSOR_ID 96 +#define TOK_PSYM_TENSOR_ID 97 +#define TOK_PTENSOR_ID 98 +#define TOK_POINT_SET 99 +#define TOK_POINT_ZONE 100 +#define TOK_POINTS 101 +#define TOK_MAG 102 +#define TOK_MAGSQR 103 +#define TOK_VECTOR 104 +#define TOK_TENSOR 105 +#define TOK_SYM_TENSOR 106 +#define TOK_SPH_TENSOR 107 +#define TOK_CMPT_X 108 +#define TOK_CMPT_Y 109 +#define TOK_CMPT_Z 110 +#define TOK_CMPT_XX 111 +#define TOK_CMPT_XY 112 +#define TOK_CMPT_XZ 113 +#define TOK_CMPT_YX 114 +#define TOK_CMPT_YY 115 +#define TOK_CMPT_YZ 116 +#define TOK_CMPT_ZX 117 +#define TOK_CMPT_ZY 118 +#define TOK_CMPT_ZZ 119 +#define TOK_CMPT_II 120 +#define TOK_TRANSPOSE 121 +#define TOK_DIAG 122 +#define TOK_POINT_TO_CELL 123 +#define TOK_RECONSTRUCT 124 +#define TOK_CELL_TO_FACE 125 +#define TOK_CELL_TO_POINT 126 diff --git a/src/finiteVolume/expressions/volume/volumeExprLemonParser.lyy-m4 b/src/finiteVolume/expressions/volume/volumeExprLemonParser.lyy-m4 index 4d17ebd4cb6..23ecd5e99e4 100644 --- a/src/finiteVolume/expressions/volume/volumeExprLemonParser.lyy-m4 +++ b/src/finiteVolume/expressions/volume/volumeExprLemonParser.lyy-m4 @@ -42,6 +42,7 @@ Description */ %include { +#include "exprScanToken.H" #include "volumeExprDriver.H" #include "volumeExprParser.H" #include "volumeExprScanner.H" @@ -110,11 +111,8 @@ dnl %token_prefix TOK_ // Terminals -%token_type {Foam::expressions::volumeExpr::scanToken*} -// Non-terminals -%type ivalue { Foam::label } -%type svalue { Foam::scalar } -%type ident { Foam::word* } +%token_type {Foam::expressions::scanToken} +%token_destructor { ($$).destroy(); } // Volume fields declare_field(lfield, Foam::volScalarField, Foam::scalar, newVolField, getVolField) @@ -144,17 +142,34 @@ declare_field(ptfield, Foam::pointTensorField, Foam::tensor, newPointField, getP // Lemon does not generate a destructor for that. // So do not use Lemon destructors for anything. +standard_tokens() operator_precedence() %start_symbol evaluate // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +/*---------------------------------------------------------------------------*\ + * General Productions +\*---------------------------------------------------------------------------*/ + +%type identifier { Foam::word* } +%destructor identifier { delete($$); $$ = nullptr; } + +identifier (lhs) ::= IDENTIFIER (tok) . +{ + // Take ownership of pointer from scan token + lhs = tok.name_; tok.name_ = nullptr; +} + + /*---------------------------------------------------------------------------*\ * Productions (scalar) \*---------------------------------------------------------------------------*/ -svalue (lhs) ::= NUMBER (a) . { lhs = (a)->svalue; } // From scanToken +%type svalue { Foam::scalar } + +svalue (lhs) ::= NUMBER (tok) . { lhs = (tok).scalarValue; } // scanToken svalue (lhs) ::= ZERO . { lhs = Foam::Zero; } svalue (lhs) ::= PI LPAREN RPAREN . { lhs = Foam::constant::mathematical::pi; } svalue (lhs) ::= DEG_TO_RAD LPAREN RPAREN . { lhs = Foam::degToRad(); } @@ -163,6 +178,32 @@ svalue (lhs) ::= ARG LPAREN RPAREN . { lhs = driver->argValue(); } svalue (lhs) ::= TIME LPAREN RPAREN . { lhs = driver->timeValue(); } svalue (lhs) ::= DELTA_T LPAREN RPAREN . { lhs = driver->deltaT(); } +svalue (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = 0; +} + + +/*---------------------------------------------------------------------------*\ + * Productions (vector) +\*---------------------------------------------------------------------------*/ + +%type vvalue { Foam::vector* } +%destructor vvalue { delete($$); $$ = nullptr; } + +vvalue (lhs) ::= VECTOR_VALUE (tok) . +{ + // Take ownership of pointer from scan token + lhs = tok.vectorPtr; tok.vectorPtr = nullptr; +} + +vvalue (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN RPAREN . +{ + driver->reportFatal("Not implemented: " + make_obj(name.name_)); + lhs = new Foam::vector(0,0,0); +} + /* * * * * * * * * * * * * * * * Volume Fields * * * * * * * * * * * * * * * *\ dnl @@ -178,7 +219,9 @@ dnl /*---------------------------------------------------------------------------*\ * Productions (volScalarField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [sfield])dnl +define([_new_target_], [_new_sfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -194,12 +237,12 @@ rules_scalar_operations() rules_scalar_functions() // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but manage via FieldOps::assign -rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<Foam::scalar>()) +rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<_value_type_>()) // Other functions @@ -212,20 +255,30 @@ _target_ (lhs) ::= RAND LPAREN RPAREN . _target_ (lhs) ::= RAND LPAREN NUMBER (seed) RPAREN . { // Call with -ve seed to signal use of time index as seed - lhs = driver->field_rand(std::round(-(seed)->svalue)).ptr(); + lhs = driver->field_rand(std::round(-(seed).scalarValue)).ptr(); +} + +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); } /*---------------------------------------------------------------------------*\ * Productions (volVectorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [vfield])dnl +define([_new_target_], [_new_vfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a); } +rule_field_from_value(_target_, vvalue) rule_get_field(_target_, VECTOR_ID) rules_standard(_target_, _value_type_, _logic_) @@ -233,9 +286,20 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +// Other functions + +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + + /*---------------------------------------------------------------------------*\ * Productions (volSphericalTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [hfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl @@ -253,6 +317,7 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (volSymmTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [yfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl @@ -269,6 +334,7 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (volTensorField) dnl +define([_scalar_arg_], [sfield])dnl define([_target_], [tfield])dnl define([_value_type_], [Foam::tensor])dnl dnl @@ -326,7 +392,9 @@ dnl> %ifndef disable_surface_fields /*---------------------------------------------------------------------------*\ * Productions (surfaceScalarField) dnl +define([_scalar_arg_], [ssfield])dnl define([_target_], [ssfield])dnl +define([_new_target_], [_new_ssfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -342,24 +410,34 @@ rules_scalar_operations() rules_scalar_functions() // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but manage via FieldOps::assign -rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<Foam::scalar>()) +rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<_value_type_>()) + +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} /*---------------------------------------------------------------------------*\ * Productions (surfaceVectorField) dnl +define([_scalar_arg_], [ssfield])dnl define([_target_], [svfield])dnl +define([_new_target_], [_new_svfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a); } +rule_field_from_value(_target_, vvalue, FACE_EXPR) rule_get_field(_target_, SVECTOR_ID) rules_standard(_target_, _value_type_, _logic_) @@ -367,10 +445,18 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (surfaceSphericalTensorField) dnl +define([_scalar_arg_], [ssfield])dnl define([_target_], [shfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl @@ -388,6 +474,7 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (surfaceSymmTensorField) dnl +define([_scalar_arg_], [ssfield])dnl define([_target_], [syfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl @@ -406,6 +493,7 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (surfaceTensorField) dnl +define([_scalar_arg_], [ssfield])dnl define([_target_], [stfield])dnl define([_value_type_], [Foam::tensor])dnl dnl @@ -470,7 +558,9 @@ dnl> %ifndef disable_point_fields /*---------------------------------------------------------------------------*\ * Productions (pointScalarField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [psfield])dnl +define([_new_target_], [_new_psfield])dnl define([_value_type_], [Foam::scalar])dnl dnl \*---------------------------------------------------------------------------*/ @@ -484,12 +574,19 @@ rules_standard(_target_, _value_type_, _logic_) rules_inplace_gUnary(_target_) // Non-standard but manage via FieldOps::assign -rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<Foam::scalar>()) -rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<Foam::scalar>()) +rule_unary_assign(_target_, _target_, FLOOR, Foam::floorOp<_value_type_>()) +rule_unary_assign(_target_, _target_, CEIL, Foam::ceilOp<_value_type_>()) +rule_unary_assign(_target_, _target_, ROUND, Foam::roundOp<_value_type_>()) // Non-standard but manage via FieldOps::assign -rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<Foam::scalar>()) +rule_binary_assign(_target_, _target_, _target_, HYPOT, Foam::hypotOp<_value_type_>()) + +_target_ (lhs) ::= SCALAR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} /*---------------------------------------------------------------------------*\ @@ -542,13 +639,16 @@ dnl*/ /*---------------------------------------------------------------------------*\ * Productions (pointVectorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [pvfield])dnl +define([_new_target_], [_new_pvfield])dnl define([_value_type_], [Foam::vector])dnl dnl \*---------------------------------------------------------------------------*/ evaluate ::= _target_ (a) . { driver->setResult(a); } +rule_field_from_value(_target_, vvalue, POINT_EXPR) rule_get_field(_target_, PVECTOR_ID) rules_standard(_target_, _value_type_, _logic_) @@ -556,9 +656,17 @@ rules_inplace_gUnary(_target_) rules_vector_operations() rules_vector_functions() +_target_ (lhs) ::= VECTOR_FUNCTION_ID (name) LPAREN _scalar_arg_ (values) RPAREN. +{ + lhs = _new_target_; + (void) make_obj(values); + driver->reportFatal("Not implemented: " + make_obj(name.name_)); +} + /*---------------------------------------------------------------------------*\ * Productions (pointSphericalTensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [phfield])dnl define([_value_type_], [Foam::sphericalTensor])dnl dnl @@ -577,6 +685,7 @@ rules_sphTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (pointSymmTensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [pyfield])dnl define([_value_type_], [Foam::symmTensor])dnl dnl @@ -595,6 +704,7 @@ rules_symTensor_functions() /*---------------------------------------------------------------------------*\ * Productions (pointTensorField) dnl +define([_scalar_arg_], [psfield])dnl define([_target_], [ptfield])dnl define([_value_type_], [Foam::tensor])dnl dnl @@ -802,13 +912,15 @@ void Foam::expressions::volumeExpr::parser::start(parseDriver& driver_) } -void Foam::expressions::volumeExpr::parser::parse -( - int tokenId, - scanToken* tokenVal -) +void Foam::expressions::volumeExpr::parser::parse(int tokenId) +{ + Parse(lemon_, tokenId, scanToken::null()); +} + + +void Foam::expressions::volumeExpr::parser::parse(int tokenId, scanToken tok) { - Parse(lemon_, tokenId, tokenVal); + Parse(lemon_, tokenId, tok); } diff --git a/src/finiteVolume/expressions/volume/volumeExprLemonParserMacros.m4 b/src/finiteVolume/expressions/volume/volumeExprLemonParserMacros.m4 index 7cde6ab1e74..6d233bc1b29 100644 --- a/src/finiteVolume/expressions/volume/volumeExprLemonParserMacros.m4 +++ b/src/finiteVolume/expressions/volume/volumeExprLemonParserMacros.m4 @@ -34,8 +34,14 @@ divert(-1)dnl define([rules_driver_volume_functions], [dnl -rule_driver_select(_logic_, CELL_SET, field_cellSet)dnl -rule_driver_select(_logic_, CELL_ZONE, field_cellZone)dnl +_logic_ (lhs) ::= CELL_SET LPAREN identifier (name) RPAREN .dnl +{dnl + lhs = driver->field_cellSet(make_obj(name)).ptr();dnl +}dnl +_logic_ (lhs) ::= CELL_ZONE LPAREN identifier (name) RPAREN .dnl +{ + lhs = driver->field_cellZone(make_obj(name)).ptr();dnl +}dnl dnl rule_driver_nullary(_scalar_, CELL_VOLUME, field_cellVolume)dnl rule_driver_nullary(_vector_, POS, field_cellCentre)dnl CELL_CENTRE @@ -56,8 +62,14 @@ dnl define([rules_driver_surface_functions], [dnl -rule_driver_select(_logic_, FACE_SET, field_faceSet)dnl -rule_driver_select(_logic_, FACE_ZONE, field_faceZone)dnl +_logic_ (lhs) ::= FACE_SET LPAREN identifier (name) RPAREN .dnl +{dnl + lhs = driver->field_faceSet(make_obj(name)).ptr();dnl +}dnl +_logic_ (lhs) ::= FACE_ZONE LPAREN identifier (name) RPAREN .dnl +{dnl + lhs = driver->field_faceZone(make_obj(name)).ptr();dnl +}dnl dnl rule_driver_nullary(_scalar_, FACE_AREA, field_faceArea)dnl rule_driver_nullary(_vector_, FACE_CENTRE, field_faceCentre)dnl @@ -79,8 +91,14 @@ dnl define([rules_driver_point_functions], [dnl -rule_driver_select(_logic_, POINT_SET, field_pointSet)dnl -rule_driver_select(_logic_, POINT_ZONE, field_pointZone)dnl +_logic_ (lhs) ::= POINT_SET LPAREN identifier (name) RPAREN .dnl +{dnl + lhs = driver->field_pointSet(make_obj(*name)).ptr();dnl +}dnl +_logic_ (lhs) ::= POINT_ZONE LPAREN identifier (name) RPAREN .dnl +{dnl + lhs = driver->field_pointZone(make_obj(*name)).ptr();dnl +}dnl dnl rule_driver_nullary(_vector_, POINTS, field_pointField)dnl dnl diff --git a/src/finiteVolume/expressions/volume/volumeExprParser.H b/src/finiteVolume/expressions/volume/volumeExprParser.H index 110ba86ef52..1b6ab896d5b 100644 --- a/src/finiteVolume/expressions/volume/volumeExprParser.H +++ b/src/finiteVolume/expressions/volume/volumeExprParser.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -34,6 +34,7 @@ Description #ifndef expressions_volumeExprParser_H #define expressions_volumeExprParser_H +#include "exprScanToken.H" #include "volumeExprFwd.H" namespace Foam @@ -97,8 +98,11 @@ public: //- Stop parsing, freeing the allocated parser void stop(); - //- Push token/value to parser - void parse(int tokenId, scanToken* tokenVal); + //- Push token type to parser with default token + void parse(int tokenId); + + //- Push token type/value to parser + void parse(int tokenId, scanToken tok); }; // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/expressions/volume/volumeExprScanner.H b/src/finiteVolume/expressions/volume/volumeExprScanner.H index 0e8e5795739..3b5183ddfb3 100644 --- a/src/finiteVolume/expressions/volume/volumeExprScanner.H +++ b/src/finiteVolume/expressions/volume/volumeExprScanner.H @@ -5,7 +5,7 @@ \\ / A nd | www.openfoam.com \\/ M anipulation | ------------------------------------------------------------------------------- - Copyright (C) 2019 OpenCFD Ltd. + Copyright (C) 2019-2021 OpenCFD Ltd. ------------------------------------------------------------------------------- License This file is part of OpenFOAM. @@ -37,8 +37,8 @@ Note #ifndef expressions_volumeExprScanner_H #define expressions_volumeExprScanner_H +#include "exprScanToken.H" #include "volumeExprFwd.H" -#include "scalar.H" namespace Foam { @@ -47,21 +47,6 @@ namespace expressions namespace volumeExpr { -/*---------------------------------------------------------------------------*\ - Class scanToken Declaration -\*---------------------------------------------------------------------------*/ - -union scanToken -{ - Foam::label ivalue; - Foam::scalar svalue; - Foam::word* name; - - //- Default construct, bit-wise zero for union content - scanToken() : ivalue(0) {} -}; - - /*---------------------------------------------------------------------------*\ Class scanner Declaration \*---------------------------------------------------------------------------*/ @@ -83,16 +68,14 @@ class scanner bool dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; //- Dispatch identifier to parser (if possible) or Fatal bool dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident // Receives a copy ) const; diff --git a/src/finiteVolume/expressions/volume/volumeExprScanner.cc b/src/finiteVolume/expressions/volume/volumeExprScanner.cc index 104e0ca6631..735eacbec7d 100644 --- a/src/finiteVolume/expressions/volume/volumeExprScanner.cc +++ b/src/finiteVolume/expressions/volume/volumeExprScanner.cc @@ -44,7 +44,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -57,22 +56,20 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } // Special handling for these known (stashed) look-back types +#define HAS_LOOKBEHIND_TOKENS static const Enum<int> lookBehindTokenEnums ({ - TOKEN_PAIR("cellSet", CELL_SET), - TOKEN_PAIR("faceSet", FACE_SET), - TOKEN_PAIR("pointSet", POINT_SET), - TOKEN_PAIR("cellZone", CELL_ZONE), - TOKEN_PAIR("faceZone", FACE_ZONE), - TOKEN_PAIR("pointZone", POINT_ZONE), + TOKEN_PAIR("cellZone", CELL_ZONE), TOKEN_PAIR("cellSet", CELL_SET), + TOKEN_PAIR("faceZone", FACE_ZONE), TOKEN_PAIR("faceSet", FACE_SET), + #ifdef TOK_POINT_ZONE + TOKEN_PAIR("pointZone", POINT_ZONE), TOKEN_PAIR("pointSet", POINT_SET), + #endif }); -#define HAS_LOOKBEHIND_TOKENS - // Special handling of predefined method types. Eg, .x(), .y(), ... static const Enum<int> fieldMethodEnums @@ -194,6 +191,7 @@ static int driverTokenType const word& ident ) { + #ifdef HAS_LOOKBEHIND_TOKENS // Get stashed "look-behind" to decide what type of identifier we expect const int lookBehind = driver_.resetStashedTokenId(); @@ -203,12 +201,16 @@ static int driverTokenType switch (lookBehind) { - case TOK_CELL_SET : good = driver_.isCellSet(ident); break; - case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; - case TOK_POINT_SET : good = driver_.isPointSet(ident); break; case TOK_CELL_ZONE : good = driver_.isCellZone(ident); break; + case TOK_CELL_SET : good = driver_.isCellSet(ident); break; + case TOK_FACE_ZONE : good = driver_.isFaceZone(ident); break; + case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; + + #ifdef TOK_POINT_ZONE case TOK_POINT_ZONE : good = driver_.isPointZone(ident); break; + case TOK_POINT_SET : good = driver_.isPointSet(ident); break; + #endif } if (good) @@ -224,65 +226,67 @@ static int driverTokenType return -2; // Extra safety } + #endif // Surface variables - distinguish from volume by size #ifdef TOK_SSCALAR_ID { const label len = driver_.mesh().nInternalFaces(); - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false, len)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false, len)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SSCALAR_ID, scalar); - checkFieldToken(TOK_SVECTOR_ID, vector); - checkFieldToken(TOK_SSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_STENSOR_ID, tensor); + doLocalCode(TOK_SSCALAR_ID, scalar); + doLocalCode(TOK_SVECTOR_ID, vector); + doLocalCode(TOK_SSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_STENSOR_ID, tensor); + #undef doLocalCode } #endif // Point variables #ifdef TOK_PSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, true)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, true)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_PSCALAR_ID, scalar); - checkFieldToken(TOK_PVECTOR_ID, vector); - checkFieldToken(TOK_PSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_PSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PSCALAR_ID, scalar); + doLocalCode(TOK_PVECTOR_ID, vector); + doLocalCode(TOK_PSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_PSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_PTENSOR_ID, tensor); + #undef doLocalCode } #endif // Volume variables #ifdef TOK_SCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SCALAR_ID, scalar); - checkFieldToken(TOK_VECTOR_ID, vector); - checkFieldToken(TOK_SPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_SYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_TENSOR_ID, tensor); + doLocalCode(TOK_SCALAR_ID, scalar); + doLocalCode(TOK_VECTOR_ID, vector); + doLocalCode(TOK_SPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_SYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_TENSOR_ID, tensor); + #undef doLocalCode } #endif - #undef checkFieldToken - // Check registered fields and/or disk-files { const word fieldType(driver_.getFieldClassName(ident)); @@ -298,7 +302,7 @@ static int driverTokenType return -1; } -} // End anonymous namespace +} // End namespace Foam /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -311,20 +315,29 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); -#line 320 "volumeExprScanner.cc" -static const int volumeExpr_start = 11; -static const int volumeExpr_first_final = 11; +#line 333 "volumeExprScanner.cc" +static const int volumeExpr_start = 13; +static const int volumeExpr_first_final = 13; static const int volumeExpr_error = 0; -static const int volumeExpr_en_main = 11; +static const int volumeExpr_en_main = 13; -#line 460 "volumeExprScanner.rl" +#line 480 "volumeExprScanner.rl" @@ -344,8 +357,7 @@ Foam::expressions::volumeExpr::scanner::~scanner() bool Foam::expressions::volumeExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -362,8 +374,8 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -376,10 +388,11 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_method bool Foam::expressions::volumeExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -404,12 +417,12 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -419,17 +432,28 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -437,8 +461,9 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -470,12 +495,13 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -538,9 +564,6 @@ bool Foam::expressions::volumeExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -556,7 +579,7 @@ bool Foam::expressions::volumeExpr::scanner::process // Initialize FSM variables -#line 560 "volumeExprScanner.cc" +#line 583 "volumeExprScanner.cc" { cs = volumeExpr_start; ts = 0; @@ -564,44 +587,49 @@ bool Foam::expressions::volumeExpr::scanner::process act = 0; } -#line 690 "volumeExprScanner.rl" +#line 720 "volumeExprScanner.rl" /* ^^^ FSM initialization here ^^^ */; -#line 572 "volumeExprScanner.cc" +#line 595 "volumeExprScanner.cc" { if ( p == pe ) goto _test_eof; switch ( cs ) { tr2: -#line 342 "volumeExprScanner.rl" +#line 358 "volumeExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr4: -#line 342 "volumeExprScanner.rl" +#line 358 "volumeExprScanner.rl" {te = p+1;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr5: -#line 320 "volumeExprScanner.rl" +#line 333 "volumeExprScanner.rl" {{p = ((te))-1;}{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -613,103 +641,122 @@ tr5: driver_.parsePosition() = (p-buf); }} - goto st11; + goto st13; tr8: -#line 385 "volumeExprScanner.rl" +#line 402 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(EQUAL); }} - goto st11; + goto st13; tr9: -#line 439 "volumeExprScanner.rl" +#line 456 "volumeExprScanner.rl" {{p = ((te))-1;}{ EMIT_TOKEN(TENSOR); }} - goto st11; + goto st13; tr11: -#line 447 "volumeExprScanner.rl" +#line 467 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(IDENTITY_TENSOR); }} - goto st11; + goto st13; tr12: -#line 388 "volumeExprScanner.rl" - {te = p+1;{ EMIT_TOKEN(LOR); }} - goto st11; +#line 455 "volumeExprScanner.rl" + {{p = ((te))-1;}{ EMIT_TOKEN(VECTOR); }} + goto st13; +tr14: +#line 464 "volumeExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(1,0,0); }} + goto st13; +tr15: +#line 465 "volumeExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,1,0); }} + goto st13; tr16: -#line 370 "volumeExprScanner.rl" +#line 466 "volumeExprScanner.rl" + {te = p+1;{ EMIT_VECTOR_TOKEN(0,0,1); }} + goto st13; +tr17: +#line 405 "volumeExprScanner.rl" + {te = p+1;{ EMIT_TOKEN(LOR); }} + goto st13; +tr21: +#line 387 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PERCENT); }} - goto st11; -tr19: -#line 371 "volumeExprScanner.rl" + goto st13; +tr24: +#line 388 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LPAREN); }} - goto st11; -tr20: -#line 372 "volumeExprScanner.rl" + goto st13; +tr25: +#line 389 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(RPAREN); }} - goto st11; -tr21: -#line 373 "volumeExprScanner.rl" + goto st13; +tr26: +#line 390 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(TIMES); }} - goto st11; -tr22: -#line 374 "volumeExprScanner.rl" + goto st13; +tr27: +#line 391 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(PLUS); }} - goto st11; -tr23: -#line 376 "volumeExprScanner.rl" + goto st13; +tr28: +#line 393 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COMMA); }} - goto st11; -tr24: -#line 375 "volumeExprScanner.rl" + goto st13; +tr29: +#line 392 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(MINUS); }} - goto st11; -tr26: -#line 378 "volumeExprScanner.rl" + goto st13; +tr31: +#line 395 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(DIVIDE); }} - goto st11; -tr28: -#line 380 "volumeExprScanner.rl" + goto st13; +tr33: +#line 397 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(COLON); }} - goto st11; -tr32: -#line 379 "volumeExprScanner.rl" + goto st13; +tr37: +#line 396 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(QUESTION); }} - goto st11; -tr35: -#line 391 "volumeExprScanner.rl" + goto st13; +tr40: +#line 408 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(BIT_XOR); }} - goto st11; -tr52: -#line 364 "volumeExprScanner.rl" + goto st13; +tr57: +#line 381 "volumeExprScanner.rl" {te = p;p--;} - goto st11; -tr53: -#line 369 "volumeExprScanner.rl" - {te = p;p--;{ EMIT_TOKEN(NOT); }} - goto st11; -tr54: + goto st13; +tr58: #line 386 "volumeExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(LNOT); }} + goto st13; +tr59: +#line 403 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(NOT_EQUAL); }} - goto st11; -tr55: -#line 389 "volumeExprScanner.rl" + goto st13; +tr60: +#line 406 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(BIT_AND); }} - goto st11; -tr56: -#line 387 "volumeExprScanner.rl" + goto st13; +tr61: +#line 404 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LAND); }} - goto st11; -tr57: -#line 377 "volumeExprScanner.rl" + goto st13; +tr62: +#line 394 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(DOT); }} - goto st11; -tr60: -#line 320 "volumeExprScanner.rl" + goto st13; +tr65: +#line 333 "volumeExprScanner.rl" {te = p;p--;{ + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -721,41 +768,42 @@ tr60: driver_.parsePosition() = (p-buf); }} - goto st11; -tr62: -#line 348 "volumeExprScanner.rl" + goto st13; +tr67: +#line 365 "volumeExprScanner.rl" {te = p;p--;{ // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr63: -#line 381 "volumeExprScanner.rl" + goto st13; +tr68: +#line 398 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LESS); }} - goto st11; -tr64: -#line 382 "volumeExprScanner.rl" + goto st13; +tr69: +#line 399 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(LESS_EQ); }} - goto st11; -tr65: -#line 383 "volumeExprScanner.rl" + goto st13; +tr70: +#line 400 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(GREATER); }} - goto st11; -tr66: -#line 384 "volumeExprScanner.rl" + goto st13; +tr71: +#line 401 "volumeExprScanner.rl" {te = p+1;{ EMIT_TOKEN(GREATER_EQ); }} - goto st11; -tr67: -#line 342 "volumeExprScanner.rl" + goto st13; +tr72: +#line 358 "volumeExprScanner.rl" {te = p;p--;{ + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); }} - goto st11; -tr69: + goto st13; +tr74: #line 1 "NONE" { switch( act ) { case 26: @@ -836,9 +884,6 @@ tr69: case 60: {{p = ((te))-1;} EMIT_TOKEN(BOOL); } break; - case 61: - {{p = ((te))-1;} EMIT_TOKEN(VECTOR); } - break; case 63: {{p = ((te))-1;} EMIT_TOKEN(SYM_TENSOR); } break; @@ -846,153 +891,158 @@ tr69: {{p = ((te))-1;} EMIT_TOKEN(SPH_TENSOR); } break; case 65: - {{p = ((te))-1;} EMIT_TOKEN(ZERO); } + {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } break; case 66: - {{p = ((te))-1;} EMIT_TOKEN(LTRUE); } + {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } break; case 67: - {{p = ((te))-1;} EMIT_TOKEN(LFALSE); } + {{p = ((te))-1;} EMIT_TOKEN(ZERO); } break; - case 69: + case 72: {{p = ((te))-1;} EMIT_TOKEN(ARG); } break; - case 70: + case 73: {{p = ((te))-1;} EMIT_TOKEN(TIME); } break; - case 71: + case 74: {{p = ((te))-1;} EMIT_TOKEN(DELTA_T); } break; - case 72: + case 75: {{p = ((te))-1;} + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } break; } } - goto st11; -tr85: -#line 413 "volumeExprScanner.rl" + goto st13; +tr90: +#line 430 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(ATAN); }} - goto st11; -tr100: -#line 409 "volumeExprScanner.rl" + goto st13; +tr105: +#line 426 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(COS); }} - goto st11; -tr121: -#line 402 "volumeExprScanner.rl" + goto st13; +tr126: +#line 419 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(LOG); }} - goto st11; -tr128: -#line 418 "volumeExprScanner.rl" + goto st13; +tr133: +#line 435 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(MAG); }} - goto st11; -tr135: -#line 422 "volumeExprScanner.rl" + goto st13; +tr140: +#line 439 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(NEG); }} - goto st11; -tr141: -#line 421 "volumeExprScanner.rl" + goto st13; +tr146: +#line 438 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(POS); }} - goto st11; -tr160: -#line 408 "volumeExprScanner.rl" + goto st13; +tr165: +#line 425 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SIN); }} - goto st11; -tr176: -#line 405 "volumeExprScanner.rl" + goto st13; +tr181: +#line 422 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(SQR); }} - goto st11; -tr192: -#line 410 "volumeExprScanner.rl" + goto st13; +tr197: +#line 427 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TAN); }} - goto st11; -tr198: -#line 439 "volumeExprScanner.rl" + goto st13; +tr203: +#line 456 "volumeExprScanner.rl" {te = p;p--;{ EMIT_TOKEN(TENSOR); }} - goto st11; -st11: + goto st13; +tr214: +#line 455 "volumeExprScanner.rl" + {te = p;p--;{ EMIT_TOKEN(VECTOR); }} + goto st13; +st13: #line 1 "NONE" {ts = 0;} if ( ++p == pe ) - goto _test_eof11; -case 11: + goto _test_eof13; +case 13: #line 1 "NONE" {ts = p;} -#line 925 "volumeExprScanner.cc" +#line 975 "volumeExprScanner.cc" switch( (*p) ) { - case 32: goto st12; - case 33: goto st13; + case 32: goto st14; + case 33: goto st15; case 34: goto st1; - case 37: goto tr16; - case 38: goto st14; + case 37: goto tr21; + case 38: goto st16; case 39: goto st3; - case 40: goto tr19; - case 41: goto tr20; - case 42: goto tr21; - case 43: goto tr22; - case 44: goto tr23; - case 45: goto tr24; - case 46: goto st15; - case 47: goto tr26; - case 58: goto tr28; - case 60: goto st20; + case 40: goto tr24; + case 41: goto tr25; + case 42: goto tr26; + case 43: goto tr27; + case 44: goto tr28; + case 45: goto tr29; + case 46: goto st17; + case 47: goto tr31; + case 58: goto tr33; + case 60: goto st22; case 61: goto st7; - case 62: goto st21; - case 63: goto tr32; - case 90: goto st24; - case 94: goto tr35; - case 95: goto st22; - case 97: goto st27; - case 98: goto st41; - case 99: goto st44; - case 100: goto st49; - case 101: goto st59; - case 102: goto st61; - case 108: goto st65; - case 109: goto st69; - case 110: goto st75; - case 112: goto st78; - case 114: goto st81; - case 115: goto st89; - case 116: goto st117; - case 118: goto st129; - case 119: goto st134; - case 124: goto st10; + case 62: goto st23; + case 63: goto tr37; + case 90: goto st26; + case 94: goto tr40; + case 95: goto st24; + case 97: goto st29; + case 98: goto st43; + case 99: goto st46; + case 100: goto st51; + case 101: goto st61; + case 102: goto st63; + case 108: goto st67; + case 109: goto st71; + case 110: goto st77; + case 112: goto st80; + case 114: goto st83; + case 115: goto st91; + case 116: goto st119; + case 118: goto st131; + case 119: goto st137; + case 124: goto st12; } if ( (*p) < 48 ) { if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; + goto st14; } else if ( (*p) > 57 ) { if ( (*p) > 89 ) { if ( 103 <= (*p) && (*p) <= 122 ) - goto st22; + goto st24; } else if ( (*p) >= 65 ) - goto st22; + goto st24; } else - goto tr27; + goto tr32; goto st0; st0: cs = 0; goto _out; -st12: +st14: if ( ++p == pe ) - goto _test_eof12; -case 12: + goto _test_eof14; +case 14: if ( (*p) == 32 ) - goto st12; + goto st14; if ( 9 <= (*p) && (*p) <= 13 ) - goto st12; - goto tr52; -st13: + goto st14; + goto tr57; +st15: if ( ++p == pe ) - goto _test_eof13; -case 13: + goto _test_eof15; +case 15: if ( (*p) == 61 ) - goto tr54; - goto tr53; + goto tr59; + goto tr58; st1: if ( ++p == pe ) goto _test_eof1; @@ -1007,13 +1057,13 @@ case 2: if ( (*p) == 34 ) goto tr2; goto st2; -st14: +st16: if ( ++p == pe ) - goto _test_eof14; -case 14: + goto _test_eof16; +case 16: if ( (*p) == 38 ) - goto tr56; - goto tr55; + goto tr61; + goto tr60; st3: if ( ++p == pe ) goto _test_eof3; @@ -1028,35 +1078,35 @@ case 4: if ( (*p) == 39 ) goto tr4; goto st4; -st15: +st17: if ( ++p == pe ) - goto _test_eof15; -case 15: + goto _test_eof17; +case 17: if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr58; + goto tr63; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else - goto st18; - goto tr57; -tr58: + goto st20; + goto tr62; +tr63: #line 1 "NONE" {te = p+1;} - goto st16; -st16: + goto st18; +st18: if ( ++p == pe ) - goto _test_eof16; -case 16: -#line 1053 "volumeExprScanner.cc" + goto _test_eof18; +case 18: +#line 1103 "volumeExprScanner.cc" switch( (*p) ) { case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr58; - goto tr60; + goto tr63; + goto tr65; st5: if ( ++p == pe ) goto _test_eof5; @@ -1066,56 +1116,56 @@ case 5: case 45: goto st6; } if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; st6: if ( ++p == pe ) goto _test_eof6; case 6: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; + goto st19; goto tr5; -st17: +st19: if ( ++p == pe ) - goto _test_eof17; -case 17: + goto _test_eof19; +case 19: if ( 48 <= (*p) && (*p) <= 57 ) - goto st17; - goto tr60; -st18: + goto st19; + goto tr65; +st20: if ( ++p == pe ) - goto _test_eof18; -case 18: + goto _test_eof20; +case 20: if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto st18; + goto st20; } else if ( (*p) >= 65 ) - goto st18; - goto tr62; -tr27: + goto st20; + goto tr67; +tr32: #line 1 "NONE" {te = p+1;} - goto st19; -st19: + goto st21; +st21: if ( ++p == pe ) - goto _test_eof19; -case 19: -#line 1104 "volumeExprScanner.cc" + goto _test_eof21; +case 21: +#line 1154 "volumeExprScanner.cc" switch( (*p) ) { - case 46: goto tr58; + case 46: goto tr63; case 69: goto st5; case 101: goto st5; } if ( 48 <= (*p) && (*p) <= 57 ) - goto tr27; - goto tr60; -st20: + goto tr32; + goto tr65; +st22: if ( ++p == pe ) - goto _test_eof20; -case 20: + goto _test_eof22; +case 22: if ( (*p) == 61 ) - goto tr64; - goto tr63; + goto tr69; + goto tr68; st7: if ( ++p == pe ) goto _test_eof7; @@ -1123,2562 +1173,2594 @@ case 7: if ( (*p) == 61 ) goto tr8; goto st0; -st21: +st23: if ( ++p == pe ) - goto _test_eof21; -case 21: + goto _test_eof23; +case 23: if ( (*p) == 61 ) - goto tr66; - goto tr65; -st22: + goto tr71; + goto tr70; +st24: if ( ++p == pe ) - goto _test_eof22; -case 22: + goto _test_eof24; +case 24: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; -tr68: + goto tr73; + goto tr72; +tr73: #line 1 "NONE" {te = p+1;} -#line 342 "volumeExprScanner.rl" - {act = 72;} - goto st23; -tr72: +#line 358 "volumeExprScanner.rl" + {act = 75;} + goto st25; +tr77: #line 1 "NONE" {te = p+1;} -#line 444 "volumeExprScanner.rl" - {act = 65;} - goto st23; -tr79: +#line 463 "volumeExprScanner.rl" + {act = 67;} + goto st25; +tr84: #line 1 "NONE" {te = p+1;} -#line 412 "volumeExprScanner.rl" +#line 429 "volumeExprScanner.rl" {act = 40;} - goto st23; -tr80: + goto st25; +tr85: #line 1 "NONE" {te = p+1;} -#line 448 "volumeExprScanner.rl" - {act = 69;} - goto st23; -tr82: +#line 468 "volumeExprScanner.rl" + {act = 72;} + goto st25; +tr87: #line 1 "NONE" {te = p+1;} -#line 411 "volumeExprScanner.rl" +#line 428 "volumeExprScanner.rl" {act = 39;} - goto st23; -tr86: + goto st25; +tr91: #line 1 "NONE" {te = p+1;} -#line 414 "volumeExprScanner.rl" +#line 431 "volumeExprScanner.rl" {act = 42;} - goto st23; -tr91: + goto st25; +tr96: #line 1 "NONE" {te = p+1;} -#line 430 "volumeExprScanner.rl" +#line 447 "volumeExprScanner.rl" {act = 55;} - goto st23; -tr94: + goto st25; +tr99: #line 1 "NONE" {te = p+1;} -#line 437 "volumeExprScanner.rl" +#line 454 "volumeExprScanner.rl" {act = 60;} - goto st23; -tr98: + goto st25; +tr103: #line 1 "NONE" {te = p+1;} -#line 407 "volumeExprScanner.rl" +#line 424 "volumeExprScanner.rl" {act = 35;} - goto st23; -tr101: + goto st25; +tr106: #line 1 "NONE" {te = p+1;} -#line 416 "volumeExprScanner.rl" +#line 433 "volumeExprScanner.rl" {act = 44;} - goto st23; -tr109: + goto st25; +tr114: #line 1 "NONE" {te = p+1;} -#line 399 "volumeExprScanner.rl" +#line 416 "volumeExprScanner.rl" {act = 27;} - goto st23; -tr112: + goto st25; +tr117: #line 1 "NONE" {te = p+1;} -#line 450 "volumeExprScanner.rl" - {act = 71;} - goto st23; -tr114: +#line 470 "volumeExprScanner.rl" + {act = 74;} + goto st25; +tr119: #line 1 "NONE" {te = p+1;} -#line 401 "volumeExprScanner.rl" +#line 418 "volumeExprScanner.rl" {act = 29;} - goto st23; -tr118: + goto st25; +tr123: #line 1 "NONE" {te = p+1;} -#line 446 "volumeExprScanner.rl" - {act = 67;} - goto st23; -tr123: +#line 462 "volumeExprScanner.rl" + {act = 66;} + goto st25; +tr128: #line 1 "NONE" {te = p+1;} -#line 403 "volumeExprScanner.rl" +#line 420 "volumeExprScanner.rl" {act = 31;} - goto st23; -tr127: + goto st25; +tr132: #line 1 "NONE" {te = p+1;} -#line 429 "volumeExprScanner.rl" +#line 446 "volumeExprScanner.rl" {act = 54;} - goto st23; -tr131: + goto st25; +tr136: #line 1 "NONE" {te = p+1;} -#line 419 "volumeExprScanner.rl" +#line 436 "volumeExprScanner.rl" {act = 47;} - goto st23; -tr132: + goto st25; +tr137: #line 1 "NONE" {te = p+1;} -#line 428 "volumeExprScanner.rl" +#line 445 "volumeExprScanner.rl" {act = 53;} - goto st23; -tr136: + goto st25; +tr141: #line 1 "NONE" {te = p+1;} -#line 424 "volumeExprScanner.rl" +#line 441 "volumeExprScanner.rl" {act = 51;} - goto st23; -tr137: + goto st25; +tr142: #line 1 "NONE" {te = p+1;} -#line 398 "volumeExprScanner.rl" +#line 415 "volumeExprScanner.rl" {act = 26;} - goto st23; -tr140: + goto st25; +tr145: #line 1 "NONE" {te = p+1;} -#line 404 "volumeExprScanner.rl" +#line 421 "volumeExprScanner.rl" {act = 32;} - goto st23; -tr142: + goto st25; +tr147: #line 1 "NONE" {te = p+1;} -#line 423 "volumeExprScanner.rl" +#line 440 "volumeExprScanner.rl" {act = 50;} - goto st23; -tr150: + goto st25; +tr155: #line 1 "NONE" {te = p+1;} -#line 400 "volumeExprScanner.rl" +#line 417 "volumeExprScanner.rl" {act = 28;} - goto st23; -tr151: + goto st25; +tr156: #line 1 "NONE" {te = p+1;} -#line 434 "volumeExprScanner.rl" +#line 451 "volumeExprScanner.rl" {act = 59;} - goto st23; -tr159: + goto st25; +tr164: #line 1 "NONE" {te = p+1;} -#line 425 "volumeExprScanner.rl" +#line 442 "volumeExprScanner.rl" {act = 52;} - goto st23; -tr161: + goto st25; +tr166: #line 1 "NONE" {te = p+1;} -#line 415 "volumeExprScanner.rl" +#line 432 "volumeExprScanner.rl" {act = 43;} - goto st23; -tr174: + goto st25; +tr179: #line 1 "NONE" {te = p+1;} -#line 441 "volumeExprScanner.rl" +#line 458 "volumeExprScanner.rl" {act = 64;} - goto st23; -tr177: + goto st25; +tr182: #line 1 "NONE" {te = p+1;} -#line 406 "volumeExprScanner.rl" +#line 423 "volumeExprScanner.rl" {act = 34;} - goto st23; -tr178: + goto st25; +tr183: #line 1 "NONE" {te = p+1;} -#line 431 "volumeExprScanner.rl" +#line 448 "volumeExprScanner.rl" {act = 56;} - goto st23; -tr186: + goto st25; +tr191: #line 1 "NONE" {te = p+1;} -#line 440 "volumeExprScanner.rl" +#line 457 "volumeExprScanner.rl" {act = 63;} - goto st23; -tr193: + goto st25; +tr198: #line 1 "NONE" {te = p+1;} -#line 417 "volumeExprScanner.rl" +#line 434 "volumeExprScanner.rl" {act = 45;} - goto st23; -tr201: + goto st25; +tr206: #line 1 "NONE" {te = p+1;} -#line 449 "volumeExprScanner.rl" - {act = 70;} - goto st23; -tr203: -#line 1 "NONE" - {te = p+1;} -#line 445 "volumeExprScanner.rl" - {act = 66;} - goto st23; +#line 469 "volumeExprScanner.rl" + {act = 73;} + goto st25; tr208: #line 1 "NONE" {te = p+1;} -#line 438 "volumeExprScanner.rl" - {act = 61;} - goto st23; -tr221: +#line 461 "volumeExprScanner.rl" + {act = 65;} + goto st25; +tr228: #line 1 "NONE" {te = p+1;} -#line 432 "volumeExprScanner.rl" +#line 449 "volumeExprScanner.rl" {act = 57;} - goto st23; -tr223: + goto st25; +tr230: #line 1 "NONE" {te = p+1;} -#line 433 "volumeExprScanner.rl" +#line 450 "volumeExprScanner.rl" {act = 58;} - goto st23; -st23: - if ( ++p == pe ) - goto _test_eof23; -case 23: -#line 1371 "volumeExprScanner.cc" - switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; - } else - goto tr68; - goto tr69; -st24: - if ( ++p == pe ) - goto _test_eof24; -case 24: - switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st25; - } - if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; - } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; - } else - goto tr68; - goto tr67; + goto st25; st25: if ( ++p == pe ) goto _test_eof25; case 25: +#line 1415 "volumeExprScanner.cc" switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st26; + case 46: goto tr73; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr74; st26: if ( ++p == pe ) goto _test_eof26; case 26: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto tr72; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st27; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st27: if ( ++p == pe ) goto _test_eof27; case 27: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 99: goto st28; - case 114: goto st30; - case 115: goto st31; - case 116: goto st33; - case 118: goto st36; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st28; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st28: if ( ++p == pe ) goto _test_eof28; case 28: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st29; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto tr77; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st29: if ( ++p == pe ) goto _test_eof29; case 29: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto tr79; + case 46: goto tr73; + case 95: goto tr73; + case 99: goto st30; + case 114: goto st32; + case 115: goto st33; + case 116: goto st35; + case 118: goto st38; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st30: if ( ++p == pe ) goto _test_eof30; case 30: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto tr80; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st31; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st31: if ( ++p == pe ) goto _test_eof31; case 31: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 105: goto st32; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto tr84; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st32: if ( ++p == pe ) goto _test_eof32; case 32: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto tr82; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto tr85; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st33: if ( ++p == pe ) goto _test_eof33; case 33: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st34; + case 46: goto tr73; + case 95: goto tr73; + case 105: goto st34; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st34: if ( ++p == pe ) goto _test_eof34; case 34: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto st35; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto tr87; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st35: if ( ++p == pe ) goto _test_eof35; case 35: switch( (*p) ) { - case 46: goto tr68; - case 50: goto tr86; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st36; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr85; + goto tr73; + goto tr72; st36: if ( ++p == pe ) goto _test_eof36; case 36: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st37; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto st37; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st37: if ( ++p == pe ) goto _test_eof37; case 37: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st38; + case 46: goto tr73; + case 50: goto tr91; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr90; st38: if ( ++p == pe ) goto _test_eof38; case 38: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st39; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st39; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st39: if ( ++p == pe ) goto _test_eof39; case 39: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st40; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st40; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st40: if ( ++p == pe ) goto _test_eof40; case 40: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto tr91; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st41; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st41: if ( ++p == pe ) goto _test_eof41; case 41: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st42; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st42; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st42: if ( ++p == pe ) goto _test_eof42; case 42: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st43; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto tr96; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st43: if ( ++p == pe ) goto _test_eof43; case 43: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 108: goto tr94; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st44; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st44: if ( ++p == pe ) goto _test_eof44; case 44: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 98: goto st45; - case 111: goto st47; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st45; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st45: if ( ++p == pe ) goto _test_eof45; case 45: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st46; + case 46: goto tr73; + case 95: goto tr73; + case 108: goto tr99; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st46: if ( ++p == pe ) goto _test_eof46; case 46: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 116: goto tr98; + case 46: goto tr73; + case 95: goto tr73; + case 98: goto st47; + case 111: goto st49; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st47: if ( ++p == pe ) goto _test_eof47; case 47: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st48; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st48; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st48: if ( ++p == pe ) goto _test_eof48; case 48: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 104: goto tr101; + case 46: goto tr73; + case 95: goto tr73; + case 116: goto tr103; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr100; + goto tr73; + goto tr72; st49: if ( ++p == pe ) goto _test_eof49; case 49: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st50; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st50; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st50: if ( ++p == pe ) goto _test_eof50; case 50: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st51; - case 108: goto st56; + case 46: goto tr73; + case 95: goto tr73; + case 104: goto tr106; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr105; st51: if ( ++p == pe ) goto _test_eof51; case 51: switch( (*p) ) { - case 46: goto tr68; - case 84: goto st52; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st52; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st52: if ( ++p == pe ) goto _test_eof52; case 52: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st53; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st53; + case 108: goto st58; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st53: if ( ++p == pe ) goto _test_eof53; case 53: switch( (*p) ) { - case 46: goto tr68; - case 82: goto st54; - case 95: goto tr68; + case 46: goto tr73; + case 84: goto st54; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st54: if ( ++p == pe ) goto _test_eof54; case 54: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st55; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st55; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st55: if ( ++p == pe ) goto _test_eof55; case 55: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 100: goto tr109; + case 46: goto tr73; + case 82: goto st56; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st56: if ( ++p == pe ) goto _test_eof56; case 56: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 116: goto st57; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st57; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st57: if ( ++p == pe ) goto _test_eof57; case 57: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st58; + case 46: goto tr73; + case 95: goto tr73; + case 100: goto tr114; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st58: if ( ++p == pe ) goto _test_eof58; case 58: switch( (*p) ) { - case 46: goto tr68; - case 84: goto tr112; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 116: goto st59; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st59: if ( ++p == pe ) goto _test_eof59; case 59: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 120: goto st60; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st60; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st60: if ( ++p == pe ) goto _test_eof60; case 60: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 112: goto tr114; + case 46: goto tr73; + case 84: goto tr117; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st61: if ( ++p == pe ) goto _test_eof61; case 61: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st62; + case 46: goto tr73; + case 95: goto tr73; + case 120: goto st62; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st62: if ( ++p == pe ) goto _test_eof62; case 62: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 108: goto st63; + case 46: goto tr73; + case 95: goto tr73; + case 112: goto tr119; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st63: if ( ++p == pe ) goto _test_eof63; case 63: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st64; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st64; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st64: if ( ++p == pe ) goto _test_eof64; case 64: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto tr118; + case 46: goto tr73; + case 95: goto tr73; + case 108: goto st65; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st65: if ( ++p == pe ) goto _test_eof65; case 65: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st66; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st66; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st66: if ( ++p == pe ) goto _test_eof66; case 66: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st67; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto tr123; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st67: if ( ++p == pe ) goto _test_eof67; case 67: switch( (*p) ) { - case 46: goto tr68; - case 49: goto st68; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st68; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr121; + goto tr73; + goto tr72; st68: if ( ++p == pe ) goto _test_eof68; case 68: switch( (*p) ) { - case 46: goto tr68; - case 48: goto tr123; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st69; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st69: if ( ++p == pe ) goto _test_eof69; case 69: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st70; - case 105: goto st74; + case 46: goto tr73; + case 49: goto st70; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr126; st70: if ( ++p == pe ) goto _test_eof70; case 70: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st71; - case 120: goto tr127; + case 46: goto tr73; + case 48: goto tr128; + case 95: goto tr73; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st71: if ( ++p == pe ) goto _test_eof71; case 71: switch( (*p) ) { - case 46: goto tr68; - case 83: goto st72; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st72; + case 105: goto st76; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr128; + goto tr73; + goto tr72; st72: if ( ++p == pe ) goto _test_eof72; case 72: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 113: goto st73; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st73; + case 120: goto tr132; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st73: if ( ++p == pe ) goto _test_eof73; case 73: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto tr131; + case 46: goto tr73; + case 83: goto st74; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr133; st74: if ( ++p == pe ) goto _test_eof74; case 74: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto tr132; + case 46: goto tr73; + case 95: goto tr73; + case 113: goto st75; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st75: if ( ++p == pe ) goto _test_eof75; case 75: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st76; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto tr136; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st76: if ( ++p == pe ) goto _test_eof76; case 76: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st77; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto tr137; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st77: if ( ++p == pe ) goto _test_eof77; case 77: switch( (*p) ) { - case 46: goto tr68; - case 48: goto tr136; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st78; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr135; + goto tr73; + goto tr72; st78: if ( ++p == pe ) goto _test_eof78; case 78: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 105: goto tr137; - case 111: goto st79; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st79; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st79: if ( ++p == pe ) goto _test_eof79; case 79: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st80; - case 119: goto tr140; + case 46: goto tr73; + case 48: goto tr141; + case 95: goto tr73; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr140; st80: if ( ++p == pe ) goto _test_eof80; case 80: switch( (*p) ) { - case 46: goto tr68; - case 48: goto tr142; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 105: goto tr142; + case 111: goto st81; } if ( (*p) < 65 ) { - if ( 49 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr141; + goto tr73; + goto tr72; st81: if ( ++p == pe ) goto _test_eof81; case 81: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st82; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st82; + case 119: goto tr145; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st82: if ( ++p == pe ) goto _test_eof82; case 82: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 100: goto st83; - case 110: goto st88; + case 46: goto tr73; + case 48: goto tr147; + case 95: goto tr73; } if ( (*p) < 65 ) { - if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + if ( 49 <= (*p) && (*p) <= 57 ) + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr146; st83: if ( ++p == pe ) goto _test_eof83; case 83: switch( (*p) ) { - case 46: goto tr68; - case 84: goto st84; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st84; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st84: if ( ++p == pe ) goto _test_eof84; case 84: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st85; + case 46: goto tr73; + case 95: goto tr73; + case 100: goto st85; + case 110: goto st90; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st85: if ( ++p == pe ) goto _test_eof85; case 85: switch( (*p) ) { - case 46: goto tr68; - case 68: goto st86; - case 95: goto tr68; + case 46: goto tr73; + case 84: goto st86; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st86: if ( ++p == pe ) goto _test_eof86; case 86: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st87; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st87; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st87: if ( ++p == pe ) goto _test_eof87; case 87: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto tr150; + case 46: goto tr73; + case 68: goto st88; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st88: if ( ++p == pe ) goto _test_eof88; case 88: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 100: goto tr151; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st89; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st89: if ( ++p == pe ) goto _test_eof89; case 89: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 105: goto st90; - case 112: goto st93; - case 113: goto st106; - case 117: goto st108; - case 121: goto st109; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto tr155; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st90: if ( ++p == pe ) goto _test_eof90; case 90: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st91; - case 110: goto st92; + case 46: goto tr73; + case 95: goto tr73; + case 100: goto tr156; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st91: if ( ++p == pe ) goto _test_eof91; case 91: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto tr159; + case 46: goto tr73; + case 95: goto tr73; + case 105: goto st92; + case 112: goto st95; + case 113: goto st108; + case 117: goto st110; + case 121: goto st111; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st92: if ( ++p == pe ) goto _test_eof92; case 92: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 104: goto tr161; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st93; + case 110: goto st94; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr160; + goto tr73; + goto tr72; st93: if ( ++p == pe ) goto _test_eof93; case 93: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 104: goto st94; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto tr164; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st94: if ( ++p == pe ) goto _test_eof94; case 94: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st95; + case 46: goto tr73; + case 95: goto tr73; + case 104: goto tr166; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr165; st95: if ( ++p == pe ) goto _test_eof95; case 95: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st96; + case 46: goto tr73; + case 95: goto tr73; + case 104: goto st96; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st96: if ( ++p == pe ) goto _test_eof96; case 96: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 105: goto st97; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st97; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st97: if ( ++p == pe ) goto _test_eof97; case 97: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 99: goto st98; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st98; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st98: if ( ++p == pe ) goto _test_eof98; case 98: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st99; + case 46: goto tr73; + case 95: goto tr73; + case 105: goto st99; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st99: if ( ++p == pe ) goto _test_eof99; case 99: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 108: goto st100; + case 46: goto tr73; + case 95: goto tr73; + case 99: goto st100; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st100: if ( ++p == pe ) goto _test_eof100; case 100: switch( (*p) ) { - case 46: goto tr68; - case 84: goto st101; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st101; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st101: if ( ++p == pe ) goto _test_eof101; case 101: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st102; + case 46: goto tr73; + case 95: goto tr73; + case 108: goto st102; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st102: if ( ++p == pe ) goto _test_eof102; case 102: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto st103; + case 46: goto tr73; + case 84: goto st103; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st103: if ( ++p == pe ) goto _test_eof103; case 103: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st104; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st104; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st104: if ( ++p == pe ) goto _test_eof104; case 104: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st105; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto st105; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st105: if ( ++p == pe ) goto _test_eof105; case 105: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto tr174; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st106; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st106: if ( ++p == pe ) goto _test_eof106; case 106: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st107; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st107; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st107: if ( ++p == pe ) goto _test_eof107; case 107: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 116: goto tr177; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto tr179; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr176; + goto tr73; + goto tr72; st108: if ( ++p == pe ) goto _test_eof108; case 108: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 109: goto tr178; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st109; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st109: if ( ++p == pe ) goto _test_eof109; case 109: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 109: goto st110; + case 46: goto tr73; + case 95: goto tr73; + case 116: goto tr182; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr181; st110: if ( ++p == pe ) goto _test_eof110; case 110: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 109: goto st111; + case 46: goto tr73; + case 95: goto tr73; + case 109: goto tr183; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st111: if ( ++p == pe ) goto _test_eof111; case 111: switch( (*p) ) { - case 46: goto tr68; - case 84: goto st112; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 109: goto st112; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st112: if ( ++p == pe ) goto _test_eof112; case 112: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st113; + case 46: goto tr73; + case 95: goto tr73; + case 109: goto st113; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st113: if ( ++p == pe ) goto _test_eof113; case 113: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto st114; + case 46: goto tr73; + case 84: goto st114; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st114: if ( ++p == pe ) goto _test_eof114; case 114: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st115; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st115; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st115: if ( ++p == pe ) goto _test_eof115; case 115: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st116; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto st116; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st116: if ( ++p == pe ) goto _test_eof116; case 116: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto tr186; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st117; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st117: if ( ++p == pe ) goto _test_eof117; case 117: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st118; - case 101: goto st120; - case 105: goto st125; - case 114: goto st127; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st118; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st118: if ( ++p == pe ) goto _test_eof118; case 118: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 110: goto st119; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto tr191; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st119: if ( ++p == pe ) goto _test_eof119; case 119: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 104: goto tr193; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st120; + case 101: goto st122; + case 105: goto st127; + case 114: goto st129; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr192; + goto tr73; + goto tr72; st120: if ( ++p == pe ) goto _test_eof120; case 120: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; case 110: goto st121; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st121: if ( ++p == pe ) goto _test_eof121; case 121: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 115: goto st122; + case 46: goto tr73; + case 95: goto tr73; + case 104: goto tr198; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr197; st122: if ( ++p == pe ) goto _test_eof122; case 122: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st123; + case 46: goto tr73; + case 95: goto tr73; + case 110: goto st123; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st123: if ( ++p == pe ) goto _test_eof123; case 123: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto tr197; + case 46: goto tr73; + case 95: goto tr73; + case 115: goto st124; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; -tr197: -#line 1 "NONE" - {te = p+1;} - goto st124; + goto tr73; + goto tr72; st124: if ( ++p == pe ) goto _test_eof124; case 124: -#line 3212 "volumeExprScanner.cc" switch( (*p) ) { - case 46: goto tr68; - case 58: goto st8; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st125; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr198; -st8: - if ( ++p == pe ) - goto _test_eof8; -case 8: - if ( (*p) == 58 ) - goto st9; - goto tr9; -st9: - if ( ++p == pe ) - goto _test_eof9; -case 9: - if ( (*p) == 73 ) - goto tr11; - goto tr9; + goto tr73; + goto tr72; st125: if ( ++p == pe ) goto _test_eof125; case 125: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 109: goto st126; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto tr202; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; +tr202: +#line 1 "NONE" + {te = p+1;} + goto st126; st126: if ( ++p == pe ) goto _test_eof126; case 126: +#line 3256 "volumeExprScanner.cc" switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto tr201; + case 46: goto tr73; + case 58: goto st8; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr203; +st8: + if ( ++p == pe ) + goto _test_eof8; +case 8: + if ( (*p) == 58 ) + goto st9; + goto tr9; +st9: + if ( ++p == pe ) + goto _test_eof9; +case 9: + if ( (*p) == 73 ) + goto tr11; + goto tr9; st127: if ( ++p == pe ) goto _test_eof127; case 127: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 117: goto st128; + case 46: goto tr73; + case 95: goto tr73; + case 109: goto st128; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st128: if ( ++p == pe ) goto _test_eof128; case 128: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto tr203; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto tr206; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st129: if ( ++p == pe ) goto _test_eof129; case 129: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st130; + case 46: goto tr73; + case 95: goto tr73; + case 117: goto st130; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st130: if ( ++p == pe ) goto _test_eof130; case 130: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 99: goto st131; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto tr208; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st131: if ( ++p == pe ) goto _test_eof131; case 131: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 116: goto st132; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st132; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st132: if ( ++p == pe ) goto _test_eof132; case 132: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 111: goto st133; + case 46: goto tr73; + case 95: goto tr73; + case 99: goto st133; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st133: if ( ++p == pe ) goto _test_eof133; case 133: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto tr208; + case 46: goto tr73; + case 95: goto tr73; + case 116: goto st134; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st134: if ( ++p == pe ) goto _test_eof134; case 134: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st135; + case 46: goto tr73; + case 95: goto tr73; + case 111: goto st135; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st135: if ( ++p == pe ) goto _test_eof135; case 135: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 105: goto st136; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto tr213; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; +tr213: +#line 1 "NONE" + {te = p+1;} + goto st136; st136: if ( ++p == pe ) goto _test_eof136; case 136: +#line 3455 "volumeExprScanner.cc" switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st137; + case 46: goto tr73; + case 58: goto st10; + case 95: goto tr73; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr214; +st10: + if ( ++p == pe ) + goto _test_eof10; +case 10: + if ( (*p) == 58 ) + goto st11; + goto tr12; +st11: + if ( ++p == pe ) + goto _test_eof11; +case 11: + switch( (*p) ) { + case 120: goto tr14; + case 121: goto tr15; + case 122: goto tr16; + } + goto tr12; st137: if ( ++p == pe ) goto _test_eof137; case 137: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 104: goto st138; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st138; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st138: if ( ++p == pe ) goto _test_eof138; case 138: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 116: goto st139; + case 46: goto tr73; + case 95: goto tr73; + case 105: goto st139; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st139: if ( ++p == pe ) goto _test_eof139; case 139: switch( (*p) ) { - case 46: goto tr68; - case 65: goto st140; - case 83: goto st146; - case 95: goto tr68; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st140; } - if ( (*p) < 66 ) { + if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st140: if ( ++p == pe ) goto _test_eof140; case 140: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 118: goto st141; + case 46: goto tr73; + case 95: goto tr73; + case 104: goto st141; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st141: if ( ++p == pe ) goto _test_eof141; case 141: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto st142; + case 46: goto tr73; + case 95: goto tr73; + case 116: goto st142; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st142: if ( ++p == pe ) goto _test_eof142; case 142: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 114: goto st143; + case 46: goto tr73; + case 65: goto st143; + case 83: goto st149; + case 95: goto tr73; } - if ( (*p) < 65 ) { + if ( (*p) < 66 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st143: if ( ++p == pe ) goto _test_eof143; case 143: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 97: goto st144; + case 46: goto tr73; + case 95: goto tr73; + case 118: goto st144; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 98 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st144: if ( ++p == pe ) goto _test_eof144; case 144: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 103: goto st145; + case 46: goto tr73; + case 95: goto tr73; + case 101: goto st145; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st145: if ( ++p == pe ) goto _test_eof145; case 145: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 101: goto tr221; + case 46: goto tr73; + case 95: goto tr73; + case 114: goto st146; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st146: if ( ++p == pe ) goto _test_eof146; case 146: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 117: goto st147; + case 46: goto tr73; + case 95: goto tr73; + case 97: goto st147; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { - if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + if ( 98 <= (*p) && (*p) <= 122 ) + goto tr73; } else - goto tr68; - goto tr67; + goto tr73; + goto tr72; st147: if ( ++p == pe ) goto _test_eof147; case 147: switch( (*p) ) { - case 46: goto tr68; - case 95: goto tr68; - case 109: goto tr223; + case 46: goto tr73; + case 95: goto tr73; + case 103: goto st148; } if ( (*p) < 65 ) { if ( 48 <= (*p) && (*p) <= 57 ) - goto tr68; + goto tr73; } else if ( (*p) > 90 ) { if ( 97 <= (*p) && (*p) <= 122 ) - goto tr68; + goto tr73; } else - goto tr68; - goto tr67; -st10: + goto tr73; + goto tr72; +st148: if ( ++p == pe ) - goto _test_eof10; -case 10: + goto _test_eof148; +case 148: + switch( (*p) ) { + case 46: goto tr73; + case 95: goto tr73; + case 101: goto tr228; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; + } else + goto tr73; + goto tr72; +st149: + if ( ++p == pe ) + goto _test_eof149; +case 149: + switch( (*p) ) { + case 46: goto tr73; + case 95: goto tr73; + case 117: goto st150; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; + } else + goto tr73; + goto tr72; +st150: + if ( ++p == pe ) + goto _test_eof150; +case 150: + switch( (*p) ) { + case 46: goto tr73; + case 95: goto tr73; + case 109: goto tr230; + } + if ( (*p) < 65 ) { + if ( 48 <= (*p) && (*p) <= 57 ) + goto tr73; + } else if ( (*p) > 90 ) { + if ( 97 <= (*p) && (*p) <= 122 ) + goto tr73; + } else + goto tr73; + goto tr72; +st12: + if ( ++p == pe ) + goto _test_eof12; +case 12: if ( (*p) == 124 ) - goto tr12; + goto tr17; goto st0; } - _test_eof11: cs = 11; goto _test_eof; - _test_eof12: cs = 12; goto _test_eof; _test_eof13: cs = 13; goto _test_eof; + _test_eof14: cs = 14; goto _test_eof; + _test_eof15: cs = 15; goto _test_eof; _test_eof1: cs = 1; goto _test_eof; _test_eof2: cs = 2; goto _test_eof; - _test_eof14: cs = 14; goto _test_eof; + _test_eof16: cs = 16; goto _test_eof; _test_eof3: cs = 3; goto _test_eof; _test_eof4: cs = 4; goto _test_eof; - _test_eof15: cs = 15; goto _test_eof; - _test_eof16: cs = 16; goto _test_eof; - _test_eof5: cs = 5; goto _test_eof; - _test_eof6: cs = 6; goto _test_eof; _test_eof17: cs = 17; goto _test_eof; _test_eof18: cs = 18; goto _test_eof; + _test_eof5: cs = 5; goto _test_eof; + _test_eof6: cs = 6; goto _test_eof; _test_eof19: cs = 19; goto _test_eof; _test_eof20: cs = 20; goto _test_eof; - _test_eof7: cs = 7; goto _test_eof; _test_eof21: cs = 21; goto _test_eof; _test_eof22: cs = 22; goto _test_eof; + _test_eof7: cs = 7; goto _test_eof; _test_eof23: cs = 23; goto _test_eof; _test_eof24: cs = 24; goto _test_eof; _test_eof25: cs = 25; goto _test_eof; @@ -3781,10 +3863,10 @@ case 10: _test_eof122: cs = 122; goto _test_eof; _test_eof123: cs = 123; goto _test_eof; _test_eof124: cs = 124; goto _test_eof; - _test_eof8: cs = 8; goto _test_eof; - _test_eof9: cs = 9; goto _test_eof; _test_eof125: cs = 125; goto _test_eof; _test_eof126: cs = 126; goto _test_eof; + _test_eof8: cs = 8; goto _test_eof; + _test_eof9: cs = 9; goto _test_eof; _test_eof127: cs = 127; goto _test_eof; _test_eof128: cs = 128; goto _test_eof; _test_eof129: cs = 129; goto _test_eof; @@ -3795,6 +3877,8 @@ case 10: _test_eof134: cs = 134; goto _test_eof; _test_eof135: cs = 135; goto _test_eof; _test_eof136: cs = 136; goto _test_eof; + _test_eof10: cs = 10; goto _test_eof; + _test_eof11: cs = 11; goto _test_eof; _test_eof137: cs = 137; goto _test_eof; _test_eof138: cs = 138; goto _test_eof; _test_eof139: cs = 139; goto _test_eof; @@ -3806,159 +3890,165 @@ case 10: _test_eof145: cs = 145; goto _test_eof; _test_eof146: cs = 146; goto _test_eof; _test_eof147: cs = 147; goto _test_eof; - _test_eof10: cs = 10; goto _test_eof; + _test_eof148: cs = 148; goto _test_eof; + _test_eof149: cs = 149; goto _test_eof; + _test_eof150: cs = 150; goto _test_eof; + _test_eof12: cs = 12; goto _test_eof; _test_eof: {} if ( p == eof ) { switch ( cs ) { - case 12: goto tr52; - case 13: goto tr53; - case 14: goto tr55; - case 15: goto tr57; + case 14: goto tr57; + case 15: goto tr58; case 16: goto tr60; + case 17: goto tr62; + case 18: goto tr65; case 5: goto tr5; case 6: goto tr5; - case 17: goto tr60; - case 18: goto tr62; - case 19: goto tr60; - case 20: goto tr63; + case 19: goto tr65; + case 20: goto tr67; case 21: goto tr65; - case 22: goto tr67; - case 23: goto tr69; - case 24: goto tr67; - case 25: goto tr67; - case 26: goto tr67; - case 27: goto tr67; - case 28: goto tr67; - case 29: goto tr67; - case 30: goto tr67; - case 31: goto tr67; - case 32: goto tr67; - case 33: goto tr67; - case 34: goto tr67; - case 35: goto tr85; - case 36: goto tr67; - case 37: goto tr67; - case 38: goto tr67; - case 39: goto tr67; - case 40: goto tr67; - case 41: goto tr67; - case 42: goto tr67; - case 43: goto tr67; - case 44: goto tr67; - case 45: goto tr67; - case 46: goto tr67; - case 47: goto tr67; - case 48: goto tr100; - case 49: goto tr67; - case 50: goto tr67; - case 51: goto tr67; - case 52: goto tr67; - case 53: goto tr67; - case 54: goto tr67; - case 55: goto tr67; - case 56: goto tr67; - case 57: goto tr67; - case 58: goto tr67; - case 59: goto tr67; - case 60: goto tr67; - case 61: goto tr67; - case 62: goto tr67; - case 63: goto tr67; - case 64: goto tr67; - case 65: goto tr67; - case 66: goto tr67; - case 67: goto tr121; - case 68: goto tr67; - case 69: goto tr67; - case 70: goto tr67; - case 71: goto tr128; - case 72: goto tr67; - case 73: goto tr67; - case 74: goto tr67; - case 75: goto tr67; - case 76: goto tr67; - case 77: goto tr135; - case 78: goto tr67; - case 79: goto tr67; - case 80: goto tr141; - case 81: goto tr67; - case 82: goto tr67; - case 83: goto tr67; - case 84: goto tr67; - case 85: goto tr67; - case 86: goto tr67; - case 87: goto tr67; - case 88: goto tr67; - case 89: goto tr67; - case 90: goto tr67; - case 91: goto tr67; - case 92: goto tr160; - case 93: goto tr67; - case 94: goto tr67; - case 95: goto tr67; - case 96: goto tr67; - case 97: goto tr67; - case 98: goto tr67; - case 99: goto tr67; - case 100: goto tr67; - case 101: goto tr67; - case 102: goto tr67; - case 103: goto tr67; - case 104: goto tr67; - case 105: goto tr67; - case 106: goto tr67; - case 107: goto tr176; - case 108: goto tr67; - case 109: goto tr67; - case 110: goto tr67; - case 111: goto tr67; - case 112: goto tr67; - case 113: goto tr67; - case 114: goto tr67; - case 115: goto tr67; - case 116: goto tr67; - case 117: goto tr67; - case 118: goto tr67; - case 119: goto tr192; - case 120: goto tr67; - case 121: goto tr67; - case 122: goto tr67; - case 123: goto tr67; - case 124: goto tr198; + case 22: goto tr68; + case 23: goto tr70; + case 24: goto tr72; + case 25: goto tr74; + case 26: goto tr72; + case 27: goto tr72; + case 28: goto tr72; + case 29: goto tr72; + case 30: goto tr72; + case 31: goto tr72; + case 32: goto tr72; + case 33: goto tr72; + case 34: goto tr72; + case 35: goto tr72; + case 36: goto tr72; + case 37: goto tr90; + case 38: goto tr72; + case 39: goto tr72; + case 40: goto tr72; + case 41: goto tr72; + case 42: goto tr72; + case 43: goto tr72; + case 44: goto tr72; + case 45: goto tr72; + case 46: goto tr72; + case 47: goto tr72; + case 48: goto tr72; + case 49: goto tr72; + case 50: goto tr105; + case 51: goto tr72; + case 52: goto tr72; + case 53: goto tr72; + case 54: goto tr72; + case 55: goto tr72; + case 56: goto tr72; + case 57: goto tr72; + case 58: goto tr72; + case 59: goto tr72; + case 60: goto tr72; + case 61: goto tr72; + case 62: goto tr72; + case 63: goto tr72; + case 64: goto tr72; + case 65: goto tr72; + case 66: goto tr72; + case 67: goto tr72; + case 68: goto tr72; + case 69: goto tr126; + case 70: goto tr72; + case 71: goto tr72; + case 72: goto tr72; + case 73: goto tr133; + case 74: goto tr72; + case 75: goto tr72; + case 76: goto tr72; + case 77: goto tr72; + case 78: goto tr72; + case 79: goto tr140; + case 80: goto tr72; + case 81: goto tr72; + case 82: goto tr146; + case 83: goto tr72; + case 84: goto tr72; + case 85: goto tr72; + case 86: goto tr72; + case 87: goto tr72; + case 88: goto tr72; + case 89: goto tr72; + case 90: goto tr72; + case 91: goto tr72; + case 92: goto tr72; + case 93: goto tr72; + case 94: goto tr165; + case 95: goto tr72; + case 96: goto tr72; + case 97: goto tr72; + case 98: goto tr72; + case 99: goto tr72; + case 100: goto tr72; + case 101: goto tr72; + case 102: goto tr72; + case 103: goto tr72; + case 104: goto tr72; + case 105: goto tr72; + case 106: goto tr72; + case 107: goto tr72; + case 108: goto tr72; + case 109: goto tr181; + case 110: goto tr72; + case 111: goto tr72; + case 112: goto tr72; + case 113: goto tr72; + case 114: goto tr72; + case 115: goto tr72; + case 116: goto tr72; + case 117: goto tr72; + case 118: goto tr72; + case 119: goto tr72; + case 120: goto tr72; + case 121: goto tr197; + case 122: goto tr72; + case 123: goto tr72; + case 124: goto tr72; + case 125: goto tr72; + case 126: goto tr203; case 8: goto tr9; case 9: goto tr9; - case 125: goto tr67; - case 126: goto tr67; - case 127: goto tr67; - case 128: goto tr67; - case 129: goto tr67; - case 130: goto tr67; - case 131: goto tr67; - case 132: goto tr67; - case 133: goto tr67; - case 134: goto tr67; - case 135: goto tr67; - case 136: goto tr67; - case 137: goto tr67; - case 138: goto tr67; - case 139: goto tr67; - case 140: goto tr67; - case 141: goto tr67; - case 142: goto tr67; - case 143: goto tr67; - case 144: goto tr67; - case 145: goto tr67; - case 146: goto tr67; - case 147: goto tr67; + case 127: goto tr72; + case 128: goto tr72; + case 129: goto tr72; + case 130: goto tr72; + case 131: goto tr72; + case 132: goto tr72; + case 133: goto tr72; + case 134: goto tr72; + case 135: goto tr72; + case 136: goto tr214; + case 10: goto tr12; + case 11: goto tr12; + case 137: goto tr72; + case 138: goto tr72; + case 139: goto tr72; + case 140: goto tr72; + case 141: goto tr72; + case 142: goto tr72; + case 143: goto tr72; + case 144: goto tr72; + case 145: goto tr72; + case 146: goto tr72; + case 147: goto tr72; + case 148: goto tr72; + case 149: goto tr72; + case 150: goto tr72; } } _out: {} } -#line 692 "volumeExprScanner.rl" +#line 722 "volumeExprScanner.rl" /* ^^^ FSM execution here ^^^ */; if (0 == cs) @@ -3972,7 +4062,7 @@ case 10: } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) diff --git a/src/finiteVolume/expressions/volume/volumeExprScanner.rl b/src/finiteVolume/expressions/volume/volumeExprScanner.rl index a1538290052..03b4e93c7b5 100644 --- a/src/finiteVolume/expressions/volume/volumeExprScanner.rl +++ b/src/finiteVolume/expressions/volume/volumeExprScanner.rl @@ -42,7 +42,6 @@ Description #undef DebugInfo #define DebugInfo if (debug & 0x2) InfoErr - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam @@ -55,22 +54,20 @@ namespace Foam #define TOKEN_PAIR(Name,T) { TOKEN_OF(T), Name } //- An {int, c_str} enum pairing for field types -#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } +#define FIELD_PAIR(Fld,T) { TOKEN_OF(T), Fld::typeName.c_str() } // Special handling for these known (stashed) look-back types +#define HAS_LOOKBEHIND_TOKENS static const Enum<int> lookBehindTokenEnums ({ - TOKEN_PAIR("cellSet", CELL_SET), - TOKEN_PAIR("faceSet", FACE_SET), - TOKEN_PAIR("pointSet", POINT_SET), - TOKEN_PAIR("cellZone", CELL_ZONE), - TOKEN_PAIR("faceZone", FACE_ZONE), - TOKEN_PAIR("pointZone", POINT_ZONE), + TOKEN_PAIR("cellZone", CELL_ZONE), TOKEN_PAIR("cellSet", CELL_SET), + TOKEN_PAIR("faceZone", FACE_ZONE), TOKEN_PAIR("faceSet", FACE_SET), + #ifdef TOK_POINT_ZONE + TOKEN_PAIR("pointZone", POINT_ZONE), TOKEN_PAIR("pointSet", POINT_SET), + #endif }); -#define HAS_LOOKBEHIND_TOKENS - // Special handling of predefined method types. Eg, .x(), .y(), ... static const Enum<int> fieldMethodEnums @@ -192,6 +189,7 @@ static int driverTokenType const word& ident ) { + #ifdef HAS_LOOKBEHIND_TOKENS // Get stashed "look-behind" to decide what type of identifier we expect const int lookBehind = driver_.resetStashedTokenId(); @@ -201,12 +199,16 @@ static int driverTokenType switch (lookBehind) { - case TOK_CELL_SET : good = driver_.isCellSet(ident); break; - case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; - case TOK_POINT_SET : good = driver_.isPointSet(ident); break; case TOK_CELL_ZONE : good = driver_.isCellZone(ident); break; + case TOK_CELL_SET : good = driver_.isCellSet(ident); break; + case TOK_FACE_ZONE : good = driver_.isFaceZone(ident); break; + case TOK_FACE_SET : good = driver_.isFaceSet(ident); break; + + #ifdef TOK_POINT_ZONE case TOK_POINT_ZONE : good = driver_.isPointZone(ident); break; + case TOK_POINT_SET : good = driver_.isPointSet(ident); break; + #endif } if (good) @@ -222,65 +224,67 @@ static int driverTokenType return -2; // Extra safety } + #endif // Surface variables - distinguish from volume by size #ifdef TOK_SSCALAR_ID { const label len = driver_.mesh().nInternalFaces(); - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false, len)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false, len)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SSCALAR_ID, scalar); - checkFieldToken(TOK_SVECTOR_ID, vector); - checkFieldToken(TOK_SSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_SSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_STENSOR_ID, tensor); + doLocalCode(TOK_SSCALAR_ID, scalar); + doLocalCode(TOK_SVECTOR_ID, vector); + doLocalCode(TOK_SSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_SSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_STENSOR_ID, tensor); + #undef doLocalCode } #endif // Point variables #ifdef TOK_PSCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, true)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, true)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_PSCALAR_ID, scalar); - checkFieldToken(TOK_PVECTOR_ID, vector); - checkFieldToken(TOK_PSPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_PSYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_PTENSOR_ID, tensor); + doLocalCode(TOK_PSCALAR_ID, scalar); + doLocalCode(TOK_PVECTOR_ID, vector); + doLocalCode(TOK_PSPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_PSYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_PTENSOR_ID, tensor); + #undef doLocalCode } #endif // Volume variables #ifdef TOK_SCALAR_ID { - #undef checkFieldToken - #define checkFieldToken(TokType, Type) \ - if (driver_.isVariable<Type>(ident, false)) \ - { \ - return TokType; \ + #undef doLocalCode + #define doLocalCode(TokType, Type) \ + if (driver_.isVariable<Type>(ident, false)) \ + { \ + return TokType; \ } - checkFieldToken(TOK_SCALAR_ID, scalar); - checkFieldToken(TOK_VECTOR_ID, vector); - checkFieldToken(TOK_SPH_TENSOR_ID, sphericalTensor); - checkFieldToken(TOK_SYM_TENSOR_ID, symmTensor); - checkFieldToken(TOK_TENSOR_ID, tensor); + doLocalCode(TOK_SCALAR_ID, scalar); + doLocalCode(TOK_VECTOR_ID, vector); + doLocalCode(TOK_SPH_TENSOR_ID, sphericalTensor); + doLocalCode(TOK_SYM_TENSOR_ID, symmTensor); + doLocalCode(TOK_TENSOR_ID, tensor); + #undef doLocalCode } #endif - #undef checkFieldToken - // Check registered fields and/or disk-files { const word fieldType(driver_.getFieldClassName(ident)); @@ -296,7 +300,7 @@ static int driverTokenType return -1; } -} // End anonymous namespace +} // End namespace Foam /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ @@ -309,7 +313,16 @@ static int driverTokenType #define EMIT_TOKEN(T) \ driver_.parsePosition() = (ts-buf); \ DebugInfo<< STRINGIFY(T) << " at " << driver_.parsePosition() << nl; \ - parser_->parse(TOKEN_OF(T), nullptr); \ + parser_->parse(TOKEN_OF(T)); \ + driver_.parsePosition() = (p-buf); + + +#define EMIT_VECTOR_TOKEN(X, Y, Z) \ + driver_.parsePosition() = (ts-buf); \ + DebugInfo<< "VECTOR at " << driver_.parsePosition() << nl; \ + scanToken scanTok; \ + scanTok.setVector(X,Y,Z); \ + parser_->parse(TOK_VECTOR_VALUE, scanTok); \ driver_.parsePosition() = (p-buf); @@ -318,15 +331,18 @@ static int driverTokenType write data; action emit_number { + // Emit number driver_.parsePosition() = (ts-buf); DebugInfo << "Number:" << std::string(ts, te-ts).c_str() << " at " << driver_.parsePosition() << nl; - if (readScalar(std::string(ts, te-ts), scanTok.svalue)) + scanToken scanTok; + scanTok.setScalar(0); + if (readScalar(std::string(ts, te-ts), scanTok.scalarValue)) { - parser_->parse(TOKEN_OF(NUMBER), &scanTok); + parser_->parse(TOKEN_OF(NUMBER), scanTok); } else { @@ -340,15 +356,16 @@ static int driverTokenType } action emit_ident { + // Emit identifier driver_.parsePosition() = (ts-buf); - dispatch_ident(driver_, scanTok, word(ts, te-ts, false)); + dispatch_ident(driver_, word(ts, te-ts, false)); driver_.parsePosition() = (p-buf); } action emit_method { // Tokenized ".method" - dispatch '.' and "method" separately driver_.parsePosition() = (ts-buf); - dispatch_method(driver_, scanTok, word(ts+1, te-ts-1, false)); + dispatch_method(driver_, word(ts+1, te-ts-1, false)); driver_.parsePosition() = (p-buf); } @@ -366,7 +383,7 @@ static int driverTokenType number => emit_number; ## Operators - '!' =>{ EMIT_TOKEN(NOT); }; + '!' =>{ EMIT_TOKEN(LNOT); }; '%' =>{ EMIT_TOKEN(PERCENT); }; '(' =>{ EMIT_TOKEN(LPAREN); }; ')' =>{ EMIT_TOKEN(RPAREN); }; @@ -387,7 +404,7 @@ static int driverTokenType '&&' =>{ EMIT_TOKEN(LAND); }; '||' =>{ EMIT_TOKEN(LOR); }; '&' =>{ EMIT_TOKEN(BIT_AND); }; -## Not needed? '|' =>{ EMIT_TOKEN(BIT_OK); }; +## Not needed? '|' =>{ EMIT_TOKEN(BIT_OR); }; '^' =>{ EMIT_TOKEN(BIT_XOR); }; ## Some '.method' - Error if unknown @@ -441,9 +458,12 @@ static int driverTokenType "sphericalTensor" =>{ EMIT_TOKEN(SPH_TENSOR); }; ## Single value (constants, etc) - "Zero" =>{ EMIT_TOKEN(ZERO); }; "true" =>{ EMIT_TOKEN(LTRUE); }; "false" =>{ EMIT_TOKEN(LFALSE); }; + "Zero" =>{ EMIT_TOKEN(ZERO); }; + "vector::x" =>{ EMIT_VECTOR_TOKEN(1,0,0); }; + "vector::y" =>{ EMIT_VECTOR_TOKEN(0,1,0); }; + "vector::z" =>{ EMIT_VECTOR_TOKEN(0,0,1); }; "tensor::I" =>{ EMIT_TOKEN(IDENTITY_TENSOR); }; "arg" =>{ EMIT_TOKEN(ARG); }; "time" =>{ EMIT_TOKEN(TIME); }; @@ -476,8 +496,7 @@ Foam::expressions::volumeExpr::scanner::~scanner() bool Foam::expressions::volumeExpr::scanner::dispatch_method ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { if (ident[0] == '.') @@ -494,8 +513,8 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_method if (methType > 0) { // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -508,10 +527,11 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_method bool Foam::expressions::volumeExpr::scanner::dispatch_ident ( const parseDriver& driver_, - scanToken& scanTok, - word&& ident + word ident ) const { + // Peek at stashed "look-behind". It may influence decisions + int lookBehindTok = driver_.stashedTokenId(); int tokType = -1; const bool quoted = @@ -536,12 +556,12 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << "Emit:" << ident << " function:" << parser_->tokenName(tokType) << nl; - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #ifdef HAS_LOOKBEHIND_TOKENS - // Specials such "cset" also reset the look-behind + // Specials such "cellSet" etc also reset the look-behind tokType = lookBehindTokenEnums.lookup(ident, -1); if (tokType > 0) @@ -551,17 +571,28 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << parser_->tokenName(tokType) << nl; driver_.resetStashedTokenId(tokType); - parser_->parse(tokType, nullptr); + parser_->parse(tokType); return true; } #endif } + // Functions: scalar, vector, probably don't need others + // - "fn:" prefix to avoid any ambiguities + if (lookBehindTok <= 0 && ident.starts_with("fn:")) + { + word funcName(ident.substr(3)); // strip prefix - // Can also peek at stashed "look-behind" - // const int lookBehind = driver_.stashedTokenId(); + do + { + } + while (false); + } - tokType = driverTokenType(driver_, ident); + if (tokType <= 0) + { + tokType = driverTokenType(driver_, ident); + } if (tokType > 0) { @@ -569,8 +600,9 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident << "Emit:" << ident << " token:" << parser_->tokenName(tokType) << nl; - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); return true; } @@ -602,12 +634,13 @@ bool Foam::expressions::volumeExpr::scanner::dispatch_ident // The field (before the ".") ident.erase(dot); - scanTok.name = new Foam::word(std::move(ident)); - parser_->parse(tokType, &scanTok); + scanToken scanTok; + scanTok.setWord(ident); + parser_->parse(tokType, scanTok); // Dispatch '.' and "method" separately - parser_->parse(TOK_DOT, nullptr); - parser_->parse(methType, nullptr); + parser_->parse(TOK_DOT); + parser_->parse(methType); return true; } @@ -670,9 +703,6 @@ bool Foam::expressions::volumeExpr::scanner::process parser_->start(driver_); - // Scan token type - scanToken scanTok; - // Token start/end (Ragel naming) const char* ts; const char* te; @@ -702,7 +732,7 @@ bool Foam::expressions::volumeExpr::scanner::process } // Terminate parser execution - parser_->parse(0, nullptr); + parser_->parse(0); parser_->stop(); if (debug & 0x6) -- GitLab