Skip to content

Commit 285fd2d

Browse files
committed
Fix inspections
1 parent 475fdc8 commit 285fd2d

4 files changed

Lines changed: 5 additions & 14 deletions

File tree

src/main/java/ko/carbonel/stream/Lexer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ private Token genericLexByArray(List<CharType> validCharTypes, List<String> char
115115
}
116116

117117
/**
118-
* Peek at the next character, if it's an equals use token type a, if not use token type b
118+
* Peek at the next character, if it's an equals use token type A, if not use token type B
119119
*
120120
* @param ifEquals TokenType a
121121
* @param ifNoEquals TokenType b

src/main/java/ko/carbonel/stream/SourceFileReader.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
package ko.carbonel.stream;
22

3-
import ko.carbonel.representation.FileLocation;
4-
import ko.carbonel.exception.lexer.IllegalSymbolError;
53
import ko.carbonel.Logger;
64
import ko.carbonel.Utils;
5+
import ko.carbonel.exception.lexer.IllegalSymbolError;
6+
import ko.carbonel.representation.FileLocation;
77

8-
import java.io.BufferedReader;
98
import java.io.FileInputStream;
109
import java.io.FileNotFoundException;
1110
import java.io.IOException;
@@ -14,7 +13,6 @@ public class SourceFileReader extends PeekableStream<String> {
1413
private final String filename;
1514
private FileLocation location;
1615
private FileInputStream fis;
17-
private BufferedReader br;
1816
private boolean isOpen = false;
1917

2018
public SourceFileReader(String filename) {

src/test/java/ko/carbonel/intermediate/EBNFLexer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ public static void main(String[] args) {
4040
String formatted2 = new PrettyTableWriter().formatTable(padTo(r2.maxOptions + LIT.size() - 1, LIT), r2.toTable(false, false), Utils::leftPad);
4141
System.out.println(formatted2);
4242
System.out.flush();
43-
// Rules r3 = r2.factorize();
44-
// String formatted3 = new PrettyTableWriter().formatTable(padTo(r2.maxOptions + LIT.size() - 1, LIT), r3.toTable(false, false), Utils::leftPad);
45-
// System.out.println(formatted3);
46-
// System.out.flush();
4743
} catch (IOException e) {
4844
throw new RuntimeException(e);
4945
}

src/test/java/ko/carbonel/intermediate/Rules.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
*/
1111

1212
class Rules {
13-
List<Rule> rules;
14-
int maxOptions;
13+
final List<Rule> rules;
14+
final int maxOptions;
1515

1616
Rules(List<Rule> rules) {
1717
this.rules = rules;
@@ -70,7 +70,4 @@ public Rules removeLambdas() {
7070
return new Rules(rules.stream().map(Rule::removeLambdas).toList());
7171
}
7272

73-
// public Rules factorize() {
74-
// return rules.stream().map(Rule::factorize).toList();
75-
// }
7673
}

0 commit comments

Comments
 (0)