From 894645f9e1919dd196108e39a0001bde2adcec7d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Aug 2019 10:06:08 +0200 Subject: [PATCH] CONFIG: update wmake rules for parsers - include ragel and lemon - rename pre-generated files to ".cc" so that they are more recognizable as being different from regular file content. --- src/fileFormats/Make/files | 2 +- ...sciiParseRagel.C => STLAsciiParseRagel.cc} | 142 +++++++++--------- src/fileFormats/stl/STLAsciiParseRagel.rl | 2 +- wmake/rules/General/lemon | 9 ++ wmake/rules/General/ragel | 4 +- wmake/rules/General/standard | 2 + wmake/scripts/wrap-lemon | 34 +++++ wmake/src/Makefile | 6 +- wmake/src/{wmkdepend.cpp => wmkdepend.cc} | 26 ++-- wmake/src/wmkdepend.rl | 2 +- 10 files changed, 137 insertions(+), 92 deletions(-) rename src/fileFormats/stl/{STLAsciiParseRagel.C => STLAsciiParseRagel.cc} (95%) create mode 100644 wmake/rules/General/lemon create mode 100755 wmake/scripts/wrap-lemon rename wmake/src/{wmkdepend.cpp => wmkdepend.cc} (98%) diff --git a/src/fileFormats/Make/files b/src/fileFormats/Make/files index 103b0235a6..62f54aaba6 100644 --- a/src/fileFormats/Make/files +++ b/src/fileFormats/Make/files @@ -24,7 +24,7 @@ stl/STLCore.C stl/STLReader.C stl/STLAsciiParseFlex.L stl/STLAsciiParseManual.C -stl/STLAsciiParseRagel.C +stl/STLAsciiParseRagel.cc vtk/file/foamVtkFileWriter.C vtk/file/foamVtkSeriesWriter.C diff --git a/src/fileFormats/stl/STLAsciiParseRagel.C b/src/fileFormats/stl/STLAsciiParseRagel.cc similarity index 95% rename from src/fileFormats/stl/STLAsciiParseRagel.C rename to src/fileFormats/stl/STLAsciiParseRagel.cc index 9c1ed17aea..0451f87c59 100644 --- a/src/fileFormats/stl/STLAsciiParseRagel.C +++ b/src/fileFormats/stl/STLAsciiParseRagel.cc @@ -27,7 +27,7 @@ Description Ragel-based parsing of STL ASCII format. The goto-based finite state machine (FSM) is generated with - ragel -G2 -o STLAsciiParseRagel.C STLAsciiParseRagel.rl + ragel -G2 -o STLAsciiParseRagel.cc STLAsciiParseRagel.rl \*---------------------------------------------------------------------------*/ @@ -90,7 +90,7 @@ Description // -#line 94 "STLAsciiParseRagel.C" +#line 94 "STLAsciiParseRagel.cc" static const int stlAscii_start = 1; static const int stlAscii_error = 0; @@ -149,7 +149,7 @@ void Foam::Detail::STLAsciiParseRagel::execute(std::istream& is) int cs; -#line 153 "STLAsciiParseRagel.C" +#line 153 "STLAsciiParseRagel.cc" { cs = stlAscii_start; } @@ -208,7 +208,7 @@ void Foam::Detail::STLAsciiParseRagel::execute(std::istream& is) } -#line 212 "STLAsciiParseRagel.C" +#line 212 "STLAsciiParseRagel.cc" { if ( p == pe ) goto _test_eof; @@ -222,7 +222,7 @@ st1: if ( ++p == pe ) goto _test_eof1; case 1: -#line 226 "STLAsciiParseRagel.C" +#line 226 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr2; case 32: goto st1; @@ -312,7 +312,7 @@ tr233: #line 98 "STLAsciiParseRagel.rl" { die("endsolid", p, pe); } goto st0; -#line 316 "STLAsciiParseRagel.C" +#line 316 "STLAsciiParseRagel.cc" st0: cs = 0; goto _out; @@ -324,7 +324,7 @@ st2: if ( ++p == pe ) goto _test_eof2; case 2: -#line 328 "STLAsciiParseRagel.C" +#line 328 "STLAsciiParseRagel.cc" switch( (*p) ) { case 79: goto st3; case 111: goto st3; @@ -377,7 +377,7 @@ st7: if ( ++p == pe ) goto _test_eof7; case 7: -#line 381 "STLAsciiParseRagel.C" +#line 381 "STLAsciiParseRagel.cc" if ( (*p) == 10 ) goto tr11; goto st7; @@ -395,7 +395,7 @@ st8: if ( ++p == pe ) goto _test_eof8; case 8: -#line 399 "STLAsciiParseRagel.C" +#line 399 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr13; case 67: goto tr14; @@ -416,7 +416,7 @@ st9: if ( ++p == pe ) goto _test_eof9; case 9: -#line 420 "STLAsciiParseRagel.C" +#line 420 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr13; case 32: goto st9; @@ -438,7 +438,7 @@ st10: if ( ++p == pe ) goto _test_eof10; case 10: -#line 442 "STLAsciiParseRagel.C" +#line 442 "STLAsciiParseRagel.cc" switch( (*p) ) { case 79: goto st11; case 111: goto st11; @@ -500,7 +500,7 @@ st16: if ( ++p == pe ) goto _test_eof16; case 16: -#line 504 "STLAsciiParseRagel.C" +#line 504 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr28; case 32: goto st16; @@ -520,7 +520,7 @@ st17: if ( ++p == pe ) goto _test_eof17; case 17: -#line 524 "STLAsciiParseRagel.C" +#line 524 "STLAsciiParseRagel.cc" switch( (*p) ) { case 78: goto st18; case 110: goto st18; @@ -607,7 +607,7 @@ st165: if ( ++p == pe ) goto _test_eof165; case 165: -#line 611 "STLAsciiParseRagel.C" +#line 611 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr234; case 32: goto st165; @@ -625,7 +625,7 @@ st25: if ( ++p == pe ) goto _test_eof25; case 25: -#line 629 "STLAsciiParseRagel.C" +#line 629 "STLAsciiParseRagel.cc" switch( (*p) ) { case 65: goto st26; case 97: goto st26; @@ -684,7 +684,7 @@ st31: if ( ++p == pe ) goto _test_eof31; case 31: -#line 688 "STLAsciiParseRagel.C" +#line 688 "STLAsciiParseRagel.cc" if ( (*p) == 10 ) goto st32; goto st31; @@ -696,7 +696,7 @@ st32: if ( ++p == pe ) goto _test_eof32; case 32: -#line 700 "STLAsciiParseRagel.C" +#line 700 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr50; case 79: goto tr51; @@ -713,7 +713,7 @@ st33: if ( ++p == pe ) goto _test_eof33; case 33: -#line 717 "STLAsciiParseRagel.C" +#line 717 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr50; case 32: goto st33; @@ -731,7 +731,7 @@ st34: if ( ++p == pe ) goto _test_eof34; case 34: -#line 735 "STLAsciiParseRagel.C" +#line 735 "STLAsciiParseRagel.cc" switch( (*p) ) { case 85: goto st35; case 117: goto st35; @@ -842,7 +842,7 @@ st45: if ( ++p == pe ) goto _test_eof45; case 45: -#line 846 "STLAsciiParseRagel.C" +#line 846 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr66; case 32: goto st45; @@ -860,7 +860,7 @@ st46: if ( ++p == pe ) goto _test_eof46; case 46: -#line 864 "STLAsciiParseRagel.C" +#line 864 "STLAsciiParseRagel.cc" switch( (*p) ) { case 69: goto st47; case 101: goto st47; @@ -938,7 +938,7 @@ st53: if ( ++p == pe ) goto _test_eof53; case 53: -#line 942 "STLAsciiParseRagel.C" +#line 942 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st54; if ( 48 <= (*p) && (*p) <= 57 ) @@ -952,7 +952,7 @@ st54: if ( ++p == pe ) goto _test_eof54; case 54: -#line 956 "STLAsciiParseRagel.C" +#line 956 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st55; goto tr68; @@ -986,7 +986,7 @@ st56: if ( ++p == pe ) goto _test_eof56; case 56: -#line 990 "STLAsciiParseRagel.C" +#line 990 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st56; case 32: goto st56; @@ -1008,7 +1008,7 @@ st57: if ( ++p == pe ) goto _test_eof57; case 57: -#line 1012 "STLAsciiParseRagel.C" +#line 1012 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st58; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1022,7 +1022,7 @@ st58: if ( ++p == pe ) goto _test_eof58; case 58: -#line 1026 "STLAsciiParseRagel.C" +#line 1026 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st59; goto tr68; @@ -1056,7 +1056,7 @@ st60: if ( ++p == pe ) goto _test_eof60; case 60: -#line 1060 "STLAsciiParseRagel.C" +#line 1060 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st60; case 32: goto st60; @@ -1078,7 +1078,7 @@ st61: if ( ++p == pe ) goto _test_eof61; case 61: -#line 1082 "STLAsciiParseRagel.C" +#line 1082 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st62; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1092,7 +1092,7 @@ st62: if ( ++p == pe ) goto _test_eof62; case 62: -#line 1096 "STLAsciiParseRagel.C" +#line 1096 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st63; goto tr68; @@ -1127,7 +1127,7 @@ st64: if ( ++p == pe ) goto _test_eof64; case 64: -#line 1131 "STLAsciiParseRagel.C" +#line 1131 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st64; case 10: goto st65; @@ -1150,7 +1150,7 @@ st65: if ( ++p == pe ) goto _test_eof65; case 65: -#line 1154 "STLAsciiParseRagel.C" +#line 1154 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr106; case 86: goto tr107; @@ -1167,7 +1167,7 @@ st66: if ( ++p == pe ) goto _test_eof66; case 66: -#line 1171 "STLAsciiParseRagel.C" +#line 1171 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr106; case 32: goto st66; @@ -1185,7 +1185,7 @@ st67: if ( ++p == pe ) goto _test_eof67; case 67: -#line 1189 "STLAsciiParseRagel.C" +#line 1189 "STLAsciiParseRagel.cc" switch( (*p) ) { case 69: goto st68; case 101: goto st68; @@ -1263,7 +1263,7 @@ st74: if ( ++p == pe ) goto _test_eof74; case 74: -#line 1267 "STLAsciiParseRagel.C" +#line 1267 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st75; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1277,7 +1277,7 @@ st75: if ( ++p == pe ) goto _test_eof75; case 75: -#line 1281 "STLAsciiParseRagel.C" +#line 1281 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st76; goto tr68; @@ -1311,7 +1311,7 @@ st77: if ( ++p == pe ) goto _test_eof77; case 77: -#line 1315 "STLAsciiParseRagel.C" +#line 1315 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st77; case 32: goto st77; @@ -1333,7 +1333,7 @@ st78: if ( ++p == pe ) goto _test_eof78; case 78: -#line 1337 "STLAsciiParseRagel.C" +#line 1337 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st79; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1347,7 +1347,7 @@ st79: if ( ++p == pe ) goto _test_eof79; case 79: -#line 1351 "STLAsciiParseRagel.C" +#line 1351 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st80; goto tr68; @@ -1381,7 +1381,7 @@ st81: if ( ++p == pe ) goto _test_eof81; case 81: -#line 1385 "STLAsciiParseRagel.C" +#line 1385 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st81; case 32: goto st81; @@ -1403,7 +1403,7 @@ st82: if ( ++p == pe ) goto _test_eof82; case 82: -#line 1407 "STLAsciiParseRagel.C" +#line 1407 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st83; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1417,7 +1417,7 @@ st83: if ( ++p == pe ) goto _test_eof83; case 83: -#line 1421 "STLAsciiParseRagel.C" +#line 1421 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st84; goto tr68; @@ -1452,7 +1452,7 @@ st85: if ( ++p == pe ) goto _test_eof85; case 85: -#line 1456 "STLAsciiParseRagel.C" +#line 1456 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st85; case 10: goto st86; @@ -1475,7 +1475,7 @@ st86: if ( ++p == pe ) goto _test_eof86; case 86: -#line 1479 "STLAsciiParseRagel.C" +#line 1479 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr145; case 86: goto tr146; @@ -1492,7 +1492,7 @@ st87: if ( ++p == pe ) goto _test_eof87; case 87: -#line 1496 "STLAsciiParseRagel.C" +#line 1496 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr145; case 32: goto st87; @@ -1510,7 +1510,7 @@ st88: if ( ++p == pe ) goto _test_eof88; case 88: -#line 1514 "STLAsciiParseRagel.C" +#line 1514 "STLAsciiParseRagel.cc" switch( (*p) ) { case 69: goto st89; case 101: goto st89; @@ -1588,7 +1588,7 @@ st95: if ( ++p == pe ) goto _test_eof95; case 95: -#line 1592 "STLAsciiParseRagel.C" +#line 1592 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st96; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1602,7 +1602,7 @@ st96: if ( ++p == pe ) goto _test_eof96; case 96: -#line 1606 "STLAsciiParseRagel.C" +#line 1606 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st97; goto tr68; @@ -1636,7 +1636,7 @@ st98: if ( ++p == pe ) goto _test_eof98; case 98: -#line 1640 "STLAsciiParseRagel.C" +#line 1640 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st98; case 32: goto st98; @@ -1658,7 +1658,7 @@ st99: if ( ++p == pe ) goto _test_eof99; case 99: -#line 1662 "STLAsciiParseRagel.C" +#line 1662 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st100; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1672,7 +1672,7 @@ st100: if ( ++p == pe ) goto _test_eof100; case 100: -#line 1676 "STLAsciiParseRagel.C" +#line 1676 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st101; goto tr68; @@ -1706,7 +1706,7 @@ st102: if ( ++p == pe ) goto _test_eof102; case 102: -#line 1710 "STLAsciiParseRagel.C" +#line 1710 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st102; case 32: goto st102; @@ -1728,7 +1728,7 @@ st103: if ( ++p == pe ) goto _test_eof103; case 103: -#line 1732 "STLAsciiParseRagel.C" +#line 1732 "STLAsciiParseRagel.cc" if ( (*p) == 46 ) goto st104; if ( 48 <= (*p) && (*p) <= 57 ) @@ -1742,7 +1742,7 @@ st104: if ( ++p == pe ) goto _test_eof104; case 104: -#line 1746 "STLAsciiParseRagel.C" +#line 1746 "STLAsciiParseRagel.cc" if ( 48 <= (*p) && (*p) <= 57 ) goto st105; goto tr68; @@ -1777,7 +1777,7 @@ st106: if ( ++p == pe ) goto _test_eof106; case 106: -#line 1781 "STLAsciiParseRagel.C" +#line 1781 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto st106; case 10: goto st107; @@ -1800,7 +1800,7 @@ st107: if ( ++p == pe ) goto _test_eof107; case 107: -#line 1804 "STLAsciiParseRagel.C" +#line 1804 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr185; case 69: goto tr186; @@ -1817,7 +1817,7 @@ st108: if ( ++p == pe ) goto _test_eof108; case 108: -#line 1821 "STLAsciiParseRagel.C" +#line 1821 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr185; case 32: goto st108; @@ -1835,7 +1835,7 @@ st109: if ( ++p == pe ) goto _test_eof109; case 109: -#line 1839 "STLAsciiParseRagel.C" +#line 1839 "STLAsciiParseRagel.cc" switch( (*p) ) { case 78: goto st110; case 110: goto st110; @@ -1913,7 +1913,7 @@ st117: if ( ++p == pe ) goto _test_eof117; case 117: -#line 1917 "STLAsciiParseRagel.C" +#line 1917 "STLAsciiParseRagel.cc" switch( (*p) ) { case 10: goto tr198; case 32: goto st117; @@ -1931,7 +1931,7 @@ st118: if ( ++p == pe ) goto _test_eof118; case 118: -#line 1935 "STLAsciiParseRagel.C" +#line 1935 "STLAsciiParseRagel.cc" switch( (*p) ) { case 78: goto st119; case 110: goto st119; @@ -2006,7 +2006,7 @@ st126: if ( ++p == pe ) goto _test_eof126; case 126: -#line 2010 "STLAsciiParseRagel.C" +#line 2010 "STLAsciiParseRagel.cc" if ( (*p) == 10 ) goto st127; goto st126; @@ -2018,7 +2018,7 @@ st127: if ( ++p == pe ) goto _test_eof127; case 127: -#line 2022 "STLAsciiParseRagel.C" +#line 2022 "STLAsciiParseRagel.cc" switch( (*p) ) { case 32: goto tr28; case 69: goto tr15; @@ -2070,7 +2070,7 @@ st131: if ( ++p == pe ) goto _test_eof131; case 131: -#line 2074 "STLAsciiParseRagel.C" +#line 2074 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr179; case 10: goto tr180; @@ -2125,7 +2125,7 @@ st135: if ( ++p == pe ) goto _test_eof135; case 135: -#line 2129 "STLAsciiParseRagel.C" +#line 2129 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr170; case 32: goto tr170; @@ -2179,7 +2179,7 @@ st139: if ( ++p == pe ) goto _test_eof139; case 139: -#line 2183 "STLAsciiParseRagel.C" +#line 2183 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr161; case 32: goto tr161; @@ -2234,7 +2234,7 @@ st143: if ( ++p == pe ) goto _test_eof143; case 143: -#line 2238 "STLAsciiParseRagel.C" +#line 2238 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr140; case 10: goto tr141; @@ -2289,7 +2289,7 @@ st147: if ( ++p == pe ) goto _test_eof147; case 147: -#line 2293 "STLAsciiParseRagel.C" +#line 2293 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr131; case 32: goto tr131; @@ -2343,7 +2343,7 @@ st151: if ( ++p == pe ) goto _test_eof151; case 151: -#line 2347 "STLAsciiParseRagel.C" +#line 2347 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr122; case 32: goto tr122; @@ -2398,7 +2398,7 @@ st155: if ( ++p == pe ) goto _test_eof155; case 155: -#line 2402 "STLAsciiParseRagel.C" +#line 2402 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr101; case 10: goto tr102; @@ -2453,7 +2453,7 @@ st159: if ( ++p == pe ) goto _test_eof159; case 159: -#line 2457 "STLAsciiParseRagel.C" +#line 2457 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr92; case 32: goto tr92; @@ -2507,7 +2507,7 @@ st163: if ( ++p == pe ) goto _test_eof163; case 163: -#line 2511 "STLAsciiParseRagel.C" +#line 2511 "STLAsciiParseRagel.cc" switch( (*p) ) { case 9: goto tr83; case 32: goto tr83; @@ -2914,7 +2914,7 @@ case 163: #line 98 "STLAsciiParseRagel.rl" { die("endsolid", p, pe); } break; -#line 2918 "STLAsciiParseRagel.C" +#line 2918 "STLAsciiParseRagel.cc" } } diff --git a/src/fileFormats/stl/STLAsciiParseRagel.rl b/src/fileFormats/stl/STLAsciiParseRagel.rl index c0bada0e0c..4599b8f565 100644 --- a/src/fileFormats/stl/STLAsciiParseRagel.rl +++ b/src/fileFormats/stl/STLAsciiParseRagel.rl @@ -25,7 +25,7 @@ Description Ragel-based parsing of STL ASCII format. The goto-based finite state machine (FSM) is generated with - ragel -G2 -o STLAsciiParseRagel.C STLAsciiParseRagel.rl + ragel -G2 -o STLAsciiParseRagel.cc STLAsciiParseRagel.rl \*---------------------------------------------------------------------------*/ diff --git a/wmake/rules/General/lemon b/wmake/rules/General/lemon new file mode 100644 index 0000000000..9c2a5096b4 --- /dev/null +++ b/wmake/rules/General/lemon @@ -0,0 +1,9 @@ +SUFFIXES += .ly .lyy + +lytoo = $E $(call QUIET_MESSAGE,lemon,$(. +# +# Script +# wrap-lemon +# +# Usage +# wrap-lemon [lemon-options] +# +# Description +# A wrapper to use lemon compiled with OpenFOAM with the appropriate +# parser template. +# +#------------------------------------------------------------------------------ + +binDir="${WMAKE_BIN:-$WM_PROJECT_DIR/wmake/platforms/$WM_ARCH$WM_COMPILER}" +etcDir="${WM_DIR:-$WM_PROJECT_DIR/wmake}/etc" + +# Or another location +"$binDir/lemon" "-T${etcDir}/lempar.c" $* +rc=$? + +exit "$rc" # Exit with lemon return code + +#------------------------------------------------------------------------------ diff --git a/wmake/src/Makefile b/wmake/src/Makefile index bcaf802af6..880cec8148 100644 --- a/wmake/src/Makefile +++ b/wmake/src/Makefile @@ -84,7 +84,7 @@ $(WMAKE_BIN)/wmkdep$(EXT_EXE): wmkdep.l $E flex -o $@.c $(/dev/null -$(WMAKE_BIN)/wmkdepend$(EXT_EXE): wmkdepend.cpp +$(WMAKE_BIN)/wmkdepend$(EXT_EXE): wmkdepend.cc @mkdir -p $(WMAKE_BIN) $(call QUIET_MESSAGE,wmkdepend,$(/dev/null +# $E ragel -G2 -o $@.cc $(/dev/null #------------------------------------------------------------------------------ diff --git a/wmake/src/wmkdepend.cpp b/wmake/src/wmkdepend.cc similarity index 98% rename from wmake/src/wmkdepend.cpp rename to wmake/src/wmkdepend.cc index 518682e6ea..ad8eb00107 100644 --- a/wmake/src/wmkdepend.cpp +++ b/wmake/src/wmkdepend.cc @@ -39,7 +39,7 @@ Description The scanner is built with Ragel. The goto-based finite state machine (FSM) is generated with - ragel -G2 -o wmkdepend.cpp wmkdepend.rl + ragel -G2 -o wmkdepend.cc wmkdepend.rl The FSM can be visualized (eg, in a browser) with the following command @@ -321,7 +321,7 @@ namespace Files // -#line 325 "wmkdepend.cpp" +#line 325 "wmkdepend.cc" static const int wmkdep_start = 21; static const int wmkdep_error = 0; @@ -367,7 +367,7 @@ void processFile(std::string fileName) int act, cs; -#line 371 "wmkdepend.cpp" +#line 371 "wmkdepend.cc" { cs = wmkdep_start; ts = 0; @@ -420,7 +420,7 @@ void processFile(std::string fileName) } -#line 424 "wmkdepend.cpp" +#line 424 "wmkdepend.cc" { if ( p == pe ) goto _test_eof; @@ -480,7 +480,7 @@ st21: case 21: #line 1 "NONE" {ts = p;} -#line 484 "wmkdepend.cpp" +#line 484 "wmkdepend.cc" switch( (*p) ) { case 10: goto st23; case 11: goto tr34; @@ -508,7 +508,7 @@ st22: if ( ++p == pe ) goto _test_eof22; case 22: -#line 512 "wmkdepend.cpp" +#line 512 "wmkdepend.cc" switch( (*p) ) { case 10: goto st23; case 11: goto tr34; @@ -537,7 +537,7 @@ st24: if ( ++p == pe ) goto _test_eof24; case 24: -#line 541 "wmkdepend.cpp" +#line 541 "wmkdepend.cc" switch( (*p) ) { case 10: goto st23; case 32: goto tr34; @@ -642,7 +642,7 @@ st11: if ( ++p == pe ) goto _test_eof11; case 11: -#line 646 "wmkdepend.cpp" +#line 646 "wmkdepend.cc" switch( (*p) ) { case 10: goto tr15; case 34: goto tr16; @@ -662,7 +662,7 @@ st25: if ( ++p == pe ) goto _test_eof25; case 25: -#line 666 "wmkdepend.cpp" +#line 666 "wmkdepend.cc" if ( (*p) == 34 ) goto tr19; goto st12; @@ -684,7 +684,7 @@ st13: if ( ++p == pe ) goto _test_eof13; case 13: -#line 688 "wmkdepend.cpp" +#line 688 "wmkdepend.cc" if ( (*p) == 10 ) goto tr21; goto st13; @@ -699,7 +699,7 @@ st14: if ( ++p == pe ) goto _test_eof14; case 14: -#line 703 "wmkdepend.cpp" +#line 703 "wmkdepend.cc" if ( (*p) == 10 ) goto tr21; goto st14; @@ -730,7 +730,7 @@ st26: if ( ++p == pe ) goto _test_eof26; case 26: -#line 734 "wmkdepend.cpp" +#line 734 "wmkdepend.cc" if ( (*p) == 42 ) goto st18; goto st17; @@ -770,7 +770,7 @@ st27: if ( ++p == pe ) goto _test_eof27; case 27: -#line 774 "wmkdepend.cpp" +#line 774 "wmkdepend.cc" if ( (*p) == 10 ) goto tr2; goto st1; diff --git a/wmake/src/wmkdepend.rl b/wmake/src/wmkdepend.rl index cfdda4d558..535d08b6da 100644 --- a/wmake/src/wmkdepend.rl +++ b/wmake/src/wmkdepend.rl @@ -37,7 +37,7 @@ Description The scanner is built with Ragel. The goto-based finite state machine (FSM) is generated with - ragel -G2 -o wmkdepend.cpp wmkdepend.rl + ragel -G2 -o wmkdepend.cc wmkdepend.rl The FSM can be visualized (eg, in a browser) with the following command