Skip to content
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

Regular expressions #64

Open
jupelius opened this issue Oct 25, 2014 · 2 comments
Open

Regular expressions #64

jupelius opened this issue Oct 25, 2014 · 2 comments
Assignees
Labels

Comments

@jupelius
Copy link
Contributor

What should be the syntax of regular expressions in our language? Matching operators like ~= or a global regex object with suitable methods?

Also should we use an external library for regular expressions or implement them ourselves?

@RauliL
Copy link
Member

RauliL commented Oct 25, 2014

Since we have our own Unicode string class, it would be difficult and ineffective use external libraries like PCRE to implement regular expressions.

I think the only option we have is to implement our own regular expression engine. It doesn't need to be comprehensive, just the basics.

@RauliL
Copy link
Member

RauliL commented Oct 25, 2014

As for the syntax, it would be nice to have regular expression literals like in many other languages. This would require extra work with the parser but I think it's worth to try. Of course, regular expressions would have their own class Regexp and they could be compiled dynamically with a constructor which takes string as argument like this: Regexp("^[ \\t]+|[ \\t]+$")

@RauliL RauliL self-assigned this Dec 7, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants