Skip to content

Commit

Permalink
First somewhat working version!
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdielKavash committed Mar 13, 2019
1 parent f9ee46e commit 3a3f934
Show file tree
Hide file tree
Showing 16 changed files with 1,226 additions and 1,220 deletions.
64 changes: 64 additions & 0 deletions highlighting.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
<NotepadPlus>
<UserLang name="IFPP" ext="ifpp" udlVersion="2.1">
<Settings>
<Global caseIgnored="yes" allowFoldOfComments="yes" foldCompact="no" forcePureLC="0" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="yes" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 00// 01 02 03/* 04*/</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2">x</Keywords>
<Keywords name="Numbers, extras1">a b c d e f A B C D E F</Keywords>
<Keywords name="Numbers, extras2"></Keywords>
<Keywords name="Numbers, suffix1"></Keywords>
<Keywords name="Numbers, suffix2"></Keywords>
<Keywords name="Numbers, range"></Keywords>
<Keywords name="Operators1">&lt; &lt;= = =&gt; &gt; .. :</Keywords>
<Keywords name="Operators2"></Keywords>
<Keywords name="Folders in code1, open">{</Keywords>
<Keywords name="Folders in code1, middle"></Keywords>
<Keywords name="Folders in code1, close">}</Keywords>
<Keywords name="Folders in code2, open"></Keywords>
<Keywords name="Folders in code2, middle"></Keywords>
<Keywords name="Folders in code2, close"></Keywords>
<Keywords name="Folders in comment, open"></Keywords>
<Keywords name="Folders in comment, middle"></Keywords>
<Keywords name="Folders in comment, close"></Keywords>
<Keywords name="Keywords1">ItemLevel DropLevel Quality Sockets LinkedSockets Height Width StackSize GemLevel MapTier&#x000D;&#x000A;Rarity Class BaseType Prophecy HasExplicitMod HasEnchantment&#x000D;&#x000A;Identified Corrupted ElderItem ShaperItem ShapedMap FracturedItem SynthesisedItem AnyEnchantment&#x000D;&#x000A;SocketGroup&#x000D;&#x000A;&#x000D;&#x000A;SetFontSize SetTextSize SetBorderColor SetTextColor SetFontColor SetBackgroundColor&#x000D;&#x000A;PlayAlertSound PlayAlertSoundPositional&#x000D;&#x000A;CustomAlertSound MinimapIcon PlayEffect DisableDropSound</Keywords>
<Keywords name="Keywords2">true false&#x000D;&#x000A;Normal Magic Rare Unique&#x000D;&#x000A;ShAlchemy ShBlessed ShChaos ShDivine ShExalted ShFusing ShGeneral ShMirror ShRegal ShVaal&#x000D;&#x000A;Blue Brown Green Red White Yellow&#x000D;&#x000A;Circle Diamond Hexagon Square Star Triangle&#x000D;&#x000A;Temp</Keywords>
<Keywords name="Keywords3">Define Version Rule Modifier Default DefaultIgnore Hide Hidden UseStyle&#x000D;&#x000A;&#x000D;&#x000A;Number Color File List Style</Keywords>
<Keywords name="Keywords4">Override</Keywords>
<Keywords name="Keywords5">$</Keywords>
<Keywords name="Keywords6"></Keywords>
<Keywords name="Keywords7"></Keywords>
<Keywords name="Keywords8"></Keywords>
<Keywords name="Delimiters">00&quot; 01 02&quot; 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23</Keywords>
</KeywordLists>
<Styles>
<WordsStyle name="DEFAULT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="LINE COMMENTS" fgColor="008000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="NUMBERS" fgColor="FF8000" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS1" fgColor="8000FF" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS2" fgColor="FF8000" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS3" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="KEYWORDS4" fgColor="0000FF" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS5" fgColor="800000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="KEYWORDS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="OPERATORS" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE1" fgColor="0000FF" bgColor="FFFFFF" fontStyle="1" nesting="0" />
<WordsStyle name="FOLDER IN CODE2" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="FOLDER IN COMMENT" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS1" fgColor="808080" bgColor="DFDFDF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS2" fgColor="C0C0C0" bgColor="FFFFFF" fontStyle="0" nesting="5" />
<WordsStyle name="DELIMITERS3" fgColor="FF0000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS4" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS5" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS6" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS7" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
<WordsStyle name="DELIMITERS8" fgColor="000000" bgColor="FFFFFF" fontStyle="0" nesting="0" />
</Styles>
</UserLang>
</NotepadPlus>
39 changes: 8 additions & 31 deletions makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
GenDir = gen
SrcDir = src
TestDir = tests

GenClass = Lexer Parser
SrcClass = Types Logger Context ParserWrapper
#ifppDriver ifppRuleOperations ifppCompiler

TestParse = basicSyntax
TestCompile = overrideWithoutChange overrideSameAction overrideNumeric nameLists incremental
AllTests = $(TestParse) $(TestCompile)
SrcClass = Types Logger Context RuleNative Compiler

GenObj = $(addprefix $(GenDir)/,$(addsuffix .o,$(GenClass)))
SrcObj = $(addprefix $(GenDir)/,$(addsuffix .o,$(SrcClass)))
AllObjs = $(GenObj) $(SrcObj)

Flex = flex -i
Bison = bison
Gcc = g++ -Wall -Wextra -pedantic -I src -I gen
GccStrict = g++ -Wall -Wextra -pedantic -Weffc++ -Werror -I src -I gen
Gcc = g++ -Wall -Wextra -pedantic -Wno-unused-function -Wfatal-errors -I src -I gen
GccStrict = g++ -Wall -Wextra -pedantic -Weffc++ -Werror -Wfatal-errors -I src -I gen

.PHONY: lex parser analyze tests doc clean

Expand All @@ -26,49 +20,32 @@ ifpp: $(AllObjs) src/ifpp.cpp

lex: $(GenDir)/Lexer.cpp $(GenDir)/Lexer.h

parser: $(GenDir)/Parser.cpp $(GenDir)/Parser.h
parser: $(GenDir)/Parser.cpp $(GenDir)/Parser.h $(GenDir)/location.hh $(GenDir)/position.hh

analyze: src/Parser.y
$(Bison) -Wall --report=all --report-file=BisonReport.txt $<

tests: $(AllTests)

doc: doc/ifpp-manual.html

clean:
-rm gen/*
-rm tests/*.parsed.ifpp
-rm tests/*.partial.ifpp
-rm tests/*.filter
-rm doc/*
-rm ifpp.exe



$(GenDir)/Lexer.cpp $(GenDir)/Lexer.h: $(SrcDir)/Lexer.l $(SrcDir)/Types.h $(GenDir)/Parser.h
$(Flex) --outfile="gen/Lexer.cpp" --header-file="gen/Lexer.h" $(SrcDir)/Lexer.l

$(GenDir)/Parser.cpp $(GenDir)/Parser.h $(GenDir)/location.hh: $(SrcDir)/Parser.y $(SrcDir)/Types.h $(SrcDir)/Context.h
$(GenDir)/Parser.cpp $(GenDir)/Parser.h $(GenDir)/location.hh $(GenDir)/position.hh: $(SrcDir)/Parser.y $(SrcDir)/Types.h $(SrcDir)/Context.h
$(Bison) --output="gen/Parser.cpp" --defines="gen/Parser.h" $(SrcDir)/Parser.y

$(GenObj): $(GenDir)/%.o: $(GenDir)/%.cpp $(SrcDir)/Types.h $(SrcDir)/Logger.h
$(GenObj): $(GenDir)/%.o: $(GenDir)/%.cpp $(GenDir)/%.h
$(Gcc) -c -o $@ $<

$(SrcObj): $(GenDir)/%.o: $(SrcDir)/%.cpp $(SrcDir)/%.h $(SrcDir)/Types.h
$(SrcObj): $(GenDir)/%.o: $(SrcDir)/%.cpp $(SrcDir)/%.h
$(GccStrict) -c -o $@ $<

$(GenDir)/Context.o: $(SrcDir)/Logger.h



$(TestParse): %: $(TestDir)/%.parsed.ifpp

$(TestCompile): %: $(TestDir)/%.filter

$(TestDir)/%.parsed.ifpp: $(TestDir)/%.ifpp ifpp
./ifpp -c -Dpartial -DparseOnly $<

$(TestDir)/%.filter: $(TestDir)/%.ifpp ifpp
./ifpp -c -Dpartial $<

doc/ifpp-manual.html: src/ifpp-manual.texinfo
makeinfo --html --no-split --css-include="src/ifpp-manual.css" -o "doc/ifpp-manual.html" "src/ifpp-manual.texinfo"
Expand Down
Loading

0 comments on commit 3a3f934

Please sign in to comment.