Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nk@1044 9da81c78-c036-0410-9e1f-a2b0375e4b5a
  • Loading branch information
eranif committed Feb 1, 2008
1 parent 94cb75f commit 0b01183
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 27 deletions.
30 changes: 14 additions & 16 deletions MakefileParser/MakefileImporter.project
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<CleanCommand/>
<BuildCommand/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPostBuild/>
<CustomPreBuild>makefile_parser.cpp makefile_lexer.cpp
makefile_parser.cpp: makefile_parser.y
yacc -dl -t -v makefile_parser.y
Expand Down Expand Up @@ -96,14 +96,12 @@ makefile_lexer.cpp: makefile_parser.l
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<CleanCommand/>
<BuildCommand/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild>

</CustomPreBuild>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
<Configuration Name="WinDebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
Expand Down Expand Up @@ -135,11 +133,11 @@ makefile_lexer.cpp: makefile_parser.l
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<CleanCommand/>
<BuildCommand/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPostBuild/>
<CustomPreBuild>makefile_parser.cpp makefile_lexer.cpp
makefile_parser.cpp: makefile_parser.y
yacc -dl -t -v makefile_parser.y
Expand Down Expand Up @@ -180,12 +178,12 @@ makefile_lexer.cpp: makefile_parser.l
<PreBuild/>
<PostBuild/>
<CustomBuild Enabled="no">
<CleanCommand></CleanCommand>
<BuildCommand></BuildCommand>
<CleanCommand/>
<BuildCommand/>
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild>
<CustomPostBuild/>
<CustomPreBuild/>
</AdditionalRules>
</Configuration>
</Settings>
Expand Down
14 changes: 3 additions & 11 deletions MakefileParser/makefile_lexer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1567,18 +1567,10 @@ int main()



void initLexer(const char *fileName)
void initLexer(const char *data)
{
FILE *file = fopen(fileName, "r");
if(!file)
{
printf("failed loading file 'test.h'\n");
exit(-1);
}

//set the file to be our buffer
YY_BUFFER_STATE buffState = yy_create_buffer(file, YY_BUF_SIZE);
yy_switch_to_buffer(buffState);
BEGIN INITIAL;
yy_scan_string(data);
}

int yywrap()
Expand Down

0 comments on commit 0b01183

Please sign in to comment.