Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lark/grammars/lark.lark
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,8 @@ _NL: /(\r?\n)+\s*/

COMMENT: /\s*/ "//" /[^\n]/* | /\s*/ "#" /[^\n]/*

BACKSLASH: /\\[ ]*\n/

%ignore WS_INLINE
%ignore COMMENT
%ignore BACKSLASH
8 changes: 8 additions & 0 deletions tests/test_grammar.py
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,14 @@ def test_line_breaks(self):
p.parse('ab')


def test_line_breaks_in_lark_lark(self):
# The `lark.lark` meta-grammar must accept line continuations too
lark_lark = Lark.open_from_package('lark', 'lark.lark', ('grammars',), parser='lalr')
lark_lark.parse(r"""start: "a" \
"b"
""")


def test_symbol_eq(self):
a = None
b = Symbol("abc")
Expand Down
Loading