Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…nk@1036 9da81c78-c036-0410-9e1f-a2b0375e4b5a
  • Loading branch information
eranif committed Jan 31, 2008
1 parent 08e09dd commit b673ac5
Show file tree
Hide file tree
Showing 14 changed files with 2,233 additions and 2,447 deletions.
12 changes: 6 additions & 6 deletions LiteEditor.workspace
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
<Project Name="Subversion" Path="Subversion/Subversion.project"/>
<Project Name="Gizmos" Path="Gizmos/Gizmos.project" Active="No"/>
<Project Name="Cscope" Path="cscope/Cscope.project" Active="No"/>
<Environment>
<Variable Name="MINGW" Value="C:/MinGW"/>
<Variable Name="WorkspaceName" Value="LiteEditor"/>
<Variable Name="WorkspacePath" Value="/Development/C++/codelite/trunk"/>
</Environment>
<BuildMatrix>
<WorkspaceConfiguration Name="Release Unicode" Selected="no">
<Project Name="wxsqlite3" ConfigName="ReleaseUnicode"/>
Expand Down Expand Up @@ -50,7 +55,7 @@
<Project Name="CodeLite" ConfigName="DebugUnicode"/>
<Project Name="CodeFormatter" ConfigName="DebugUnicode"/>
</WorkspaceConfiguration>
<WorkspaceConfiguration Name="Win Release Unicode" Selected="yes">
<WorkspaceConfiguration Name="Win Release Unicode" Selected="no">
<Project Name="wxsqlite3" ConfigName="WinReleaseUnicode"/>
<Project Name="wxscintilla" ConfigName="WinReleaseUnicode"/>
<Project Name="wxflatnotebook" ConfigName="WinReleaseUnicode"/>
Expand Down Expand Up @@ -81,9 +86,4 @@
<Project Name="CodeFormatter" ConfigName="WinDebugUnicode"/>
</WorkspaceConfiguration>
</BuildMatrix>
<Environment>
<Variable Name="MINGW" Value="C:/MinGW"/>
<Variable Name="WorkspaceName" Value="LiteEditor"/>
<Variable Name="WorkspacePath" Value="/Development/C++/codelite/trunk"/>
</Environment>
</CodeLite_Workspace>
5 changes: 4 additions & 1 deletion LiteEditor/fileview.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ void FileViewTree::BuildProjectNode( const wxString &projectName )
m_itemsToSort[parentHti.m_pItem] = true;

// Set active project with bold
if ( parentHti == GetRootItem() && ManagerST::Get()->GetActiveProjectName() == node->GetData().GetDisplayName() ) {
wxString activeProjectName = ManagerST::Get()->GetActiveProjectName();
wxString displayName = node->GetData().GetDisplayName();

if ( parentHti == GetRootItem() && displayName == activeProjectName) {
SetItemBold( hti );
}

Expand Down
22 changes: 17 additions & 5 deletions MakefileParser/MakefileImporter.project
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<File Name="makefile_lexer.h"/>
<File Name="makefile_parser.cpp"/>
</VirtualDirectory>
<Settings Type="Dynamic Library">
<Settings Type="Executable">
<Configuration Name="DebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
<General OutputFile="$(ConfigurationName)/MakefileImporter.so" IntermediateDirectory="./DebugUnicode" Command="" CommandArguments="" WorkingDirectory="./DebugUnicode"/>
<Compiler Required="yes" Options="-g;$(shell wx-config --cxxflags --debug=yes --unicode=yes)">
Expand Down Expand Up @@ -71,7 +71,7 @@ makefile_lexer.cpp: makefile_parser.l
</CustomPreBuild>
</AdditionalRules>
</Configuration>
<Configuration Name="ReleaseUnicode" CompilerType="gnu g++" DebuggerType="">
<Configuration Name="ReleaseUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
<General OutputFile="$(ConfigurationName)/MakefileImporter.so" IntermediateDirectory="./ReleaseUnicode" Command="" CommandArguments="" WorkingDirectory="./ReleaseUnicode"/>
<Compiler Required="yes" Options="$(shell wx-config --cxxflags --debug=no --unicode=yes); -O2">
<IncludePath Value="."/>
Expand Down Expand Up @@ -103,11 +103,13 @@ makefile_lexer.cpp: makefile_parser.l
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild>
<CustomPreBuild>

</CustomPreBuild>
</AdditionalRules>
</Configuration>
<Configuration Name="WinDebugUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
<General OutputFile="$(ConfigurationName)/MakefileImporter.so" IntermediateDirectory="./WinDebugUnicode" Command="" CommandArguments="" WorkingDirectory=""/>
<General OutputFile="$(ConfigurationName)/MakefileImporter" IntermediateDirectory="./WinDebugUnicode" Command="./MakefileImporter" CommandArguments="" WorkingDirectory="./WinDebugUnicode"/>
<Compiler Required="yes" Options="-g;$(shell wx-config --cxxflags --unicode=yes --debug=yes)">
<IncludePath Value="."/>
<IncludePath Value="../../trunk/Interfaces"/>
Expand All @@ -120,6 +122,7 @@ makefile_lexer.cpp: makefile_parser.l
<Preprocessor Value="WXUSINGDLL"/>
<Preprocessor Value="_WIN32_WINNT=0x501"/>
<Preprocessor Value="ASTYLE_LIB"/>
<Preprocessor Value="YY_NEVER_INTERACTIVE=1"/>
</Compiler>
<Linker Required="yes" Options="-O2;$(shell wx-config --debug=yes --libs --unicode=yes);">
<LibraryPath Value="../../trunk/lib/gcc_lib"/>
Expand All @@ -140,7 +143,16 @@ makefile_lexer.cpp: makefile_parser.l
</CustomBuild>
<AdditionalRules>
<CustomPostBuild></CustomPostBuild>
<CustomPreBuild></CustomPreBuild>
<CustomPreBuild>makefile_parser.cpp makefile_lexer.cpp
makefile_parser.cpp: makefile_parser.y
yacc -dl -t -v makefile_parser.y
mv y.tab.c makefile_parser.cpp
mv y.tab.h makefile_lexer.h

makefile_lexer.cpp: makefile_parser.l
flex -L makefile_parser.l
mv lex.yy.c makefile_lexer.cpp
</CustomPreBuild>
</AdditionalRules>
</Configuration>
<Configuration Name="WinReleaseUnicode" CompilerType="gnu g++" DebuggerType="GNU gdb debugger">
Expand Down
3 changes: 1 addition & 2 deletions MakefileParser/VariableLexer.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
#include "precompiled_header.h"
#include "makefile_lexer.h"
#include "VariableLexer.h"
#include "precompiled_header.h"
#include <string>
#include <vector>
#include <map>
#include <wx/wx.h>
#include <wx/log.h>
#include <wx/string.h>

Expand Down
27 changes: 14 additions & 13 deletions MakefileParser/main.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "makefile_lexer.h"
#include "precompiled_header.h"
#include <wx/wx.h>

#include "makefile_lexer.h"
#include "VariableLexer.h"
#include "stdio.h"

typedef std::map<wxString, wxString> Tokens;
typedef Tokens::iterator ITokens;
Expand All @@ -21,31 +20,33 @@ int main(int argv, char* argc[])
wxArrayString unmatched = lexer.getUnmatched();
wxArrayString error = lexer.getError();
Tokens tokens = lexer.getTokens();

printf("============= RESULT =============\n");

FILE *of = fopen("outout.txt", "w+");
fprintf(of, "============= RESULT =============\n");
for(int i = 0; i < result.size(); i++)
{
printf("%s\n", result[i].c_str());
fprintf(of, "%s\n", result[i].c_str());
}

printf("============ UNMATCHED ===========\n");
fprintf(of, "============ UNMATCHED ===========\n");
for(int i = 0; i < unmatched.size(); i++)
{
printf("%s\n", unmatched[i].c_str());
fprintf(of, "%s\n", unmatched[i].c_str());
}

printf("============== ERROR =============\n");
fprintf(of, "============== ERROR =============\n");
for(int i = 0; i < error.size(); i++)
{
printf("%s\n", error[i].c_str());
fprintf(of, "%s\n", error[i].c_str());
}

printf("============= TOKENS =============\n");
fprintf(of, "============= TOKENS =============\n");
for(ITokens it = tokens.begin(); it != tokens.end(); it++)
{
printf("'%s'='%s'\n", it->first.c_str(), it->second.c_str());
fprintf(of, "'%s'='%s'\n", it->first.c_str(), it->second.c_str());
}

printf("=============== DONE =============\n");
fprintf(of, "=============== DONE =============\n");
fclose(of);
return 0;
}
Loading

0 comments on commit b673ac5

Please sign in to comment.