Added pounddemo

java11
Sandy Brownlee 2 years ago
parent a2cac87f81
commit 64c25f1486
  1. 6
      Triangle.Compiler/src/test/java/triangle/syntacticAnalyser/TestScanner.java
  2. 2
      programs/hi-newcomment.tri
  3. 8
      programs/hi-newcomment2.tri
  4. 15
      programs/pounddemo.tri

@ -32,6 +32,12 @@ public class TestScanner {
}
@Test
public void testPoundDemo() {
compileExpectFailure("/pounddemo.tri");
}
private void compileExpectSuccess(String filename) {
// build.gradle has a line sourceSets.test.resources.srcDir file("$rootDir/programs")

@ -1,3 +1,5 @@
! this won't work until after some work in the practicals
# new comment
begin

@ -1,8 +1,10 @@
! this won't work until after some work in the practicals
# new comment
/*
* another new comment
*/
$
another new comment
$
begin
put('H'); put('i'); put('!')

@ -0,0 +1,15 @@
! this won't work until after some work in the practicals
let
var a : Integer;
var b : Integer
in
begin
a := 1;
b := 2;
putint(a)
putint(b)
putint(£a)
putint(£b)
end