aboutsummaryrefslogtreecommitdiff
path: root/tools/mhmake/src/mhmakelexer.l
diff options
context:
space:
mode:
Diffstat (limited to 'tools/mhmake/src/mhmakelexer.l')
-rw-r--r--tools/mhmake/src/mhmakelexer.l27
1 files changed, 23 insertions, 4 deletions
diff --git a/tools/mhmake/src/mhmakelexer.l b/tools/mhmake/src/mhmakelexer.l
index 9dc1a23a0..9b933c305 100644
--- a/tools/mhmake/src/mhmakelexer.l
+++ b/tools/mhmake/src/mhmakelexer.l
@@ -35,7 +35,7 @@ static uint32 LoadMakMd5(fileinfo *pTarget)
return Md5_32;
if (1!=fread(&Md5_32,sizeof(Md5_32),1,pFile))
{
- fclose(pFile);
+ fclose(pFile);
return Md5_32;
}
pTarget->SetCommandsMd5_32(Md5_32);
@@ -71,7 +71,7 @@ static void ReplaceCurlyBraces(string &String)
Pos=0;
while ((Pos=String.find_first_of('}',Pos))!=(int)string::npos)
String.replace(Pos,1,1,')');
- }
+ }
}
#include "mhmakeparser.hpp"
@@ -248,6 +248,13 @@ load_makefile {
}
/*---------------------------------------------------------------------------*/
+[ \t]*override[ \t]* {
+ // override is not supported by mhmake, it is the default behavior
+ PRINTF(("%s %d: SPACE (ignoring override):\n",m_InputFileName.c_str(),lineno()));
+ return yy::mhmakeparser::token::SPACE;
+}
+
+ /*---------------------------------------------------------------------------*/
[ \t]*=[ \t]*\\[ \t\r]*\n[ \t]* {
PRINTF(("%s %d: EQUAL: %s\n",m_InputFileName.c_str(),lineno(),yytext));
inclineno();
@@ -298,6 +305,12 @@ load_makefile {
}
/*---------------------------------------------------------------------------*/
+\\; {
+ PRINTF(("%s %d: -Escaped SEMICOLON (STRING): %s\n",m_InputFileName.c_str(),lineno(),yytext));
+ yylval->theString=(const char *)yytext+1;
+ return yy::mhmakeparser::token::STRING;
+}
+ /*---------------------------------------------------------------------------*/
[ \t]*;[ \t]*\\[ \t\r]*\n[ \t]* {
PRINTF(("%s %d: -SEMICOLON (NEWLINE): %s\n",m_InputFileName.c_str(),lineno(),yytext));
m_curtoken=g_EmptyString;
@@ -595,7 +608,7 @@ load_makefile {
}
/*---------------------------------------------------------------------------*/
-<SKIPUNTILELSEORENDIF>[a-zA-Z]+ /* skip */
+<SKIPUNTILELSEORENDIF>[a-zA-Z]+ /* skip */
/*---------------------------------------------------------------------------*/
<SKIPUNTILELSEORENDIF>[^a-zA-Z\n]+ /* skip */
/*---------------------------------------------------------------------------*/
@@ -632,6 +645,12 @@ load_makefile {
}
/*---------------------------------------------------------------------------*/
+\.ENVVARS_TOIGNORE {
+ PRINTF(("%s %d: .ENVVARS_TOIGNORE: %s\n",m_InputFileName.c_str(),lineno(),yytext));
+ return yy::mhmakeparser::token::ENVVARS_TOIGNORE;
+}
+
+ /*---------------------------------------------------------------------------*/
export {
PRINTF(("%s %d: export: %s\n",m_InputFileName.c_str(),lineno(),yytext));
return yy::mhmakeparser::token::EXPORT;
@@ -842,7 +861,7 @@ export {
<SINGLEQUOTE>[^\\\'\r\n$]+ |
<SINGLEQUOTE>[\\\$] |
-<SINGLEQUOTE>\\\' |
+<SINGLEQUOTE>\\\' |
<SINGLEQUOTE>\\# {
yymore();
}