-
-
Notifications
You must be signed in to change notification settings - Fork 119
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
Help needed: matching Python-like multiline strings #330
Comments
Hello! I am afraid it is not possible by just using regexes. This is a bit the limitation of not using look-around and so on: you gain performances at the cost of fewer features. But I think it's relatively easy to implement a callback function with |
can you give an example? |
I think there are some examples if you search the issues or the examples directory… but I don’t have one example to show right now unfortunately :/ |
I haven't done that yet, but it seems like using a sublexer (see #61) for this would be the best way. |
Closing. See #421 (comment) for an example on comments (which is very similar to multiline strings). |
Every single regex i could find uses either globals flags or lookaround, neither of which are supported by logos (to my knowledge, at least). Syntax like
[^(""")]
(NOT group of symbols) is not supported by regex itself, though even if it was i'm pretty sure it'll fall into the lookahead category and therefore would still not be supported by logos. CAD97's C-style block comment regex is pretty much incompatible with Python-like block comments, where comment start and comment end are all the same characters. I imagine this can be possible with a lot of boilerplate around extras, or via postprocessing, but before going with these i'd like to ask if anyone encountered the same problem and got a solution. Any help is greatly appreciated!The text was updated successfully, but these errors were encountered: