Implemented lexer

This commit is contained in:
Clemens-Dautermann 2020-08-15 23:36:29 +02:00
parent cb809bfd29
commit ea26acce4a
34 changed files with 641 additions and 0 deletions

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View file

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelStore">
<e p="$USER_HOME$/.cache/JetBrains/Rider2020.1/extResources" t="IncludeRecursive" />
<e p="$USER_HOME$/.cache/JetBrains/Rider2020.1/resharper-host/local/Transient/ReSharperHost/v201/SolutionCaches/_Compiler.1953847606.00" t="ExcludeRecursive" />
<e p="$PROJECT_DIR$" t="IncludeRecursive">
<e p="Compiler.cs" t="Include" />
<e p="Compiler.csproj" t="IncludeRecursive" />
<e p="Compiler.sln" t="IncludeFlat" />
<e p="Lexer.cs" t="Include" />
<e p="Pattern.cs" t="Include" />
<e p="Token.cs" t="Include" />
<e p="TokenType.cs" t="Include" />
<e p="bin" t="ExcludeRecursive" />
<e p="obj" t="ExcludeRecursive">
<e p="Debug" t="Include">
<e p="netcoreapp3.1" t="Include">
<e p="Compiler.AssemblyInfo.cs" t="Include" />
</e>
</e>
</e>
<e p="packages" t="ExcludeRecursive" />
</e>
</component>
</project>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ContentModelUserStore">
<attachedFolders />
<explicitIncludes />
<explicitExcludes />
</component>
</project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Compiler/.idea/.idea.Compiler.iml" filepath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/.idea.Compiler.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/.idea.Compiler/riderModule.iml" filepath="$PROJECT_DIR$/.idea/.idea.Compiler/riderModule.iml" />
</modules>
</component>
</project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RiderProjectSettingsUpdater">
<option name="vcsConfiguration" value="2" />
</component>
</project>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

View file

@ -0,0 +1,264 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="BranchesTreeState">
<expand>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="LOCAL_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
</path>
<path>
<item name="ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="REMOTE_ROOT" type="e8cecc67:BranchNodeDescriptor" />
<item name="GROUP_NODE:origin" type="e8cecc67:BranchNodeDescriptor" />
</path>
</expand>
<select />
</component>
<component name="ChangeListManager">
<list default="true" id="a54bb6de-191c-4bd1-91ab-3953adfc5dfb" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/../.idea/.idea.lpc.dir/.idea/.idea.lpc.dir.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../.idea/.idea.lpc.dir/riderModule.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../.idea/lpc.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/.idea.Compiler.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/contentModel.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/indexLayout.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/misc.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/modules.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/projectSettingsUpdater.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/.idea/vcs.xml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/.idea/.idea.Compiler/riderModule.iml" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Compiler.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Lexer.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Pattern.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/Token.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/TokenType.cs" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../grammar" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/multi_digit.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/newlines.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/no_newlines.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/return_0.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/return_2.c" afterDir="false" />
<change afterPath="$PROJECT_DIR$/../tests/week_1/valid/spaces.c" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$/.." />
</component>
<component name="HighlightingSettingsPerFile">
<setting file="file://$PROJECT_DIR$/Lexer.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/TokenType.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Compiler.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Pattern.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$PROJECT_DIR$/Token.cs" root0="FORCE_HIGHLIGHTING" />
<setting file="file://$APPLICATION_CONFIG_DIR$/resharper-host/DecompilerCache/decompiler/714153FB-3DE5-4537-8A59-8AE8F7F7655E/44/126d3750/String.cs" root0="SKIP_HIGHLIGHTING" />
</component>
<component name="IdeDocumentHistory">
<option name="CHANGED_PATHS">
<list>
<option value="$PROJECT_DIR$/Compiler/Program.cs" />
<option value="$PROJECT_DIR$/Program.cs" />
<option value="$PROJECT_DIR$/Tokens.cs" />
<option value="$PROJECT_DIR$/Pattern.cs" />
<option value="$PROJECT_DIR$/Token.cs" />
<option value="$PROJECT_DIR$/Compiler.cs" />
<option value="$PROJECT_DIR$/TokenType.cs" />
<option value="$PROJECT_DIR$/Lexer.cs" />
</list>
</option>
</component>
<component name="ProjectId" id="1g8sEwibYOXRSHf7VBAgyNtiM21" />
<component name="ProjectLevelVcsManager" settingsEditedManually="true">
<ConfirmationsSetting value="2" id="Add" />
</component>
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent">
<property name="ASKED_ADD_EXTERNAL_FILES" value="true" />
<property name="ASKED_SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="DebuggerViewTab_PTCS_FirstProportionKey" value="0.350057" />
<property name="DebuggerViewTab_PTCS_LastProportionKey" value="0.299886" />
<property name="RunOnceActivity.OpenProjectViewOnStart" value="true" />
<property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
<property name="SHARE_PROJECT_CONFIGURATION_FILES" value="true" />
<property name="WebServerToolWindowFactoryState" value="false" />
<property name="XThreadsFramesViewSplitterKey" value="0.49837133" />
<property name="last_opened_file_path" value="$PROJECT_DIR$/.." />
<property name="settings.editor.selected.configurable" value="editor.preferences.smartKeys_rider" />
</component>
<component name="RunManager">
<configuration name="Compiler" type="DotNetProject" factoryName=".NET Project">
<option name="EXE_PATH" value="$PROJECT_DIR$/bin/Debug/netcoreapp3.1/Compiler.dll" />
<option name="PROGRAM_PARAMETERS" value="" />
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/bin/Debug/netcoreapp3.1" />
<option name="PASS_PARENT_ENVS" value="1" />
<option name="USE_EXTERNAL_CONSOLE" value="0" />
<option name="USE_MONO" value="0" />
<option name="RUNTIME_ARGUMENTS" value="" />
<option name="PROJECT_PATH" value="$PROJECT_DIR$/Compiler.csproj" />
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
<option name="PROJECT_KIND" value="DotNetCore" />
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.1" />
<method v="2">
<option name="Build" />
</method>
</configuration>
</component>
<component name="SvnConfiguration">
<configuration />
</component>
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="a54bb6de-191c-4bd1-91ab-3953adfc5dfb" name="Default Changelist" comment="" />
<created>1597507445860</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1597507445860</updated>
<workItem from="1597507449039" duration="231000" />
<workItem from="1597508003307" duration="9083000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="2" />
</component>
<component name="UnityProjectConfiguration" hasMinimizedUI="false" />
<component name="UnityUnitTestConfiguration" currentTestLauncher="NUnit" />
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
<option name="oldMeFiltersMigrated" value="true" />
</component>
<component name="VcsManagerConfiguration">
<option name="ADD_EXTERNAL_FILES_SILENTLY" value="true" />
<option name="CLEAR_INITIAL_COMMIT_MESSAGE" value="true" />
</component>
<component name="WindowStateProjectService">
<state x="2029" y="149" width="738" height="749" key="#Compiler" timestamp="1597507583637">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state x="2029" y="149" width="738" height="749" key="#Compiler/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597507583637" />
<state x="2169" y="170" width="430" height="508" key="FileChooserDialogImpl" timestamp="1597507670532">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state x="2169" y="170" width="430" height="508" key="FileChooserDialogImpl/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597507670532" />
<state width="908" height="289" key="GridCell.Tab.0.bottom" timestamp="1597526505915">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="289" key="GridCell.Tab.0.bottom/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597526505915" />
<state width="908" height="289" key="GridCell.Tab.0.center" timestamp="1597526505914">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="289" key="GridCell.Tab.0.center/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597526505914" />
<state width="908" height="289" key="GridCell.Tab.0.left" timestamp="1597526505914">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="289" key="GridCell.Tab.0.left/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597526505914" />
<state width="908" height="289" key="GridCell.Tab.0.right" timestamp="1597526505914">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="289" key="GridCell.Tab.0.right/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597526505914" />
<state width="908" height="383" key="GridCell.Tab.1.bottom" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.1.bottom/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.1.center" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.1.center/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.1.left" timestamp="1597525905669">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.1.left/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905669" />
<state width="908" height="383" key="GridCell.Tab.1.right" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.1.right/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.2.bottom" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.2.bottom/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.2.center" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.2.center/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.2.left" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.2.left/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.2.right" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.2.right/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.3.bottom" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.3.bottom/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.3.center" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.3.center/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.3.left" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.3.left/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.3.right" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.3.right/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.4.bottom" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.4.bottom/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.4.center" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.4.center/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.4.left" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.4.left/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state width="908" height="383" key="GridCell.Tab.4.right" timestamp="1597525905670">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="908" height="383" key="GridCell.Tab.4.right/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525905670" />
<state x="1989" y="220" width="806" height="524" key="Rider.ProjectTemplateDialog.Size" timestamp="1597507532464">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state x="1989" y="220" width="806" height="524" key="Rider.ProjectTemplateDialog.Size/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597507532464" />
<state x="2161" y="167" width="474" height="713" key="RiderGenerateDialog" timestamp="1597510130230">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state x="2161" y="167" width="474" height="713" key="RiderGenerateDialog/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597510130230" />
<state x="886" y="141" width="1031" height="724" key="SettingsEditor" timestamp="1597520511080">
<screen x="0" y="0" width="1920" height="1080" />
</state>
<state x="886" y="141" width="1031" height="724" key="SettingsEditor/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597520511080" />
<state width="480" height="540" key="XDebugger.FullValuePopup" timestamp="1597525606220">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state width="480" height="540" key="XDebugger.FullValuePopup/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597525606220" />
<state x="2182" y="199" width="432" height="650" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser" timestamp="1597510086756">
<screen x="1920" y="0" width="1920" height="1080" />
</state>
<state x="2182" y="199" width="432" height="650" key="com.intellij.openapi.editor.actions.MultiplePasteAction$ClipboardContentChooser/1920.0.1920.1080/0.0.1920.1080@1920.0.1920.1080" timestamp="1597510086756" />
</component>
</project>

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="RIDER_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$/../.." />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>