From 6aaa01a517829f99f9089fc5653a8eb293ee1f9f Mon Sep 17 00:00:00 2001 From: Vincent Hugot Date: Tue, 31 Jan 2023 14:54:24 +0100 Subject: [PATCH 1/2] [M:grammar.md] doc: added Python-style comments. --- docs/grammar.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/grammar.md b/docs/grammar.md index b27b5652..5c847ad9 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -43,7 +43,9 @@ Lark grammars are composed of a list of definitions and directives, each on its ``` -**Comments** start with `//` and last to the end of the line (C++ style) +**Comments** start with +either `//` (C++ style) or `#` (Python style) +and last to the end of the line. Lark begins the parse with the rule 'start', unless specified otherwise in the options. From 30b6982762a96810480cf54cacfaf5d3f5956530 Mon Sep 17 00:00:00 2001 From: Vincent Hugot Date: Tue, 31 Jan 2023 15:51:32 +0100 Subject: [PATCH 2/2] [M:grammar.md] mention version --- docs/grammar.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/grammar.md b/docs/grammar.md index 5c847ad9..6cf80240 100644 --- a/docs/grammar.md +++ b/docs/grammar.md @@ -44,7 +44,7 @@ Lark grammars are composed of a list of definitions and directives, each on its **Comments** start with -either `//` (C++ style) or `#` (Python style) +either `//` (C++ style) or `#` (Python style, since version 1.1.6) and last to the end of the line. Lark begins the parse with the rule 'start', unless specified otherwise in the options.