Performed some minor cleaning

This commit is contained in:
Mike Cifelli 2016-12-10 12:06:14 -05:00
parent 8cdeda7cb3
commit a3a49a2084
3 changed files with 7 additions and 12 deletions

View File

@ -1,10 +1,6 @@
package scanner; package scanner;
import static util.Characters.BACKSLASH; import static util.Characters.*;
import static util.Characters.DOUBLE_QUOTE;
import static util.Characters.EOF;
import static util.Characters.NEWLINE;
import static util.Characters.SEMICOLON;
import java.io.FilterInputStream; import java.io.FilterInputStream;
import java.io.IOException; import java.io.IOException;
@ -41,10 +37,6 @@ public class LispFilterInputStream extends FilterInputStream {
previousCharacter = nextCharacter; previousCharacter = nextCharacter;
nextCharacter = super.read(); nextCharacter = super.read();
indicateEncounterWithStringBoundary();
}
private void indicateEncounterWithStringBoundary() {
if (haveEncounteredStringBoundary()) if (haveEncounteredStringBoundary())
isInQuotedString = !isInQuotedString; isInQuotedString = !isInQuotedString;
} }

View File

@ -1,6 +1,9 @@
package scanner; package scanner;
import static util.Characters.*; import static util.Characters.BACKSLASH;
import static util.Characters.DOUBLE_QUOTE;
import static util.Characters.EOF;
import static util.Characters.NEWLINE;
import java.io.BufferedInputStream; import java.io.BufferedInputStream;
import java.io.IOException; import java.io.IOException;

View File

@ -5,6 +5,8 @@ import java.util.Map;
public class Characters { public class Characters {
public static final int EOF = -1;
public static final char BACKSLASH = '\\'; public static final char BACKSLASH = '\\';
public static final char DOUBLE_QUOTE = '\"'; public static final char DOUBLE_QUOTE = '\"';
public static final char HASH = '#'; public static final char HASH = '#';
@ -18,8 +20,6 @@ public class Characters {
public static final char SINGLE_QUOTE = '\''; public static final char SINGLE_QUOTE = '\'';
public static final char TICK_MARK = '`'; public static final char TICK_MARK = '`';
public static final int EOF = -1;
public static final Map<Character, Boolean> illegalIdentifierCharacters = new HashMap<>(); public static final Map<Character, Boolean> illegalIdentifierCharacters = new HashMap<>();
static { static {