-
-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Newline character as list delimiter? #12
Comments
Maybe your use-case can be solved with from pyleri import Repeat, Grammar, Regex
class MyGrammar(Grammar):
element = Regex(r"\w+")
START = Repeat(element)
grammar = MyGrammar()
print(grammar.parse("word\nword\n").as_str()) # parsed successfully However, if it get's more complicated you might run into to problems since |
As I understand list does work for delimiter that are anything non whitespace (including line breaks)? Thank you for your quick reply. Edit: I can see a lot of example where I have lines with white space that are only separated by linebreaks... |
Would the RE_WHITESPACE feature be available soon? Thanks! |
@joente you mentioned "pyleri handles all white-space (including line breaks) equally", what does it mean exactly? Are all white-space (including line breaks) equally ignored? |
Cant figure out how to parse a line by line file (CSV, or other list...)
error at position 5, expecting:
Tried with combination of \n, \n, os.linesep...
No luck
Any idea?
The text was updated successfully, but these errors were encountered: