parent
1a339eb900
commit
841a7c9af2
@ -0,0 +1,6 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<classpath> |
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/> |
||||
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/> |
||||
<classpathentry kind="output" path="bin/default"/> |
||||
</classpath> |
@ -0,0 +1,23 @@ |
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<projectDescription> |
||||
<name>Triangle-Tools</name> |
||||
<comment>Project Triangle-Tools created by Buildship.</comment> |
||||
<projects> |
||||
</projects> |
||||
<buildSpec> |
||||
<buildCommand> |
||||
<name>org.eclipse.jdt.core.javabuilder</name> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
<buildCommand> |
||||
<name>org.eclipse.buildship.core.gradleprojectbuilder</name> |
||||
<arguments> |
||||
</arguments> |
||||
</buildCommand> |
||||
</buildSpec> |
||||
<natures> |
||||
<nature>org.eclipse.jdt.core.javanature</nature> |
||||
<nature>org.eclipse.buildship.core.gradleprojectnature</nature> |
||||
</natures> |
||||
</projectDescription> |
@ -0,0 +1,13 @@ |
||||
arguments= |
||||
auto.sync=false |
||||
build.scans.enabled=false |
||||
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) |
||||
connection.project.dir= |
||||
eclipse.preferences.version=1 |
||||
gradle.user.home= |
||||
java.home= |
||||
jvm.arguments= |
||||
offline.mode=false |
||||
override.workspace.settings=false |
||||
show.console.view=false |
||||
show.executions.view=false |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
||||
org.eclipse.jdt.core.compiler.compliance=11 |
||||
org.eclipse.jdt.core.compiler.source=11 |
@ -0,0 +1,2 @@ |
||||
connection.project.dir=.. |
||||
eclipse.preferences.version=1 |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
||||
org.eclipse.jdt.core.compiler.compliance=11 |
||||
org.eclipse.jdt.core.compiler.source=11 |
@ -0,0 +1 @@ |
||||
/main/ |
@ -0,0 +1,2 @@ |
||||
connection.project.dir=.. |
||||
eclipse.preferences.version=1 |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
||||
org.eclipse.jdt.core.compiler.compliance=11 |
||||
org.eclipse.jdt.core.compiler.source=11 |
@ -0,0 +1 @@ |
||||
/main/ |
@ -0,0 +1,2 @@ |
||||
connection.project.dir=.. |
||||
eclipse.preferences.version=1 |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
||||
org.eclipse.jdt.core.compiler.compliance=11 |
||||
org.eclipse.jdt.core.compiler.source=11 |
@ -0,0 +1 @@ |
||||
/main/ |
@ -0,0 +1,2 @@ |
||||
connection.project.dir=.. |
||||
eclipse.preferences.version=1 |
@ -0,0 +1,4 @@ |
||||
eclipse.preferences.version=1 |
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 |
||||
org.eclipse.jdt.core.compiler.compliance=11 |
||||
org.eclipse.jdt.core.compiler.source=11 |
@ -0,0 +1,2 @@ |
||||
/main/ |
||||
/test/ |
@ -0,0 +1,35 @@ |
||||
/* |
||||
* @(#)WhileCommand.java 2.1 2003/10/07 |
||||
* |
||||
* Copyright (C) 1999, 2003 D.A. Watt and D.F. Brown |
||||
* Dept. of Computing Science, University of Glasgow, Glasgow G12 8QQ Scotland |
||||
* and School of Computer and Math Sciences, The Robert Gordon University, |
||||
* St. Andrew Street, Aberdeen AB25 1HG, Scotland. |
||||
* All rights reserved. |
||||
* |
||||
* This software is provided free for educational use only. It may |
||||
* not be used for commercial purposes without the prior written permission |
||||
* of the authors. |
||||
*/ |
||||
|
||||
package triangle.abstractSyntaxTrees.commands; |
||||
|
||||
import triangle.abstractSyntaxTrees.expressions.Expression; |
||||
import triangle.abstractSyntaxTrees.visitors.CommandVisitor; |
||||
import triangle.syntacticAnalyzer.SourcePosition; |
||||
|
||||
public class RepeatCommand extends Command { |
||||
|
||||
public RepeatCommand(Expression eAST, Command cAST, SourcePosition position) { |
||||
super(position); |
||||
E = eAST; |
||||
C = cAST; |
||||
} |
||||
|
||||
public <TArg, TResult> TResult visit(CommandVisitor<TArg, TResult> v, TArg arg) { |
||||
return v.visitRepeatCommand(this, arg); |
||||
} |
||||
|
||||
public Expression E; |
||||
public final Command C; |
||||
} |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,22 @@ |
||||
let |
||||
var a: Integer; |
||||
var b: Integer |
||||
in |
||||
begin |
||||
! Get user input for both values |
||||
put('>'); put(' '); getint(var a); |
||||
put('>'); put(' '); getint(var b); |
||||
|
||||
! Sum |
||||
putint(a+b); |
||||
puteol(); |
||||
|
||||
! Prod. |
||||
putint(a*b); |
||||
puteol(); |
||||
|
||||
! Check if the same |
||||
if a = b |
||||
then begin put('S'); put('a'); put('m'); put('e'); put('!'); end |
||||
else !nothing |
||||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue