Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
f2f2f60c
Commit
f2f2f60c
authored
Feb 25, 2010
by
Mark Olesen
Browse files
STYLE: remove unused cruft from flex-based lexers
parent
9352e17e
Changes
6
Hide whitespace changes
Inline
Side-by-side
applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L
View file @
f2f2f60c
...
...
@@ -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}
...
...
applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L
View file @
f2f2f60c
...
...
@@ -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 [.:-]
identifier {alpha}({alpha}|{digit})*
integer {dec_digit}+
label [0-9]{dec_digit}*
dotColonDash [.:-]
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})
...
...
src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L
View file @
f2f2f60c
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-200
9
OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-20
1
0 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 {float
Num
}
y {float
Num
}
z {float
Num
}
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}{float
Num
}{some_space}{float
Num
}{some_space}{float
Num
}{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})*
}
}
<readVertex>{space}{float}{space} {
<readVertex>{space}{float
Num
}{space} {
vertex[cmpt++] = atof(YYText());
if (cmpt == 3)
...
...
src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L
View file @
f2f2f60c
/*--------------------------------
---------
----------------------------------*\
/*--------------------------------
*- C++ -*
----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-200
9
OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-20
1
0 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}
...
...
src/triSurface/triSurface/interfaces/STL/readSTLASCII.L
View file @
f2f2f60c
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-200
9
OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-20
1
0 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 {float
Num
}
y {float
Num
}
z {float
Num
}
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}{float
Num
}{some_space}{float
Num
}{some_space}{float
Num
}{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})*
}
}
<readVertex>{space}{float}{space} {
<readVertex>{space}{float
Num
}{space} {
vertex[cmpt++] = atof(YYText());
if (cmpt == 3)
...
...
wmake/src/wmkdep.l
View file @
f2f2f60c
%{
/*---------------------------------
-------
-----------------------------------*\
/*---------------------------------
*- C -*
-----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 1991-200
9
OpenCFD Ltd.
\\ / A nd | Copyright (C) 1991-20
1
0 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;
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment