Reale & some sources
- Manage the release version of the soft - add basic ASM and XML
This commit is contained in:
parent
4f6739c0a1
commit
3364d15bac
3
.gitignore
vendored
3
.gitignore
vendored
@ -27,7 +27,8 @@ doxygen/ALL/
|
||||
*.so
|
||||
*.pyc
|
||||
edn
|
||||
edn-stripped
|
||||
edn_debug
|
||||
edn_release
|
||||
|
||||
###################################
|
||||
# Packages #
|
||||
|
73
Makefile
73
Makefile
@ -35,15 +35,20 @@ export CADRE_COTERS='
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_N
|
||||
###############################################################################
|
||||
### Compilateur base system ###
|
||||
###############################################################################
|
||||
CXX=$(BIN_PREFIX)g++
|
||||
CC=$(BIN_PREFIX)gcc
|
||||
AR=$(BIN_PREFIX)ar
|
||||
CXX=g++
|
||||
CC=gcc
|
||||
AR=ar
|
||||
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=3
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG
|
||||
else
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=3
|
||||
endif
|
||||
|
||||
GTKFLAGS=
|
||||
ifeq ($(shell if `pkg-config --exists gtk+-3.0` ; then echo "yes"; else echo "no"; fi), yes)
|
||||
@ -86,13 +91,25 @@ LDFLAGS+= -Wl,--export-dynamic
|
||||
###############################################################################
|
||||
### Project Name ###
|
||||
###############################################################################
|
||||
OUTPUT_NAME=edn
|
||||
PROG_NAME=edn
|
||||
|
||||
###############################################################################
|
||||
### Basic Project description Files ###
|
||||
###############################################################################
|
||||
FILE_DIRECTORY=Sources
|
||||
OBJECT_DIRECTORY=Object
|
||||
OUTPUT_NAME_RELEASE=$(PROG_NAME)_release
|
||||
OUTPUT_NAME_DEBUG=$(PROG_NAME)_debug
|
||||
OBJECT_DIR=Object
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_RELEASE)
|
||||
else
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/debug
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_DEBUG)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Generique dependency ###
|
||||
@ -186,7 +203,7 @@ all: build
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
build: .encadrer $(OUTPUT_NAME) $(MAKE_DEPENDENCE)
|
||||
build: .encadrer $(OUTPUT_NAME)
|
||||
|
||||
|
||||
.encadrer:
|
||||
@ -223,25 +240,26 @@ $(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
|
||||
@#echo $(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
|
||||
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
|
||||
|
||||
# build binary
|
||||
$(OUTPUT_NAME): $(OBJ)
|
||||
@echo $(F_ROUGE)"
(bin) $@ & $@-stripped"$(F_NORMALE)
|
||||
# build binary Release Mode
|
||||
$(OUTPUT_NAME_RELEASE): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $@-stripped
|
||||
@strip -s $@-stripped
|
||||
@#cp $@-stripped ~/.bin/$@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
# build binary Debug Mode
|
||||
$(OUTPUT_NAME_DEBUG): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
clean:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo Remove Folder : $(OBJECT_DIRECTORY)
|
||||
@rm -rf $(OBJECT_DIRECTORY)
|
||||
@echo Remove File : $(OUTPUT_NAME)
|
||||
@rm -f $(OUTPUT_NAME)
|
||||
@echo Remove File : $(OUTPUT_NAME)-stripped
|
||||
@rm -f $(OUTPUT_NAME)-stripped
|
||||
@echo Remove Folder : $(OBJECT_DIR)
|
||||
@rm -rf $(OBJECT_DIR)
|
||||
@echo Remove File : $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@rm -f $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@echo Remove File : pngToCpp
|
||||
@rm -f pngToCpp
|
||||
@echo Remove File : $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@ -255,3 +273,18 @@ clean:
|
||||
count:
|
||||
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"`
|
||||
|
||||
install: .encadrer $(OUTPUT_NAME_RELEASE)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(F_ROUGE)"
(stripped) $(OUTPUT_NAME_RELEASE) => $(PROG_NAME) "$(F_NORMALE)
|
||||
@cp $(OUTPUT_NAME_RELEASE) $(PROG_NAME)
|
||||
@strip -s $(PROG_NAME)
|
||||
@echo $(F_VERT)"
(copy) $(PROG_NAME) ~/.bin/ "$(F_NORMALE)
|
||||
@cp -vf $(PROG_NAME) ~/.bin/
|
||||
@echo $(F_VERT)"
(data) data/* ==> ~/.edn/data/ "$(F_NORMALE)
|
||||
@mkdir -p ~/.edn/data
|
||||
@cp -vf data/*.xml ~/.edn/data
|
||||
|
||||
|
||||
|
||||
|
@ -60,7 +60,7 @@ void ColorizeManager::LoadFile(const char * xmlFilename)
|
||||
TiXmlElement* root = XmlDocument.FirstChildElement( "EdnColor" );
|
||||
if (NULL == root )
|
||||
{
|
||||
EDN_ERROR(PFX"(l ?) main node not find: \"EdnColor\"");
|
||||
EDN_ERROR(PFX"(l ?) main node not find: \"EdnColor\" in \"" << xmlFilename << "\"");
|
||||
return;
|
||||
}
|
||||
else
|
||||
|
@ -52,7 +52,7 @@ Highlight::Highlight(Edn::String &xmlFilename)
|
||||
// open the curent File
|
||||
bool loadError = XmlDocument.LoadFile(xmlFilename.c_str());
|
||||
if (false == loadError) {
|
||||
EDN_ERROR( "can not load Hightlight XML: PARSING error: ");
|
||||
EDN_ERROR( "can not load Hightlight XML: PARSING error: \"" << xmlFilename.c_str() << "\"");
|
||||
return;
|
||||
}
|
||||
TiXmlElement* root = XmlDocument.FirstChildElement( "EdnLang" );
|
||||
|
@ -66,15 +66,36 @@ bool HighlightManager::Exist(Edn::String &fileName)
|
||||
|
||||
void HighlightManager::loadLanguages(void)
|
||||
{
|
||||
Edn::String xmlFilename = "./data/lang_c.xml";
|
||||
Edn::String homedir;
|
||||
#ifdef NDEBUG
|
||||
homedir = getenv("HOME");
|
||||
homedir += "/.edn/";
|
||||
#else
|
||||
homedir = "./";
|
||||
#endif
|
||||
|
||||
Edn::String xmlFilename = homedir;
|
||||
xmlFilename += "data/lang_c.xml";
|
||||
Highlight *myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.push_back(myHightline);
|
||||
|
||||
xmlFilename = "./data/lang_boo.xml";
|
||||
xmlFilename = homedir;
|
||||
xmlFilename += "data/lang_boo.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.push_back(myHightline);
|
||||
|
||||
xmlFilename = "./data/lang_Makefile.xml";
|
||||
xmlFilename = homedir;
|
||||
xmlFilename += "data/lang_Makefile.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.push_back(myHightline);
|
||||
|
||||
xmlFilename = homedir;
|
||||
xmlFilename += "data/lang_asm.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.push_back(myHightline);
|
||||
|
||||
xmlFilename = homedir;
|
||||
xmlFilename += "data/lang_xml.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.push_back(myHightline);
|
||||
|
||||
|
@ -79,7 +79,15 @@ int main (int argc, char *argv[])
|
||||
// set color and other trucs...
|
||||
ColorizeManager *myColorManager = NULL;
|
||||
myColorManager = ColorizeManager::getInstance();
|
||||
myColorManager->LoadFile("./data/color_black.xml");
|
||||
Edn::String homedir;
|
||||
#ifdef NDEBUG
|
||||
homedir = getenv("HOME");
|
||||
homedir += "/.edn/";
|
||||
#else
|
||||
homedir = "./";
|
||||
#endif
|
||||
homedir += "data/color_black.xml";
|
||||
myColorManager->LoadFile( homedir.c_str() );
|
||||
myColorManager->DisplayListOfColor();
|
||||
|
||||
HighlightManager *myHighlightManager = NULL;
|
||||
|
@ -31,6 +31,7 @@
|
||||
* matlab
|
||||
* java script
|
||||
* SQL
|
||||
* Assembleur
|
||||
- project : list of current files open
|
||||
- gui : demander l'enregistrement avant de fermer (quand c'est nécessaire)
|
||||
- gui : demande de création de nouveaux fichier ou quiter l'editeur ...
|
||||
|
@ -9,8 +9,53 @@
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="Assignement">
|
||||
<color>preprocesseur</color>
|
||||
<start>( *| [ \t]*)[A-Za-z0-9_+][^ \t]*[ \t]*(\+|:)?=</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
Dependency Line
|
||||
^( *| [ \t]*)(.DEFAULT|.DELETE_ON_ERROR|.EXPORT_ALL_VARIABLES.IGNORE|.INTERMEDIATE|.PHONY|.POSIX|.PRECIOUS|.SECONDARY|.SILENT|.SUFFIXES)*(([A-Za-z0-9./$(){} _@^<*?%+-]*(\\\n)){,8}[A-Za-z0-9./$(){} _@^<*?%+-]*)::?
|
||||
</pass1>
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
||||
<!--
|
||||
Parsing : to add :
|
||||
$ ==> End of line
|
||||
^ ==> ???
|
||||
|
||||
P1 Comment
|
||||
#
|
||||
$
|
||||
P1 Assignement
|
||||
^( *| [ \t]*)[A-Za-z0-9_+][^ \t]*[ \t]*(\+|:)?=
|
||||
$
|
||||
P1 Dependency Line
|
||||
^( *| [ \t]*)(.DEFAULT|.DELETE_ON_ERROR|.EXPORT_ALL_VARIABLES.IGNORE|.INTERMEDIATE|.PHONY|.POSIX|.PRECIOUS|.SECONDARY|.SILENT|.SUFFIXES)*(([A-Za-z0-9./$(){} _@^<*?%+-]*(\\\n)){,8}[A-Za-z0-9./$(){} _@^<*?%+-]*)::?
|
||||
$|;
|
||||
P1 Macro
|
||||
\$([A-Za-z0-9_]|\([^)]*\)|\{[^}]*})
|
||||
P1 Internal Macro
|
||||
\$([<@*?%]|\$@)
|
||||
P1 Include
|
||||
^( *| [ \t]*)include[ \t]
|
||||
P1 Exports
|
||||
^( *| [ \t]*)<export|unexport>[ \t]
|
||||
P2 Conditionals
|
||||
^( *| [ \t]*)<ifeq|ifneq>[ \t]
|
||||
P2 Conditionals ifdefs
|
||||
^( *| [ \t]*)<ifdef|ifndef>[ \t]
|
||||
P2 Conditional Ends
|
||||
^( *| [ \t]*)<else|endif>
|
||||
P2 vpath
|
||||
^( *| [ \t]*)<vpath>[ \t]
|
||||
P2 define
|
||||
^( *| [ \t]*)<define>[ \t]
|
||||
P2 define Ends
|
||||
^( *| [ \t]*)<endef>
|
||||
|
||||
-->
|
57
data/lang_asm.xml
Normal file
57
data/lang_asm.xml
Normal file
@ -0,0 +1,57 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Assembleur">
|
||||
<ext>.s</ext>
|
||||
<ext>.S</ext>
|
||||
<ext>.asm</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="my comment multiline doxygen">
|
||||
<color>commentDoxygen</color>
|
||||
<start>/\*\*</start>
|
||||
<end>\*/</end>
|
||||
</rule>
|
||||
<rule name="my comment multiline">
|
||||
<color>comment</color>
|
||||
<start>/\*</start>
|
||||
<end>\*/</end>
|
||||
</rule>
|
||||
<rule name="my if 0">
|
||||
<color>preprocesseur</color>
|
||||
<start>#[ \t]*if 0</start>
|
||||
<end>#endif|#else</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="my preprocesseur">
|
||||
<color>preprocesseur</color>
|
||||
<start>#</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="my comment doxygen">
|
||||
<color>commentDoxygen</color>
|
||||
<start>//!</start>
|
||||
<end>\n</end>
|
||||
</rule>
|
||||
<rule name="my todo comment">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<start>//[ \t]*TODO[ \t]*:</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="my comment">
|
||||
<color>comment</color>
|
||||
<start>//</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@smull|ldrsh|smlal|stmdb|mul|mla|umull|ldr|add|str|mov|subs|bgt|ldmia|stmia|ldmfd|cmp|sub|strd|stmfd|bne|bhi|ldrd|mvn\@</start>
|
||||
</rule>
|
||||
<rule name="register list">
|
||||
<color>type</color>
|
||||
<start>\@r(10|11|12|[0-9]?)|sp|lp|lr|pc\@</start>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
63
data/lang_xml.xml
Normal file
63
data/lang_xml.xml
Normal file
@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="Assembleur">
|
||||
<ext>.xml</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="Comment">
|
||||
<color>comment</color>
|
||||
<start><!\-\-</start>
|
||||
<end>\-\-></end>
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2>
|
||||
|
||||
</pass2>
|
||||
</EdnLang>
|
||||
|
||||
<!--
|
||||
Parsing : to add :
|
||||
$ ==> End of line
|
||||
^ ==> ???
|
||||
|
||||
P1 Comment
|
||||
\< !--
|
||||
--\ >
|
||||
P1 ignored section
|
||||
\<!\[\s*IGNORE\s*\[
|
||||
\]\]\>
|
||||
P1 declaration
|
||||
\<\?(?ixml)
|
||||
\?\>
|
||||
P1 doctype
|
||||
(\<!(?idoctype))\s+(\<?(?!(?ixml))[\l_][\w:-]*\>?)
|
||||
\>
|
||||
error : \]
|
||||
p1 processing instruction
|
||||
\<\?\S+
|
||||
\?\>
|
||||
P1 cdata
|
||||
\<!\[(?icdata)\[
|
||||
\]\]\>
|
||||
P1 element declaration
|
||||
\<!ELEMENT
|
||||
\>
|
||||
P1 entity declaration
|
||||
\<!ENTITY
|
||||
\>
|
||||
p1 notation
|
||||
\<!NOTATION
|
||||
\>
|
||||
P1 attribute declaration
|
||||
\<!ATTLIST
|
||||
\>
|
||||
P1 element
|
||||
(\</?)((?!(?ixml))[\l_][\w:-]*)
|
||||
/?\>
|
||||
P1 entity
|
||||
&((amp|lt|gt|quot|apos)|#x[\da-fA-F]*|[\l_]\w*);
|
||||
P1 marked section
|
||||
\<!\[\s*(?:INCLUDE|(%(?!(?ixml))[\l_][\w:-]*;))\s*\[|\]\]\>
|
||||
P2 internal subset delims
|
||||
[\[\]>]
|
||||
|
||||
-->
|
||||
|
Loading…
x
Reference in New Issue
Block a user