Skip to content

Commit

Permalink
Merge pull request #29 from kntkymt/feature/input-from-file
Browse files Browse the repository at this point in the history
ステップ26: 入力をファイルから読む
  • Loading branch information
kntkymt authored Dec 25, 2023
2 parents d497d17 + 5a0d200 commit 8adc45d
Show file tree
Hide file tree
Showing 84 changed files with 883 additions and 90 deletions.
76 changes: 76 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/CCompiler-Package.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompiler"
BuildableName = "CCompiler"
BlueprintName = "CCompiler"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompiler"
BuildableName = "CCompiler"
BlueprintName = "CCompiler"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompiler"
BuildableName = "CCompiler"
BlueprintName = "CCompiler"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
160 changes: 160 additions & 0 deletions .swiftpm/xcode/xcshareddata/xcschemes/CCompiler.xcscheme
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ccompiler"
BuildableName = "ccompiler"
BlueprintName = "ccompiler"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompilerCoreTest"
BuildableName = "CCompilerCoreTest"
BlueprintName = "CCompilerCoreTest"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ParserTest"
BuildableName = "ParserTest"
BlueprintName = "ParserTest"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "NO"
buildForArchiving = "NO"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TokenizerTest"
BuildableName = "TokenizerTest"
BlueprintName = "TokenizerTest"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES"
shouldAutocreateTestPlan = "YES">
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompilerCoreTest"
BuildableName = "CCompilerCoreTest"
BlueprintName = "CCompilerCoreTest"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ParserTest"
BuildableName = "ParserTest"
BlueprintName = "ParserTest"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "TokenizerTest"
BuildableName = "TokenizerTest"
BlueprintName = "TokenizerTest"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "CCompiler"
BuildableName = "CCompiler"
BlueprintName = "CCompiler"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ccompiler"
BuildableName = "ccompiler"
BlueprintName = "ccompiler"
ReferencedContainer = "container:">
</BuildableReference>
</MacroExpansion>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "ccompiler"
BuildableName = "ccompiler"
BlueprintName = "ccompiler"
ReferencedContainer = "container:">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
3 changes: 3 additions & 0 deletions ExecutableTests/000.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 0;
}
3 changes: 3 additions & 0 deletions ExecutableTests/001.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 42;
}
3 changes: 3 additions & 0 deletions ExecutableTests/002.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 5+20-4;
}
3 changes: 3 additions & 0 deletions ExecutableTests/003.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 100+2-2+100;
}
8 changes: 8 additions & 0 deletions ExecutableTests/004.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main( )

{

return 12
+ 34 -
5 ;
}
3 changes: 3 additions & 0 deletions ExecutableTests/005.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 5+6*7;
}
3 changes: 3 additions & 0 deletions ExecutableTests/006.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
int main() {
return 5*(9-6);
}
1 change: 1 addition & 0 deletions ExecutableTests/007.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return (3 + 5) / 2; }
1 change: 1 addition & 0 deletions ExecutableTests/008.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return -20 + 30; }
1 change: 1 addition & 0 deletions ExecutableTests/009.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return 1 < 2; }
1 change: 1 addition & 0 deletions ExecutableTests/010.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return 2 <= 3; }
1 change: 1 addition & 0 deletions ExecutableTests/011.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return 3 > -4; }
1 change: 1 addition & 0 deletions ExecutableTests/012.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return 10 >= 1; }
1 change: 1 addition & 0 deletions ExecutableTests/013.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return -1 != 1; }
1 change: 1 addition & 0 deletions ExecutableTests/014.c
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
int main() { return 0 == 0; }
5 changes: 5 additions & 0 deletions ExecutableTests/015.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int main()
{
int a;
return a = 5;
}
6 changes: 6 additions & 0 deletions ExecutableTests/016.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
int main()
{
int a;
a = 5;
return a + 1;
}
7 changes: 7 additions & 0 deletions ExecutableTests/017.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
int main()
{
int a;
int b;
a = b = 1;
return a + b;
}
8 changes: 8 additions & 0 deletions ExecutableTests/018.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int a;
a = 5;
int b;
b = 1;
return a + b;
}
8 changes: 8 additions & 0 deletions ExecutableTests/019.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int a;
a = 3;
int b;
b = 5 * 6 - 8;
return a + b / 2;
}
8 changes: 8 additions & 0 deletions ExecutableTests/020.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int hoge;
hoge = 5;
int fuga;
fuga = 3;
return hoge * fuga;
}
5 changes: 5 additions & 0 deletions ExecutableTests/021.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
int main()
{
return 1;
return 0;
}
8 changes: 8 additions & 0 deletions ExecutableTests/022.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int a;
a = 0;
while (a < 10)
a = a + 3;
return a;
}
8 changes: 8 additions & 0 deletions ExecutableTests/023.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int a;
a = 0;
if (1)
a = 10;
return a;
}
8 changes: 8 additions & 0 deletions ExecutableTests/024.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
int main()
{
int a;
a = 0;
if (0)
a = 10;
return a;
}
10 changes: 10 additions & 0 deletions ExecutableTests/025.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
int main()
{
int a;
a = 0;
if (0)
a = 10;
else
a = 20;
return a;
}
12 changes: 12 additions & 0 deletions ExecutableTests/026.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
int main()
{
int a;
a = 0;
if (0)
a = 10;
else if (0)
a = 20;
else
a = 30;
return a;
}
Loading

0 comments on commit 8adc45d

Please sign in to comment.