Compare commits

..

No commits in common. "4bede63054a1c2b1c10f601d345b5b518764d150" and "a07a80883c89187ebc359980582c399ae3a9482f" have entirely different histories.

2 changed files with 6 additions and 6 deletions

View File

@ -1,5 +1,7 @@
package edu.jt_kb.cs4308.compiler;
import edu.jt_kb.cs4308.compiler.models.Token;
public class Driver {
public static void main(String[] args) {
System.out.println("Default Setup");

View File

@ -1,9 +1,7 @@
package edu.jt_kb.cs4308.compiler.models;
public enum TokenType {
INT_LIT(10),IDENT(11),ASSIGN_OP(20),ADD_OP(21),SUB_OP(22),MULT_OP(23),
DIV_OP(24),LEFT_PAREN(26),RIGHT_PAREN(27),SEMI_COLON(28);
public enum Token {
IDENT(0),ASS_OP(1),SUB_OP(2),DIV_OP(3),INT_LITERAL(4),SEMICOLON(5);
public final int value; /* represents which Token you are referencing. */
@ -15,7 +13,7 @@ public enum TokenType {
*
* @param value - the integer value for the token.
*/
TokenType(int value) {
Token(int value) {
this.value = value;
}
@ -26,7 +24,7 @@ public enum TokenType {
* @return if the values are the same, true
* else, false
*/
public boolean equals(TokenType other) {
public boolean equals(Token other) {
return this.value == other.value;
}
}