-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCompiladorC1.java
More file actions
40 lines (35 loc) · 1.01 KB
/
CompiladorC1.java
File metadata and controls
40 lines (35 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package com.company;
/**
*
* @author PROFESSORES
*/
import java.io.*;
public class CompiladorC1 {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
try {
BufferedReader in = new BufferedReader(new FileReader("C:/Users/Work/Desktop/CompiladorC1/prog1.c1"));
String linha, programa;
linha = in.readLine();
programa = "";
while (linha != null) {
programa = programa + linha + "\n";
linha = in.readLine();
}
C1 compilador = new C1(programa);
in.close();
} catch (IOException e) {
System.out.println("prog1.c1 não encontrado!");
}
int x=4;
int y=1;
switch (x+y) {
case 4: System.out.println("OK"); break;
case 0: System.out.println("OK"); break;
default: System.out.println("Erro");
}
}
}