Skip to content

Commit a5462a3

Browse files
committed
Revert the antlr4 files as they are generated ones
1 parent f5f0226 commit a5462a3

File tree

2 files changed

+47
-2
lines changed

2 files changed

+47
-2
lines changed

spring-ai-core/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersLexer.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,12 @@ public class FiltersLexer extends Lexer {
4343

4444
public static final String[] ruleNames = makeRuleNames();
4545

46+
/**
47+
* @deprecated Use {@link #VOCABULARY} instead.
48+
*/
49+
@Deprecated
50+
public static final String[] tokenNames;
51+
4652
public static final String _serializedATN = "\u0004\u0000\u001a\u00e5\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002"
4753
+ "\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002"
4854
+ "\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002"
@@ -234,6 +240,12 @@ private static String[] makeSymbolicNames() {
234240
"IDENTIFIER", "WS" };
235241
}
236242

243+
@Override
244+
@Deprecated
245+
public String[] getTokenNames() {
246+
return tokenNames;
247+
}
248+
237249
@Override
238250

239251
public Vocabulary getVocabulary() {
@@ -274,6 +286,20 @@ public ATN getATN() {
274286
RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION);
275287
}
276288

289+
static {
290+
tokenNames = new String[_SYMBOLIC_NAMES.length];
291+
for (int i = 0; i < tokenNames.length; i++) {
292+
tokenNames[i] = VOCABULARY.getLiteralName(i);
293+
if (tokenNames[i] == null) {
294+
tokenNames[i] = VOCABULARY.getSymbolicName(i);
295+
}
296+
297+
if (tokenNames[i] == null) {
298+
tokenNames[i] = "<INVALID>";
299+
}
300+
}
301+
}
302+
277303
static {
278304
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
279305
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {

spring-ai-core/src/main/java/org/springframework/ai/vectorstore/filter/antlr4/FiltersParser.java

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ public class FiltersParser extends Parser {
5757

5858
public static final String[] ruleNames = makeRuleNames();
5959

60+
/**
61+
* @deprecated Use {@link #VOCABULARY} instead.
62+
*/
63+
@Deprecated
64+
public static final String[] tokenNames;
65+
6066
public static final String _serializedATN = "\u0004\u0001\u001aY\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"
6167
+ "\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"
6268
+ "\u0005\u0007\u0005\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001"
@@ -129,6 +135,20 @@ public class FiltersParser extends Parser {
129135
RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION);
130136
}
131137

138+
static {
139+
tokenNames = new String[_SYMBOLIC_NAMES.length];
140+
for (int i = 0; i < tokenNames.length; i++) {
141+
tokenNames[i] = VOCABULARY.getLiteralName(i);
142+
if (tokenNames[i] == null) {
143+
tokenNames[i] = VOCABULARY.getSymbolicName(i);
144+
}
145+
146+
if (tokenNames[i] == null) {
147+
tokenNames[i] = "<INVALID>";
148+
}
149+
}
150+
}
151+
132152
static {
133153
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
134154
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
@@ -159,9 +179,8 @@ private static String[] makeSymbolicNames() {
159179

160180
@Override
161181
@Deprecated
162-
// Usage of token names is removed and hence this returns null.
163182
public String[] getTokenNames() {
164-
return null;
183+
return tokenNames;
165184
}
166185

167186
@Override

0 commit comments

Comments
 (0)