From a3a49a2084a9c16262433ba76efb46a2b60e33da Mon Sep 17 00:00:00 2001 From: Mike Cifelli Date: Sat, 10 Dec 2016 12:06:14 -0500 Subject: [PATCH] Performed some minor cleaning --- src/scanner/LispFilterInputStream.java | 10 +--------- src/scanner/LispScanner.java | 5 ++++- src/util/Characters.java | 4 ++-- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/src/scanner/LispFilterInputStream.java b/src/scanner/LispFilterInputStream.java index e60a01b..2e3644a 100644 --- a/src/scanner/LispFilterInputStream.java +++ b/src/scanner/LispFilterInputStream.java @@ -1,10 +1,6 @@ package scanner; -import static util.Characters.BACKSLASH; -import static util.Characters.DOUBLE_QUOTE; -import static util.Characters.EOF; -import static util.Characters.NEWLINE; -import static util.Characters.SEMICOLON; +import static util.Characters.*; import java.io.FilterInputStream; import java.io.IOException; @@ -41,10 +37,6 @@ public class LispFilterInputStream extends FilterInputStream { previousCharacter = nextCharacter; nextCharacter = super.read(); - indicateEncounterWithStringBoundary(); - } - - private void indicateEncounterWithStringBoundary() { if (haveEncounteredStringBoundary()) isInQuotedString = !isInQuotedString; } diff --git a/src/scanner/LispScanner.java b/src/scanner/LispScanner.java index c8058da..1908ec4 100644 --- a/src/scanner/LispScanner.java +++ b/src/scanner/LispScanner.java @@ -1,6 +1,9 @@ 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.IOException; diff --git a/src/util/Characters.java b/src/util/Characters.java index c0b0970..6e87a44 100644 --- a/src/util/Characters.java +++ b/src/util/Characters.java @@ -5,6 +5,8 @@ import java.util.Map; public class Characters { + public static final int EOF = -1; + public static final char BACKSLASH = '\\'; public static final char DOUBLE_QUOTE = '\"'; public static final char HASH = '#'; @@ -17,8 +19,6 @@ public class Characters { public static final char SEMICOLON = ';'; public static final char SINGLE_QUOTE = '\''; public static final char TICK_MARK = '`'; - - public static final int EOF = -1; public static final Map illegalIdentifierCharacters = new HashMap<>();