Scan: Added small warning (possibly TODO if a need arises)
Recent Commits to lark:master
-
Scan: Added small warning (possibly TODO if a need arises)
-
Add more scan() tests
Add more scan() tests
-
scan(): search start terminals directly so ignored spans aren't skipped
scan(): search start terminals directly so ignored spans aren't skipped
-
scan(): carry line/column counts across passes instead of recounting
scan(): carry line/column counts across passes instead of recounting
-
scan: validate config eagerly, reject custom lexers, tighten errors
scan: validate config eagerly, reject custom lexers, tighten errors - Split ParsingFrontend.scan() into _scan() so configuration errors raise on the call - Lark.scan() now checks parser='lalr' up front too. Reject custom lexer - Re-raise ConfigurationError instead of counting it as ValueError - Check source positions on every replayed token, not just the last docstring. - Improves docs - Adds tests
-
Export ScanMatch from the top-level lark package
Export ScanMatch from the top-level lark package
-
Test that Token end positions survive deepcopy and pickle
Test that Token end positions survive deepcopy and pickle
-
Docs: Added recipe for using scan()
Docs: Added recipe for using scan()
-
Add Lark.scan() for finding grammar matches in text, and parsing them.
Add Lark.scan() for finding grammar matches in text, and parsing them. It finds and parses each non-overlapping match, yielding the longest possible match. Reimplementation of the long-standing #1429 PR on top of the merged TextSlice support, with some modifications.
-
Token: preserve end_line/end_column/end_pos in __deepcopy__ and __red…
Token: preserve end_line/end_column/end_pos in __deepcopy__ and __reduce__ Both methods only copied start_pos/line/column, silently dropping the end positions.