From 338446956be83b3b23dfbf29871c79898f1b9730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Schl=C3=B6gel?= Date: Mon, 3 Oct 2022 11:38:05 +0200 Subject: [PATCH 1/4] providing non-deprecated code sample in README.md --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index abcdf891..f9afb2ba 100644 --- a/README.md +++ b/README.md @@ -72,10 +72,11 @@ TypeScript 2.0. 5. Use your grammar in TypeScript ```typescript - import { ANTLRInputStream, CommonTokenStream } from 'antlr4ts'; + import { CodePointCharStream, CodePointBuffer, CommonTokenStream } from 'antlr4ts'; // Create the lexer and parser - let inputStream = new ANTLRInputStream("text"); + let buffer = Buffer.from("text"); + let inputStream = CodePointCharStream.fromBuffer(new CodePointBuffer(buffer, buffer.length)); let lexer = new MyGrammarLexer(inputStream); let tokenStream = new CommonTokenStream(lexer); let parser = new MyGrammarParser(tokenStream); From 16a1a162ec3677a4f58016b97f0ddd145ce9f0b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Schl=C3=B6gel?= Date: Mon, 3 Oct 2022 11:49:35 +0200 Subject: [PATCH 2/4] test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Niklas Schlögel --- testfile | 1 + 1 file changed, 1 insertion(+) create mode 100644 testfile diff --git a/testfile b/testfile new file mode 100644 index 00000000..9daeafb9 --- /dev/null +++ b/testfile @@ -0,0 +1 @@ +test From 99a2dff6e49b4511c0349971cd5ac9ddb5d5fe32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Schl=C3=B6gel?= Date: Wed, 30 Nov 2022 14:29:36 +0100 Subject: [PATCH 3/4] improving README.md --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index f9afb2ba..0660c363 100644 --- a/README.md +++ b/README.md @@ -75,8 +75,7 @@ TypeScript 2.0. import { CodePointCharStream, CodePointBuffer, CommonTokenStream } from 'antlr4ts'; // Create the lexer and parser - let buffer = Buffer.from("text"); - let inputStream = CodePointCharStream.fromBuffer(new CodePointBuffer(buffer, buffer.length)); + let inputStream = CharStreams.fromString("text") let lexer = new MyGrammarLexer(inputStream); let tokenStream = new CommonTokenStream(lexer); let parser = new MyGrammarParser(tokenStream); From 927a4b7cc65fba5aba1bf98a4971be8b0aa6614d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Schl=C3=B6gel?= Date: Wed, 30 Nov 2022 14:30:42 +0100 Subject: [PATCH 4/4] deleting accidentially created file --- testfile | 1 - 1 file changed, 1 deletion(-) delete mode 100644 testfile diff --git a/testfile b/testfile deleted file mode 100644 index 9daeafb9..00000000 --- a/testfile +++ /dev/null @@ -1 +0,0 @@ -test