From 8dcc6526cfb154d688497f31cf1e0904801c6df2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Sim=C3=B5es?= <104087721+cxambs@users.noreply.github.com> Date: Mon, 20 Mar 2023 11:48:22 +0000 Subject: [PATCH 1/2] Update LexerATNSimulator.cs with virutal Consume MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow user to subclass and consume differently. Useful for CR handling as suggested in https://github.com/antlr/antlr4/pull/2519 Signed-off-by: Alberto Simões --- runtime/CSharp/src/Atn/LexerATNSimulator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/CSharp/src/Atn/LexerATNSimulator.cs b/runtime/CSharp/src/Atn/LexerATNSimulator.cs index 3c9479ca80..4644decd4f 100644 --- a/runtime/CSharp/src/Atn/LexerATNSimulator.cs +++ b/runtime/CSharp/src/Atn/LexerATNSimulator.cs @@ -779,7 +779,7 @@ public int Column } - public void Consume(ICharStream input) + public virtual void Consume(ICharStream input) { int curChar = input.LA(1); if (curChar == '\n') From 5d1fd1a340c97a01caec6386437ce5e92a26b7a7 Mon Sep 17 00:00:00 2001 From: Terence Parr Date: Fri, 12 May 2023 09:44:33 -0700 Subject: [PATCH 2/2] Update releasing-antlr.md Signed-off-by: Terence Parr --- doc/releasing-antlr.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/releasing-antlr.md b/doc/releasing-antlr.md index 10a8631ef4..1248d5bfe5 100644 --- a/doc/releasing-antlr.md +++ b/doc/releasing-antlr.md @@ -94,6 +94,8 @@ git push origin master This section addresses a [circular dependency regarding XPath](https://github.com/antlr/antlr4/issues/3600). In the java target I avoided a circular dependency (gen 4.12.0 parser for XPath using 4.12.0 which needs it to build) by hand building the parser: runtime/Java/src/org/antlr/v4/runtime/tree/xpath/XPath.java. Probably we won't have to rerun this for the patch releases, just major ones that alter the ATN serialization. +Note: C++ needs a regen too. Fails with exception during xpath run. + ``` cd ~/antlr/code/antlr4/runtime/CSharp/src/Tree/Xpath java -cp ":/Users/parrt/.m2/repository/org/antlr/antlr4/4.12.0-SNAPSHOT/antlr4-4.12.0-SNAPSHOT-complete.jar:$CLASSPATH" org.antlr.v4.Tool -Dlanguage=CSharp XPathLexer.g4