-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AQ language semantics impl Update progress
- Loading branch information
Showing
9 changed files
with
229 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 1 addition & 12 deletions
13
...m/lang/antlr/AxiomQueryErrorListener.java → .../antlr/AxiomQuerySyntaxErrorListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,21 @@ | ||
package com.evolveum.axiom.lang.antlr; | ||
|
||
import org.antlr.v4.runtime.*; | ||
import org.antlr.v4.runtime.misc.Interval; | ||
import org.antlr.v4.runtime.tree.ErrorNode; | ||
import org.antlr.v4.runtime.tree.ParseTree; | ||
import org.antlr.v4.runtime.tree.ParseTreeVisitor; | ||
|
||
import java.util.ArrayList; | ||
import java.util.List; | ||
|
||
/** | ||
* Created by Dominik. | ||
*/ | ||
public class AxiomQueryErrorListener extends BaseErrorListener { | ||
|
||
public class AxiomQuerySyntaxErrorListener extends BaseErrorListener { | ||
public List<AxiomQueryError> errorList = new ArrayList<>(); | ||
|
||
@Override | ||
public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, | ||
int line, int charPositionInLine, | ||
String msg, RecognitionException e) | ||
{ | ||
String sourceName = recognizer.getInputStream().getSourceName(); | ||
|
||
if (!sourceName.isEmpty()) { | ||
sourceName = String.format("%s:%d:%d: ", sourceName, line, charPositionInLine); | ||
} | ||
|
||
errorList.add(new AxiomQueryError(recognizer, offendingSymbol, line, charPositionInLine, 0, msg, e)); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.