diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index f452a9f083..6cbe8aac27 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -91,23 +91,20 @@ cspace ","{space} alpha [_A-Za-z] digit [0-9] -dec_digit [0-9] -octal_digit [0-7] -hex_digit [0-9a-fA-F] identifier {alpha}({alpha}|{digit})* -integer {dec_digit}+ -label [1-9]{dec_digit}* +integer {digit}+ +label [1-9]{digit}* exponent_part [eE][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+"."?)) -double (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) +floatNum (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) -x {double} -y {double} -z {double} -value {double} +x {floatNum} +y {floatNum} +z {floatNum} +value {floatNum} node ^{space}"N"{cspace} element ^{space}"EN"{cspace} diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 36be409753..6a4447e677 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -95,24 +95,14 @@ int yyFlexLexer::yywrap() one_space [ \t\f\r] space {one_space}* some_space {one_space}+ -cspace ","{space} spaceNl ({space}|\n)* alpha [_[:alpha:]] digit [[:digit:]] -dec_digit [[:digit:]] -octal_digit [0-7] -hex_digit [[:xdigit:]] -lbrac "(" -rbrac ")" -quote \" -dash "-" -dotColonDash [.:-] +dotColonDash [.:-] -identifier {alpha}({alpha}|{digit})* -integer {dec_digit}+ -label [0-9]{dec_digit}* +label [0-9]{digit}* zeroLabel {digit}* word ({alpha}|{digit}|{dotColonDash})* @@ -120,14 +110,14 @@ word ({alpha}|{digit}|{dotColonDash})* exponent_part [eE][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+"."?)) -double ((({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))|0) +floatNum ((({fractional_constant}{exponent_part}?)|({digit}+{exponent_part}))|0) + +x {floatNum} +y {floatNum} +z {floatNum} -x {double} -y {double} -z {double} -scalar {double} labelListElement {space}{zeroLabel} -scalarListElement {space}{double} +scalarListElement {space}{floatNum} labelList ({labelListElement}+{space}) scalarList ({scalarListElement}+{space}) diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L index 4bf7880c25..d7f6193803 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,18 +152,11 @@ STLASCIILexer::STLASCIILexer(istream* is, const label approxNpoints) one_space [ \t\f\r] space {one_space}* some_space {one_space}+ -cspace ","{space} alpha [_A-Za-z] digit [0-9] -dec_digit [0-9] -octal_digit [0-7] -hex_digit [0-9a-fA-F] -identifier {alpha}({alpha}|{digit})* -integer {dec_digit}+ -label [1-9]{dec_digit}* -zeroLabel {digit}* +integer {digit}+ signedInteger [-+]?{integer} word ([[:alnum:]]|[[:punct:]])* @@ -172,15 +165,14 @@ string {word}({some_space}{word})* exponent_part [eE][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+"."?)) -double (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) -float {double} +floatNum (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) -x {float} -y {float} -z {float} +x {floatNum} +y {floatNum} +z {floatNum} solid {space}("solid"|"SOLID"){space} -color {space}("color"|"COLOR"){some_space}{float}{some_space}{float}{some_space}{float}{space} +color {space}("color"|"COLOR"){some_space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space} facet {space}("facet"|"FACET"){space} normal {space}("normal"|"NORMAL"){space} point {space}{x}{some_space}{y}{some_space}{z}{space} @@ -337,7 +329,7 @@ endsolid {space}("endsolid"|"ENDSOLID")({some_space}{word})* } } -{space}{float}{space} { +{space}{floatNum}{space} { vertex[cmpt++] = atof(YYText()); if (cmpt == 3) diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index 5c704720ae..474152df28 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -1,8 +1,8 @@ -/*---------------------------------------------------------------------------*\ +/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,26 +103,14 @@ Foam::word foamName(const Foam::string& s) one_space [ \t\f\r] space {one_space}* some_space {one_space}+ -cspace ","{space} alpha [_A-Za-z] digit [0-9] -dec_digit [0-9] -octal_digit [0-7] -hex_digit [0-9a-fA-F] - -identifier {alpha}({alpha}|{digit})* -integer {dec_digit}+ -label [1-9]{dec_digit}* -zeroLabel {digit}* - -word ([[:alnum:]]|[[:punct:]])+ -string {word}({some_space}{word})* exponent_part [eEdD][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+"."?)) -double (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) +floatNum (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) elements {space}("ELEMENTS"|"ELEM"){space} @@ -134,10 +122,10 @@ end {space}"END"{space} elementName {space}([A-Z]|([A-Z][A-Z])){space} startIsotopeMolW {space}"/"{space} -isotopeMolW {space}{double}{space}"/"{space} +isotopeMolW {space}{floatNum}{space}"/"{space} specieName {space}[A-Za-z](([A-Za-z0-9)*+-])|("("[^+]))*{space} -nMoles {space}{double}{space} +nMoles {space}{floatNum}{space} thermoTemp .{10} @@ -160,13 +148,13 @@ reversibleReactionDelimiter {space}("="|"<=>"){space} irreversibleReactionDelimiter {space}"=>"{space} startPDependentSpecie {space}"("{space}"+"{space} pDependentSpecie {specieName}")"{space} -reactionCoeffs {space}{double}{some_space}{double}{some_space}{double}{space} +reactionCoeffs {space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space} reactionKeyword {space}[A-Za-z](([A-Za-z0-9)*-])|("("[^+]))*{space} reactionKeywordSlash {reactionKeyword}"/"{space} -thirdBodyEfficiency {space}{double}{space}"/"{space} +thirdBodyEfficiency {space}{floatNum}{space}"/"{space} startReactionCoeffs {space}"/"{space} endReactionCoeffs {space}"/"{space} -reactionCoeff {space}{double}{space} +reactionCoeff {space}{floatNum}{space} calPerMol {space}"CAL/MOLE"{space} kcalPerMol {space}"KCAL/MOLE"{space} diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L index 2d04d36407..59cf2a9c00 100644 --- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,19 +153,12 @@ STLLexer::STLLexer(istream* is, const label approxNpoints) one_space [ \t\f\r] space {one_space}* some_space {one_space}+ -cspace ","{space} alpha [_A-Za-z] digit [0-9] -dec_digit [0-9] -octal_digit [0-7] -hex_digit [0-9a-fA-F] -identifier {alpha}({alpha}|{digit})* -integer {dec_digit}+ -label [1-9]{dec_digit}* -zeroLabel {digit}* -signedInteger [-+]?{integer} +integer {digit}+ +signedInteger [-+]?{digit}+ word ([[:alnum:]]|[[:punct:]])* string {word}({some_space}{word})* @@ -173,15 +166,14 @@ string {word}({some_space}{word})* exponent_part [eE][-+]?{digit}+ fractional_constant [-+]?(({digit}*"."{digit}+)|({digit}+"."?)) -double (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) -float {double} +floatNum (({fractional_constant}{exponent_part}?)|({digit}+{exponent_part})) -x {float} -y {float} -z {float} +x {floatNum} +y {floatNum} +z {floatNum} solid {space}("solid"|"SOLID"){space} -color {space}("color"|"COLOR"){some_space}{float}{some_space}{float}{some_space}{float}{space} +color {space}("color"|"COLOR"){some_space}{floatNum}{some_space}{floatNum}{some_space}{floatNum}{space} facet {space}("facet"|"FACET"){space} normal {space}("normal"|"NORMAL"){space} point {space}{x}{some_space}{y}{some_space}{z}{space} @@ -320,7 +312,7 @@ endsolid {space}("endsolid"|"ENDSOLID")({some_space}{word})* } } -{space}{float}{space} { +{space}{floatNum}{space} { vertex[cmpt++] = atof(YYText()); if (cmpt == 3) diff --git a/wmake/src/wmkdep.l b/wmake/src/wmkdep.l index 43eb4899b7..e4422104ad 100644 --- a/wmake/src/wmkdep.l +++ b/wmake/src/wmkdep.l @@ -1,9 +1,9 @@ %{ -/*---------------------------------------------------------------------------*\ +/*---------------------------------*- C -*-----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------ License @@ -52,7 +52,7 @@ void nextFile(const char* fileName); void importFile(const char* fileName); void importDirectory(const char* dirName); -# undef yywrap /* sometimes a macro by default */ +# undef yywrap /* sometimes a macro by default */ %} @@ -164,9 +164,11 @@ int main(int argc, char* argv[]) (&sourceFile[strlen(sourceFile) - 1] - dotPtr)/sizeof(char) ); - /* initialise depFile to zero and use strncat rather than strncpy - because there is a bug in the SGI strncat that if 0 preceeds the . - it inserts a space */ + /* + * initialise depFile to zero and use strncat rather than strncpy + * because there is a bug in the SGI strncat that if 0 preceeds the '.' + * it inserts a space + */ depFile = (char*)malloc(strlen(sourceFile) + 3); depFile[0] = 0; strncat(depFile, sourceFile, (dotPtr - sourceFile)/sizeof(char)); @@ -432,7 +434,7 @@ void importDirectory(const char* dirName) int yywrap() { /* Close the file for the buffer which has just reached EOF */ - /* This causes strange problems + /* This causes strange problems on some systems fclose(yyin); yyin = 0; */