GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — TextGameEngine/src/process/SyntaxErrorListener.java at main · drlifeL/TextGameEngine Expand file tree/ Copy pathSyntaxErrorListener.javaMore file actions 43 lines (32 loc) · 1.14 KB / Copy pathSyntaxErrorListener.javaFile metadata and controls43 lines (32 loc) · 1.14 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 package process; import org.antlr.v4.runtime.BaseErrorListener; import org.antlr.v4.runtime.Parser; import org.antlr.v4.runtime.RecognitionException; import org.antlr.v4.runtime.Recognizer; import org.antlr.v4.runtime.Token; import java.util.Collections; import java.util.List; /** * @author TODO * @since 2023/10/21 */ public class SyntaxErrorListener extends BaseErrorListener { private static boolean hasError = false; public static boolean hasError() { return hasError; } @Override public void syntaxError(Recognizer<?, ?> recognizer, Object offendingSymbol, int line, int charPositionInLine, String msg, RecognitionException e) { hasError = true; List<String> stack = ((Parser) recognizer).getRuleInvocationStack(); Collections.reverse(stack); System.err.println("Syntax Error!"); System.err.println("Token " + "\"" + ((Token) offendingSymbol).getText() + "\"" + "(line " + line + " , column " + (charPositionInLine + 1) + " )" + ": " + msg ); System.err.println("Rule Stack: " + stack); } } |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |