-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokenmachine.java
More file actions
34 lines (26 loc) · 805 Bytes
/
tokenmachine.java
File metadata and controls
34 lines (26 loc) · 805 Bytes
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
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package codeanalyzer;
/**
*
* @author susdeshp
*/
public class tokenmachine {
private String Identifiers[];
private final static String IFKEYWORD = "if";
private final static String ELSEKEYWORD = "else";
private final static String FORKEYWORD = "for";
private final static String WHILEKEYWORD = "while";
private final static String DOKEYWORD = "do";
private final static int MAXIDENTIFIERS = 1000;
private int IdentifierCount;
public tokenmachine(){
InitializeTokenDatabase();
}
private void InitializeTokenDatabase(){
Identifiers = new String[MAXIDENTIFIERS];
IdentifierCount = 0;
}
}