diff --git a/App/Assets/Branding/EoI_Class_Cover.png b/App/Assets/Branding/EoI_Class_Cover.png new file mode 100644 index 0000000..21f481d Binary files /dev/null and b/App/Assets/Branding/EoI_Class_Cover.png differ diff --git a/App/Assets/Branding/EoI_Class_Cover.png.import b/App/Assets/Branding/EoI_Class_Cover.png.import new file mode 100644 index 0000000..0864e75 --- /dev/null +++ b/App/Assets/Branding/EoI_Class_Cover.png.import @@ -0,0 +1,35 @@ +[remap] + +importer="texture" +type="StreamTexture" +path="res://.import/EoI_Class_Cover.png-180761d77f8e0fd8967a2d9e7fc7462a.stex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://Assets/Branding/EoI_Class_Cover.png" +dest_files=[ "res://.import/EoI_Class_Cover.png-180761d77f8e0fd8967a2d9e7fc7462a.stex" ] + +[params] + +compress/mode=0 +compress/lossy_quality=0.7 +compress/hdr_mode=0 +compress/bptc_ldr=0 +compress/normal_map=0 +flags/repeat=0 +flags/filter=true +flags/mipmaps=false +flags/anisotropic=false +flags/srgb=2 +process/fix_alpha_border=true +process/premult_alpha=false +process/HDR_as_SRGB=false +process/invert_color=false +process/normal_map_invert_y=false +stream=false +size_limit=0 +detect_3d=true +svg/scale=1.0 diff --git a/App/Assets/Styles/Editor.SytleBoxFlat.tres b/App/Assets/Styles/Editor.DarkWine.SytleBoxFlat.tres similarity index 50% rename from App/Assets/Styles/Editor.SytleBoxFlat.tres rename to App/Assets/Styles/Editor.DarkWine.SytleBoxFlat.tres index 4245035..3ac0625 100644 --- a/App/Assets/Styles/Editor.SytleBoxFlat.tres +++ b/App/Assets/Styles/Editor.DarkWine.SytleBoxFlat.tres @@ -1,4 +1,4 @@ [gd_resource type="StyleBoxFlat" format=2] [resource] -bg_color = Color( 0.0941176, 0.0666667, 0.137255, 1 ) +bg_color = Color( 0.12549, 0.0823529, 0.0862745, 1 ) diff --git a/App/Assets/Styles/Editor.Purple.SytleBoxFlat.tres b/App/Assets/Styles/Editor.Purple.SytleBoxFlat.tres new file mode 100644 index 0000000..fe9cafd --- /dev/null +++ b/App/Assets/Styles/Editor.Purple.SytleBoxFlat.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.12549, 0.109804, 0.164706, 1 ) diff --git a/App/Assets/Styles/Editor.Wine.SytleBoxFlat.tres b/App/Assets/Styles/Editor.Wine.SytleBoxFlat.tres new file mode 100644 index 0000000..8e6de61 --- /dev/null +++ b/App/Assets/Styles/Editor.Wine.SytleBoxFlat.tres @@ -0,0 +1,4 @@ +[gd_resource type="StyleBoxFlat" format=2] + +[resource] +bg_color = Color( 0.164706, 0.109804, 0.117647, 1 ) diff --git a/App/Assets/Styles/EditorTheme.tres b/App/Assets/Styles/Purple.EditorTheme.tres similarity index 84% rename from App/Assets/Styles/EditorTheme.tres rename to App/Assets/Styles/Purple.EditorTheme.tres index d6a0929..2b12926 100644 --- a/App/Assets/Styles/EditorTheme.tres +++ b/App/Assets/Styles/Purple.EditorTheme.tres @@ -1,6 +1,6 @@ [gd_resource type="Theme" load_steps=4 format=2] -[ext_resource path="res://Assets/Styles/Editor.SytleBoxFlat.tres" type="StyleBox" id=1] +[ext_resource path="res://Assets/Styles/Editor.Purple.SytleBoxFlat.tres" type="StyleBox" id=1] [ext_resource path="res://Assets/Fonts/DF_RecMonoSemiCasul.tres" type="DynamicFont" id=2] [ext_resource path="res://Assets/Styles/Editor.SytleBoxFlat.Inactive.tres" type="StyleBox" id=3] diff --git a/App/Assets/Styles/Wine.EditorTheme.tres b/App/Assets/Styles/Wine.EditorTheme.tres new file mode 100644 index 0000000..7d67e02 --- /dev/null +++ b/App/Assets/Styles/Wine.EditorTheme.tres @@ -0,0 +1,15 @@ +[gd_resource type="Theme" load_steps=5 format=2] + +[ext_resource path="res://Assets/Styles/Editor.Wine.SytleBoxFlat.tres" type="StyleBox" id=1] +[ext_resource path="res://Assets/Fonts/DF_RecMonoSemiCasul.tres" type="DynamicFont" id=2] +[ext_resource path="res://Assets/Styles/Editor.SytleBoxFlat.Inactive.tres" type="StyleBox" id=3] +[ext_resource path="res://Assets/Styles/Editor.DarkWine.SytleBoxFlat.tres" type="StyleBox" id=4] + +[resource] +Button/styles/disabled = ExtResource( 3 ) +Panel/styles/panel = ExtResource( 1 ) +TextEdit/colors/font_color = Color( 1, 1, 1, 1 ) +TextEdit/colors/font_color_readonly = Color( 1, 1, 1, 1 ) +TextEdit/fonts/font = ExtResource( 2 ) +TextEdit/styles/normal = ExtResource( 4 ) +TextEdit/styles/read_only = ExtResource( 4 ) diff --git a/App/EoI/EoI_Viewer.tscn b/App/EoI/EoI_Viewer.tscn new file mode 100644 index 0000000..26b2629 --- /dev/null +++ b/App/EoI/EoI_Viewer.tscn @@ -0,0 +1,93 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://Assets/Styles/Purple.EditorTheme.tres" type="Theme" id=1] +[ext_resource path="res://Assets/Branding/EoI_Class_Cover.png" type="Texture" id=2] +[ext_resource path="res://EoI/Scripts/EoI_Viewer.gd" type="Script" id=4] +[ext_resource path="res://Assets/Styles/Wine.EditorTheme.tres" type="Theme" id=5] + +[node name="EoI_Panel" type="Panel"] +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 5 ) +script = ExtResource( 4 ) + +[node name="CourseBrand" type="TextureRect" parent="."] +anchor_right = 1.0 +anchor_bottom = 1.0 +rect_scale = Vector2( 0.2, 0.2 ) +texture = ExtResource( 2 ) +expand = true +stretch_mode = 6 + +[node name="Letter_FDialog" type="FileDialog" parent="."] +anchor_left = 0.35 +anchor_top = 0.15 +anchor_right = 0.45 +anchor_bottom = 0.25 +margin_right = 356.0 +margin_bottom = 373.0 +theme = ExtResource( 1 ) +popup_exclusive = true +window_title = "Open a File" +mode = 0 +access = 2 + +[node name="VBox" type="VBoxContainer" parent="."] +anchor_top = 0.196 +anchor_right = 0.2 +anchor_bottom = 1.0 +margin_top = 2.39999 +margin_right = -1.8 +margin_bottom = -2.0 + +[node name="Eva_Interpret_Btn" type="Button" parent="VBox"] +margin_right = 203.0 +margin_bottom = 32.0 +rect_pivot_offset = Vector2( -123, -302 ) +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.08 +theme = ExtResource( 1 ) +text = "Eva: Interpret" + +[node name="Separator" type="HSeparator" parent="VBox"] +modulate = Color( 0.145098, 0.145098, 0.164706, 0 ) +margin_top = 36.0 +margin_right = 203.0 +margin_bottom = 441.0 +size_flags_vertical = 15 +theme = ExtResource( 5 ) + +[node name="Back_Btn" type="Button" parent="VBox"] +margin_top = 445.0 +margin_right = 203.0 +margin_bottom = 478.0 +rect_pivot_offset = Vector2( -123, -302 ) +size_flags_vertical = 3 +size_flags_stretch_ratio = 0.08 +theme = ExtResource( 1 ) +text = "Course Directory" + +[node name="Editor_TEdit" type="TextEdit" parent="."] +anchor_left = 0.2 +anchor_right = 0.625 +anchor_bottom = 0.8 +theme = ExtResource( 5 ) +show_line_numbers = true +draw_tabs = true +highlight_all_occurrences = true +smooth_scrolling = true +minimap_draw = true + +[node name="Output_TEdit" type="TextEdit" parent="."] +anchor_left = 0.2 +anchor_top = 0.8 +anchor_right = 0.625 +anchor_bottom = 1.0 +margin_left = 0.199997 +theme = ExtResource( 5 ) + +[node name="Debug_TEdit" type="TextEdit" parent="."] +anchor_left = 0.625 +anchor_right = 1.0 +anchor_bottom = 1.0 +theme = ExtResource( 5 ) diff --git a/App/EoI/Lectures/Lecture.1.2.3.Notes.md b/App/EoI/Lectures/Lecture.1.2.3.Notes.md new file mode 100644 index 0000000..341d00b --- /dev/null +++ b/App/EoI/Lectures/Lecture.1.2.3.Notes.md @@ -0,0 +1,110 @@ +# Pipeline + +Interpretation Involves **RUNTIME SEMANTICS** + +***THE MEANING OF THE PROGRAM MODEL*** + +Compliation delegates semantics of runtime behavior to +***a TARGET language*** + +Interpetation deals with the semantics itself. + +Types of Interpreter **implementation**: +* AST-based (recursive) +* Bytecode (Virtual Machines) + +Types of Compiler **implementation**: +* Ahead-of-time (AOT) +* Just-in-time (JIT) + +## Interpeter-AST: + +**Translation Stage:** +1. Program Model +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) + +**Runtime Stage:** +4. Interpeter +5. Runtime Behavior + +## Interpreter-Bytecode: + +**Translation Stage:** +1. Program Model +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) +4. Bytecode Emitter +5. Bytecode instructions primed. + +**Runtime Stage:** +6. Interpreter +7. Runtime Behavior + + +**Types of Virtual Machine behavior:** +* Stack based + * Stack for operands and operators + * Result is always on top of stack +* Register based + * Virtual registers + * Result in accumulation register + * Map to real via register allocation + +## Compiler Ahead-of-Time: +1. Program Model +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) +4. Code Generator +5. Intermediate representation primed +6. Target machine instruction set code generation +7. Target machine is intended interpretation platform. +8. Runtime Behavior. + + +## Compiler with LLVM platform: +1. Program Model +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) +4. LLVM IR generator +5. LLVM Native code generator +6. Target machine is intended interpretation platform +7. Runtime Behavior. + + +Lexer, and parser are considered **FRONT-END**. +Code Generation or byte-code gen or interpreter ast impelementation gen +for target instruction platform is considered **BACK-END**. + + +## Jit Compiler: +1. Program Model +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) +4. Bytecode Emitter +5. Bytecode fed to interpeter +6. Interetor may code gen immediately to target hardware platform or interpret ast directly. +7. Runtime Behavior. + +## Transpiler: +1. Program Model in input langauge +2. Lexer: Processing into token elements for a parser. + * Output : Tokens +3. Parser: Syntactic Analysis + * Output : Abstract Syntax Tree (AST) +4. AST Transformation to target AST +5. Code generation +6. Program Model in output langauge + + + diff --git a/App/EoI/Lectures/Lecture.4.Notes.md b/App/EoI/Lectures/Lecture.4.Notes.md new file mode 100644 index 0000000..e29128a --- /dev/null +++ b/App/EoI/Lectures/Lecture.4.Notes.md @@ -0,0 +1,45 @@ +# Eva Programming Langauge + +Dynamic programming langauge. + +Simple syntax, functional heart, OOP support. + +## Eva Expressions: +``` +( ... ) +``` + +Example: +``` +(+ 5 10) +(set x 15) + +(if (> x 10) + (print "ok") + (print "error") +) +``` + +``` +(def foo (bar) + (+ bar 10) +) +``` + +``` +(lambda (x) (* x x) 10) +``` + +## Design Goals + +* Simple syntax: S-Expression +* Everything is an expression +* No explicit return, last evalulated expression is the result +* First class functions +* Static scope: all functions are closures +* Lambda functions +* Funcitonal programming +* Imperative programming +* Namespaces and modules +* OOP: Class or prototype based. + diff --git a/App/EoI/Lectures/Lecture.1.Notes.md b/App/EoI/Lectures/Lecture.5.Notes.md similarity index 100% rename from App/EoI/Lectures/Lecture.1.Notes.md rename to App/EoI/Lectures/Lecture.5.Notes.md diff --git a/App/EoI/Lectures/Lecture.6.Notes.md b/App/EoI/Lectures/Lecture.6.Notes.md new file mode 100644 index 0000000..e69de29 diff --git a/App/EoI/Scripts/EoI_Viewer.gd b/App/EoI/Scripts/EoI_Viewer.gd index e69de29..a6a3926 100644 --- a/App/EoI/Scripts/EoI_Viewer.gd +++ b/App/EoI/Scripts/EoI_Viewer.gd @@ -0,0 +1,38 @@ +extends Node + +var eva = preload("Eva.gd").new() + + + + + + + + + + + + + + +# UX -------------------------------------------------------- +onready var Editor = get_node("Editor_TEdit") +onready var Output = get_node("Output_TEdit") +onready var Eva_Btn = get_node("VBox/Eva_Interpret_Btn") +onready var Back_Btn = get_node("VBox/Back_Btn") + + +func evaBtn_pressed(): + eva.init(Editor.text) + + var ast = eva.parse() + + Output.text = eva.eval(ast) + +func backBtn_pressed(): + queue_free() + + +func _ready(): + Eva_Btn.connect("pressed", self, "evaBtn_pressed") + Back_Btn.connect("pressed", self, "backBtn_pressed") diff --git a/App/EoI/Scripts/Eva.gd b/App/EoI/Scripts/Eva.gd new file mode 100644 index 0000000..2849614 --- /dev/null +++ b/App/EoI/Scripts/Eva.gd @@ -0,0 +1,316 @@ +extends Object + +var SRegEx = preload("res://RegM/Scripts/SRegex.gd").new() + + +const TType : Dictionary = \ +{ + fmt_S = "Formatting", + cmt_SL = "Comment Single-Line", + cmt_ML = "Comment Multi-Line", + + def_Start = "Expression Start", + def_End = "Expression End", + + literal_Number = "LIteral: Number", + literal_String = "Literal: String", + + operator = "Operator" +} + +const Spec : Dictionary = \ +{ + TType.cmt_SL : "start // inline.repeat(0-)", + TType.cmt_ML : "start /* set(whitespace !whitespace).repeat(0-).lazy */", + + TType.fmt_S : "start whitespace.repeat(1-).lazy", + + TType.def_Start : "start \\(", + TType.def_End : "start \\)", + + TType.literal_Number : \ + """start + set(+ \\-).repeat(0-1) + ( set(0-9).repeat(1-) \\. ).repeat(0-1) + set(0-9).repeat(1-) + """, + TType.literal_String : "start \\\" !set( \\\" ).repeat(0-) \\\" ", + + TType.operator : "start set(+ \\-)", +} + +class Token: + var Type : String + var Value : String + + func is_Literal(): + return Type == TType.literal_Number || Type == TType.literal_String; + + +var SourceText : String +var Cursor : int +var SpecRegex : Dictionary +var Tokens : Array +var TokenIndex : int = 0 + + +func compile_regex(): + for type in TType.values() : + var \ + regex = RegEx.new() + regex.compile( SRegEx.transpile(Spec[type]) ) + + SpecRegex[type] = regex + +func init(programSrcText): + SourceText = programSrcText + Cursor = 0 + TokenIndex = 0 + + if SpecRegex.size() == 0 : + compile_regex() + + tokenize() + +func next_Token(): + + var nextToken = null + + if Tokens.size() > TokenIndex : + nextToken = Tokens[TokenIndex] + TokenIndex += 1 + + return nextToken + +func reached_EndOfText(): + return Cursor >= SourceText.length() + +func tokenize(): + Tokens.clear() + + while reached_EndOfText() == false : + var srcLeft = SourceText.substr(Cursor) + var token = Token.new() + + var error = true + for type in TType.values() : + var result = SpecRegex[type].search( srcLeft ) + if result == null || result.get_start() != 0 : + continue + + # Skip Comments + if type == TType.cmt_SL || type == TType.cmt_ML : + Cursor += result.get_string().length() + error = false + break + + # Skip Whitespace + if type == TType.fmt_S : + var addVal = result.get_string().length() + + Cursor += addVal + error = false + break + + token.Type = type + token.Value = result.get_string() + Cursor += ( result.get_string().length() ) + + Tokens.append( token ) + + error = false + break; + + if error : + var assertStrTmplt = "next_token: Source text not understood by tokenizer at Cursor pos: {value} -: {txt}" + var assertStr = assertStrTmplt.format({"value" : Cursor, "txt" : srcLeft}) + assert(true != true, assertStr) + return +# ---------------------------------------------------------- Lexer + + +# ---------------------------------------------------------- Parser +# ---------------------------------------------------------- AST Node + +const NType = \ +{ + literal_Number = "Literal: Number", + literal_String = "Literal: String", + + op_Add = "+", + op_Mult = "*" +} + +class ASTNode: + var Data : Array + + func add_Expr( expr ): + Data.append(expr) + + func add_TokenValue( token ): + Data.append( token.Value ) + + func set_Type( nType ): + Data.append(nType) + + func arg( id ): + return Data[id] + + func num_args(): + return Data.size() - 1 + + func type(): + return Data[0] + + func is_Number(): + return type() == NType.literal_Number + + func is_String(): + return type() == NType.literal_String + + func string(): + return arg(1).substr(1, arg(1).length() -2) + + + # Serialization ---------------------------------------------------- + func array_Serialize(array, fn_objSerializer) : + var result = [] + + for entry in array : + if typeof(entry) == TYPE_ARRAY : + result.append( array_Serialize( entry, fn_objSerializer )) + + elif typeof(entry) == TYPE_OBJECT : + fn_objSerializer.set_instance(entry) + result.append( fn_objSerializer.call_func() ) + + else : + result.append( entry ) + + return result + + func to_SExpression(): + # var expression = [] + + # if typeof(Value) == TYPE_ARRAY : + var \ + to_SExpression_Fn = FuncRef.new() + to_SExpression_Fn.set_function("to_SExpression") + + return array_Serialize( self.Data, to_SExpression_Fn ) + + # if typeof(Value) == TYPE_OBJECT : + # var result = [ Type, Value.to_SExpression() ] + # return result + + # expression.append(Value) + # return expression + # Serialization END ------------------------------------------------- + +# ---------------------------------------------------------- AST Node END + +var TokenType : Token +var NextToken : Token + +# Gets the next token only if the current token is the specified intended token (tokenType) +func eat(tokenType): + var currToken = NextToken + + assert(currToken != null, "eat: NextToken was null") + + var assertStrTmplt = "eat: Unexpected token: {value}, expected: {type}" + var assertStr = assertStrTmplt.format({"value" : currToken.Value, "type" : tokenType}) + + assert(currToken.Type == tokenType, assertStr) + + NextToken = next_Token() + + return currToken + +func parse(): + NextToken = next_Token() + + if NextToken.Type == TType.def_Start: + return parse_Expression() + + if NextToken.is_Literal(): + return parse_Literal() + +func parse_Expression(): + eat(TType.def_Start) + var node : ASTNode + + if NextToken.Type == TType.operator: + node = parse_Operator() + + var arg = 1 + while NextToken.Type != TType.def_End: + node.add_Expr( parse_Literal() ) + + if NextToken.is_Literal(): + node = parse_Literal() + + eat(TType.def_End) + + return node + +func parse_Operator(): + var \ + node = ASTNode.new() + + match NextToken.Value: + NType.op_Add: + node.set_Type(NType.op_Add) + NType.op_Mult: + node.set_Type(NType.op_Mult) + + eat(TType.operator) + + return node + +func parse_Literal(): + var \ + node = ASTNode.new() + + match NextToken.Type: + TType.literal_Number: + node.set_Type(NType.literal_Number) + node.add_TokenValue(NextToken) + + eat(TType.literal_Number) + + TType.literal_String: + node.set_Type(NType.literal_String) + node.add_TokenValue(NextToken) + + eat(TType.literal_String) + + return node + +# ---------------------------------------------------------- Parser END + +class_name Eva + +# ---------------------------------------------------------- GLOBALS + +# ---------------------------------------------------------- GLOBALS END + +# ---------------------------------------------------------- UTILITIES + +func throw( message ): + assert(false, message) +# ---------------------------------------------------------- UTILITIES END + +func eval( ast ): + if ast.is_Number() : + return float(ast.arg(1)) + if ast.is_String() : + return ast.string() + + if ast.type() == NType.op_Add: + return String(eval( ast.arg(1) ) + eval( ast.arg(2) )) + + if ast.type() == NType.op_Mult: + return String(eval( ast.arg(1) ) * eval( ast.arg(2) )) + + throw("Unimplemented") diff --git a/App/EoP/EoP_Viewer.tscn b/App/EoP/EoP_Viewer.tscn new file mode 100644 index 0000000..00a6290 --- /dev/null +++ b/App/EoP/EoP_Viewer.tscn @@ -0,0 +1,5 @@ +[gd_scene format=2] + +[node name="Control" type="Control"] +anchor_right = 1.0 +anchor_bottom = 1.0 diff --git a/App/RDP/RDP_Viewer.tscn b/App/RDP/RDP_Viewer.tscn index 899be0e..2bf40b0 100644 --- a/App/RDP/RDP_Viewer.tscn +++ b/App/RDP/RDP_Viewer.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=4 format=2] -[ext_resource path="res://Assets/Styles/EditorTheme.tres" type="Theme" id=1] +[ext_resource path="res://Assets/Styles/Purple.EditorTheme.tres" type="Theme" id=1] [ext_resource path="res://Assets/Branding/RDP_Class_cover_small.png" type="Texture" id=2] [ext_resource path="res://RDP/Scripts/RDP_Viewer.gd" type="Script" id=3] @@ -11,6 +11,7 @@ margin_left = -9.0 margin_top = 1.0 margin_right = -9.0 margin_bottom = 1.0 +theme = ExtResource( 1 ) script = ExtResource( 3 ) [node name="CourseBrand" type="TextureRect" parent="."] diff --git a/App/RegM/Readme.md b/App/RegM/Readme.md new file mode 100644 index 0000000..0d98953 --- /dev/null +++ b/App/RegM/Readme.md @@ -0,0 +1,17 @@ +# Automata: RegEx Machines + +![Img](https://i.imgur.com/NWwBjhN.png) + +## Lectures + +Contains notes taken from the lecture vods. + +## Scripts + +Contains some implementation from the lectures but I have no completed it yet... + +I made my own context-free version of the language callled "SRegEx" +This is mainly what I wanted at the end of the day... + +Currently the script only translates to RegEx, +I still need to make RegEx to SRegEx \ No newline at end of file diff --git a/App/RegM/RegM_Viewer.tscn b/App/RegM/RegM_Viewer.tscn index 615f15f..d04edea 100644 --- a/App/RegM/RegM_Viewer.tscn +++ b/App/RegM/RegM_Viewer.tscn @@ -1,7 +1,7 @@ [gd_scene load_steps=4 format=2] [ext_resource path="res://Assets/Branding/RegM_Class_cover_small.png" type="Texture" id=1] -[ext_resource path="res://Assets/Styles/EditorTheme.tres" type="Theme" id=2] +[ext_resource path="res://Assets/Styles/Purple.EditorTheme.tres" type="Theme" id=2] [ext_resource path="res://RegM/Scripts/RegM_Viewer.gd" type="Script" id=3] [node name="RegM_Panel" type="Panel"] diff --git a/App/RegM/Scripts/SRegex.gd b/App/RegM/Scripts/SRegex.gd index 4e35ea5..e27c2e2 100644 --- a/App/RegM/Scripts/SRegex.gd +++ b/App/RegM/Scripts/SRegex.gd @@ -257,7 +257,7 @@ class ASTNode: } return result -const NodeType = \ +const NodeType : Dictionary = \ { expression = "Expression", @@ -1074,4 +1074,3 @@ func transpile_OpNot(node : ASTNode): result += transpile_Set(entry, true) return result - diff --git a/App/Scenes/CourseDirectory.tscn b/App/Scenes/CourseDirectory.tscn index 53e9814..e7e4b0e 100644 --- a/App/Scenes/CourseDirectory.tscn +++ b/App/Scenes/CourseDirectory.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=6 format=2] [ext_resource path="res://Scripts/CourseDirectory.gd" type="Script" id=1] [ext_resource path="res://Assets/Branding/RDP_Class_cover_small.png" type="Texture" id=2] [ext_resource path="res://Assets/Branding/RegM_Class_cover_small.png" type="Texture" id=3] -[ext_resource path="res://Assets/Styles/EditorTheme.tres" type="Theme" id=4] +[ext_resource path="res://Assets/Styles/Purple.EditorTheme.tres" type="Theme" id=4] +[ext_resource path="res://Assets/Branding/EoI_Class_Cover.png" type="Texture" id=5] [node name="Panel" type="Panel"] anchor_right = 1.0 @@ -16,16 +17,16 @@ anchor_top = 0.5 anchor_right = 0.5 anchor_bottom = 0.5 margin_left = -452.0 -margin_top = -125.5 +margin_top = -80.5 margin_right = 452.0 -margin_bottom = 125.5 +margin_bottom = 80.5 size_flags_horizontal = 3 size_flags_vertical = 3 alignment = 1 [node name="RDP_Btn" type="Button" parent="HBox"] -margin_right = 433.0 -margin_bottom = 251.0 +margin_right = 276.0 +margin_bottom = 161.0 rect_min_size = Vector2( 255, 150 ) size_flags_horizontal = 3 size_flags_vertical = 7 @@ -35,16 +36,16 @@ icon_align = 1 expand_icon = true [node name="VSeparator" type="VSeparator" parent="HBox"] -margin_left = 437.0 -margin_right = 467.0 -margin_bottom = 251.0 +margin_left = 280.0 +margin_right = 310.0 +margin_bottom = 161.0 theme = ExtResource( 4 ) custom_constants/separation = 30 [node name="RegM_Btn" type="Button" parent="HBox"] -margin_left = 471.0 -margin_right = 904.0 -margin_bottom = 251.0 +margin_left = 314.0 +margin_right = 590.0 +margin_bottom = 161.0 rect_min_size = Vector2( 255, 150 ) size_flags_horizontal = 3 size_flags_vertical = 3 @@ -52,3 +53,22 @@ theme = ExtResource( 4 ) icon = ExtResource( 3 ) icon_align = 1 expand_icon = true + +[node name="VSeparator2" type="VSeparator" parent="HBox"] +margin_left = 594.0 +margin_right = 624.0 +margin_bottom = 161.0 +theme = ExtResource( 4 ) +custom_constants/separation = 30 + +[node name="EoI_Btn" type="Button" parent="HBox"] +margin_left = 628.0 +margin_right = 904.0 +margin_bottom = 161.0 +rect_min_size = Vector2( 255, 150 ) +size_flags_horizontal = 3 +size_flags_vertical = 7 +theme = ExtResource( 4 ) +icon = ExtResource( 5 ) +icon_align = 1 +expand_icon = true diff --git a/App/Scripts/CourseDirectory.gd b/App/Scripts/CourseDirectory.gd index b5de8d2..733b72e 100644 --- a/App/Scripts/CourseDirectory.gd +++ b/App/Scripts/CourseDirectory.gd @@ -3,9 +3,11 @@ extends Panel onready var RDP_Viewer = load("res://RDP/RDP_Viewer.tscn") onready var RegM_Viewer = load("res://RegM/RegM_Viewer.tscn") +onready var EoI_Viewer = load("res://EoI/EoI_Viewer.tscn") onready var RDP_Btn = get_node("HBox/RDP_Btn") onready var RegM_Btn = get_node("HBox/RegM_Btn") +onready var EoI_Btn = get_node("HBox/EoI_Btn") func rdp_pressed(): @@ -13,9 +15,14 @@ func rdp_pressed(): func regM_pressed(): add_child( RegM_Viewer.instance() ) + +func eoi_pressed(): + add_child( EoI_Viewer.instance() ) # Called when the node enters the scene tree for the first time. func _ready(): + EoI_Btn.connect("pressed", self, "eoi_pressed") RDP_Btn.connect("pressed", self, "rdp_pressed") RegM_Btn.connect("pressed", self, "regM_pressed") + diff --git a/App/project.godot b/App/project.godot index 65f57e5..55a68fa 100644 --- a/App/project.godot +++ b/App/project.godot @@ -10,17 +10,23 @@ config_version=4 _global_script_classes=[ { "base": "Object", +"class": "Eva", +"language": "GDScript", +"path": "res://EoI/Scripts/Eva.gd" +}, { +"base": "Object", "class": "Lexer", "language": "GDScript", "path": "res://RDP/Scripts/Lexer.gd" } ] _global_script_class_icons={ +"Eva": "", "Lexer": "" } [application] -config/name="Parser" +config/name="LangStudies" run/main_scene="res://Scenes/Persistent.tscn" config/icon="res://Assets/Branding/RDP_Class_cover_small.png" diff --git a/Engine/gd b/Engine/gd index 99a923c..32ef964 160000 --- a/Engine/gd +++ b/Engine/gd @@ -1 +1 @@ -Subproject commit 99a923ce9e604b22fbdb9df745fcb67c4d2c8d56 +Subproject commit 32ef964b0f7d4e18a919e904988727b3ed775901 diff --git a/Readme.md b/Readme.md index f828ea0..518461e 100644 --- a/Readme.md +++ b/Readme.md @@ -4,4 +4,4 @@ A set of material done while following [Dmitry Soshnikov's](https://t.co/UL7NQyykPu) courses Currently I'm in the process of completing -![Automata: RegExp Machines](https://i.imgur.com/NWwBjhN.png) \ No newline at end of file +![Essentials of Interpretation](https://i.imgur.com/MYIkjWk.png) \ No newline at end of file