mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
Merge remote-tracking branch 'origin/master' into develop
This commit is contained in:
@ -96,7 +96,7 @@ else
|
||||
|
||||
fileName="$className$Type"
|
||||
|
||||
echo "$Script: Creating new interface file $fileName"
|
||||
echo "$Script: Creating new code file $fileName"
|
||||
if [ -e "$fileName" ]
|
||||
then
|
||||
echo " Error: file exists"
|
||||
|
||||
@ -32,9 +32,11 @@ rm -f Make/options
|
||||
echo "Creating Make/options"
|
||||
|
||||
echo 'EXE_INC = \
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude' > Make/options
|
||||
-I$(LIB_SRC)/finiteVolume/lnInclude \
|
||||
-I$(LIB_SRC)/meshTools/lnInclude' > Make/options
|
||||
echo >> Make/options
|
||||
echo 'EXE_LIBS = \
|
||||
-lfiniteVolume' >> Make/options
|
||||
-lfiniteVolume \
|
||||
-lmeshTools' >> Make/options
|
||||
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
@ -73,7 +73,7 @@ Note
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
// Ragel switchs may have several implicit fallthroughs
|
||||
// Ragel switches may have several implicit fallthroughs
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
|
||||
// Length of the input read buffer
|
||||
@ -312,7 +312,7 @@ namespace Files
|
||||
// Can use 'variable p xxx;' etc to change these names
|
||||
|
||||
|
||||
#line 337 "wmkdepend.rl"
|
||||
#line 341 "wmkdepend.rl"
|
||||
|
||||
|
||||
|
||||
@ -328,15 +328,31 @@ static const int wmkdep_error = 0;
|
||||
static const int wmkdep_en_main = 21;
|
||||
|
||||
|
||||
#line 345 "wmkdepend.rl"
|
||||
#line 349 "wmkdepend.rl"
|
||||
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
void processFile(std::string fileName);
|
||||
|
||||
//
|
||||
// Open a file and process.
|
||||
// The file name is given by the [first,last) range
|
||||
//
|
||||
void processFile(const char* first, const char* last)
|
||||
{
|
||||
// Extra safety
|
||||
if (first && last && last > first)
|
||||
{
|
||||
processFile(std::string(first, last));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Open a file and process
|
||||
//
|
||||
void processFile(const std::string& fileName)
|
||||
void processFile(std::string fileName)
|
||||
{
|
||||
FILE* infile = Files::open(fileName);
|
||||
if (optVerbose)
|
||||
@ -351,7 +367,7 @@ void processFile(const std::string& fileName)
|
||||
int act, cs;
|
||||
|
||||
|
||||
#line 355 "wmkdepend.cpp"
|
||||
#line 371 "wmkdepend.cpp"
|
||||
{
|
||||
cs = wmkdep_start;
|
||||
ts = 0;
|
||||
@ -359,7 +375,7 @@ void processFile(const std::string& fileName)
|
||||
act = 0;
|
||||
}
|
||||
|
||||
#line 366 "wmkdepend.rl"
|
||||
#line 386 "wmkdepend.rl"
|
||||
/* ^^^ FSM initialization here ^^^ */;
|
||||
|
||||
// Local token start
|
||||
@ -404,7 +420,7 @@ void processFile(const std::string& fileName)
|
||||
}
|
||||
|
||||
|
||||
#line 408 "wmkdepend.cpp"
|
||||
#line 424 "wmkdepend.cpp"
|
||||
{
|
||||
if ( p == pe )
|
||||
goto _test_eof;
|
||||
@ -423,35 +439,35 @@ tr0:
|
||||
}
|
||||
goto st21;
|
||||
tr2:
|
||||
#line 335 "wmkdepend.rl"
|
||||
#line 339 "wmkdepend.rl"
|
||||
{te = p+1;}
|
||||
goto st21;
|
||||
tr17:
|
||||
#line 335 "wmkdepend.rl"
|
||||
#line 339 "wmkdepend.rl"
|
||||
{{p = ((te))-1;}}
|
||||
goto st21;
|
||||
tr21:
|
||||
#line 330 "wmkdepend.rl"
|
||||
#line 334 "wmkdepend.rl"
|
||||
{te = p+1;}
|
||||
goto st21;
|
||||
tr29:
|
||||
#line 333 "wmkdepend.rl"
|
||||
#line 337 "wmkdepend.rl"
|
||||
{te = p+1;}
|
||||
goto st21;
|
||||
tr31:
|
||||
#line 332 "wmkdepend.rl"
|
||||
#line 336 "wmkdepend.rl"
|
||||
{te = p+1;}
|
||||
goto st21;
|
||||
tr36:
|
||||
#line 327 "wmkdepend.rl"
|
||||
#line 331 "wmkdepend.rl"
|
||||
{te = p;p--;}
|
||||
goto st21;
|
||||
tr37:
|
||||
#line 335 "wmkdepend.rl"
|
||||
#line 339 "wmkdepend.rl"
|
||||
{te = p;p--;}
|
||||
goto st21;
|
||||
tr38:
|
||||
#line 333 "wmkdepend.rl"
|
||||
#line 337 "wmkdepend.rl"
|
||||
{te = p;p--;}
|
||||
goto st21;
|
||||
st21:
|
||||
@ -464,7 +480,7 @@ st21:
|
||||
case 21:
|
||||
#line 1 "NONE"
|
||||
{ts = p;}
|
||||
#line 468 "wmkdepend.cpp"
|
||||
#line 484 "wmkdepend.cpp"
|
||||
switch( (*p) ) {
|
||||
case 10: goto st23;
|
||||
case 11: goto tr34;
|
||||
@ -485,14 +501,14 @@ case 1:
|
||||
tr32:
|
||||
#line 1 "NONE"
|
||||
{te = p+1;}
|
||||
#line 327 "wmkdepend.rl"
|
||||
#line 331 "wmkdepend.rl"
|
||||
{act = 1;}
|
||||
goto st22;
|
||||
st22:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof22;
|
||||
case 22:
|
||||
#line 496 "wmkdepend.cpp"
|
||||
#line 512 "wmkdepend.cpp"
|
||||
switch( (*p) ) {
|
||||
case 10: goto st23;
|
||||
case 11: goto tr34;
|
||||
@ -514,14 +530,14 @@ case 23:
|
||||
tr34:
|
||||
#line 1 "NONE"
|
||||
{te = p+1;}
|
||||
#line 327 "wmkdepend.rl"
|
||||
#line 331 "wmkdepend.rl"
|
||||
{act = 1;}
|
||||
goto st24;
|
||||
st24:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof24;
|
||||
case 24:
|
||||
#line 525 "wmkdepend.cpp"
|
||||
#line 541 "wmkdepend.cpp"
|
||||
switch( (*p) ) {
|
||||
case 10: goto st23;
|
||||
case 32: goto tr34;
|
||||
@ -626,7 +642,7 @@ st11:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof11;
|
||||
case 11:
|
||||
#line 630 "wmkdepend.cpp"
|
||||
#line 646 "wmkdepend.cpp"
|
||||
switch( (*p) ) {
|
||||
case 10: goto tr15;
|
||||
case 34: goto tr16;
|
||||
@ -646,7 +662,7 @@ st25:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof25;
|
||||
case 25:
|
||||
#line 650 "wmkdepend.cpp"
|
||||
#line 666 "wmkdepend.cpp"
|
||||
if ( (*p) == 34 )
|
||||
goto tr19;
|
||||
goto st12;
|
||||
@ -658,26 +674,32 @@ case 12:
|
||||
goto tr19;
|
||||
goto st12;
|
||||
tr19:
|
||||
#line 316 "wmkdepend.rl"
|
||||
{ processFile(std::string(tok, (p - tok))); }
|
||||
#line 317 "wmkdepend.rl"
|
||||
{
|
||||
processFile(tok, p);
|
||||
tok = nullptr; /* Done with buffer */
|
||||
}
|
||||
goto st13;
|
||||
st13:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof13;
|
||||
case 13:
|
||||
#line 669 "wmkdepend.cpp"
|
||||
#line 688 "wmkdepend.cpp"
|
||||
if ( (*p) == 10 )
|
||||
goto tr21;
|
||||
goto st13;
|
||||
tr16:
|
||||
#line 316 "wmkdepend.rl"
|
||||
{ processFile(std::string(tok, (p - tok))); }
|
||||
#line 317 "wmkdepend.rl"
|
||||
{
|
||||
processFile(tok, p);
|
||||
tok = nullptr; /* Done with buffer */
|
||||
}
|
||||
goto st14;
|
||||
st14:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof14;
|
||||
case 14:
|
||||
#line 681 "wmkdepend.cpp"
|
||||
#line 703 "wmkdepend.cpp"
|
||||
if ( (*p) == 10 )
|
||||
goto tr21;
|
||||
goto st14;
|
||||
@ -708,7 +730,7 @@ st26:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof26;
|
||||
case 26:
|
||||
#line 712 "wmkdepend.cpp"
|
||||
#line 734 "wmkdepend.cpp"
|
||||
if ( (*p) == 42 )
|
||||
goto st18;
|
||||
goto st17;
|
||||
@ -741,14 +763,14 @@ case 19:
|
||||
tr30:
|
||||
#line 1 "NONE"
|
||||
{te = p+1;}
|
||||
#line 333 "wmkdepend.rl"
|
||||
#line 337 "wmkdepend.rl"
|
||||
{act = 4;}
|
||||
goto st27;
|
||||
st27:
|
||||
if ( ++p == pe )
|
||||
goto _test_eof27;
|
||||
case 27:
|
||||
#line 752 "wmkdepend.cpp"
|
||||
#line 774 "wmkdepend.cpp"
|
||||
if ( (*p) == 10 )
|
||||
goto tr2;
|
||||
goto st1;
|
||||
@ -823,7 +845,7 @@ cs = 0;
|
||||
_out: {}
|
||||
}
|
||||
|
||||
#line 409 "wmkdepend.rl"
|
||||
#line 429 "wmkdepend.rl"
|
||||
/* ^^^ FSM execution here ^^^ */;
|
||||
|
||||
if (0 == cs)
|
||||
@ -837,7 +859,19 @@ cs = 0;
|
||||
|
||||
if (ts)
|
||||
{
|
||||
// Preserve incomplete token
|
||||
// Preserve incomplete token.
|
||||
// We have the normal ragel range (ts, te) but potentially
|
||||
// our own local buffer start as 'tok'
|
||||
|
||||
if (tok && tok >= ts)
|
||||
{
|
||||
tok = inbuf + (tok - ts);
|
||||
}
|
||||
else
|
||||
{
|
||||
tok = nullptr; // safety
|
||||
}
|
||||
|
||||
pending = pe - ts;
|
||||
memmove(inbuf, ts, pending);
|
||||
te = inbuf + (te - ts); // token end (after memmove)
|
||||
|
||||
@ -71,7 +71,7 @@ Note
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
|
||||
// Ragel switchs may have several implicit fallthroughs
|
||||
// Ragel switches may have several implicit fallthroughs
|
||||
#pragma GCC diagnostic ignored "-Wimplicit-fallthrough"
|
||||
|
||||
// Length of the input read buffer
|
||||
@ -313,7 +313,11 @@ namespace Files
|
||||
machine wmkdep;
|
||||
|
||||
action buffer { tok = p; /* Local token start */ }
|
||||
action process { processFile(std::string(tok, (p - tok))); }
|
||||
action process
|
||||
{
|
||||
processFile(tok, p);
|
||||
tok = nullptr; /* Done with buffer */
|
||||
}
|
||||
|
||||
white = [ \t\f\r]; # Horizontal whitespace
|
||||
nl = white* '\n'; # Newline (allow trailing whitespace)
|
||||
@ -346,10 +350,26 @@ namespace Files
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
||||
|
||||
void processFile(std::string fileName);
|
||||
|
||||
//
|
||||
// Open a file and process.
|
||||
// The file name is given by the [first,last) range
|
||||
//
|
||||
void processFile(const char* first, const char* last)
|
||||
{
|
||||
// Extra safety
|
||||
if (first && last && last > first)
|
||||
{
|
||||
processFile(std::string(first, last));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// Open a file and process
|
||||
//
|
||||
void processFile(const std::string& fileName)
|
||||
void processFile(std::string fileName)
|
||||
{
|
||||
FILE* infile = Files::open(fileName);
|
||||
if (optVerbose)
|
||||
@ -419,7 +439,19 @@ void processFile(const std::string& fileName)
|
||||
|
||||
if (ts)
|
||||
{
|
||||
// Preserve incomplete token
|
||||
// Preserve incomplete token.
|
||||
// We have the normal ragel range (ts, te) but potentially
|
||||
// our own local buffer start as 'tok'
|
||||
|
||||
if (tok && tok >= ts)
|
||||
{
|
||||
tok = inbuf + (tok - ts);
|
||||
}
|
||||
else
|
||||
{
|
||||
tok = nullptr; // safety
|
||||
}
|
||||
|
||||
pending = pe - ts;
|
||||
memmove(inbuf, ts, pending);
|
||||
te = inbuf + (te - ts); // token end (after memmove)
|
||||
|
||||
Reference in New Issue
Block a user