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

Feature request : regexp #58

Open
solisoft opened this issue Sep 25, 2013 · 6 comments
Open

Feature request : regexp #58

solisoft opened this issue Sep 25, 2013 · 6 comments

Comments

@solisoft
Copy link

Do you plan to implement regexp ?

@orangeduck
Copy link
Owner

Yes I think this is an important feature. But it is also quite a large project so I might not find the time to do it alone.

Currently there are a couple main options.

The first option is to wrap an existing C regex library in a Cello like interface. The advantage of this is that it guarantees a stable and well behaved regex implementation. The downside is that it needs to be somehow packaged with Cello and must be portable.

Another option is to roll our own from scratch.

A third option is that I am currently working on a parser combinator library for vanilla C which I could port to Cello. And this library could be used to construct a regex engine as well as provide a general parsing tool which could also be used for JSON or whatever else.

The third option is my current preference although it may take several months or more for everything to fall in place.

For now my recommendation to anyone who wants regex like functionality is to look toward the scan functions. Believe it or not these are actually far more powerful than people think and often cover 90% of use cases.

@solisoft
Copy link
Author

Thank you for your answer ! Do you have any documentation about this scan method ?

@orangeduck
Copy link
Owner

There are a few details here.

The semantics of the function match closely that of scanf, except it is designed to work with Cello objects rather than raw C types.

@Garito
Copy link

Garito commented Sep 26, 2013

+1 for the parser

2013/9/25 Daniel Holden [email protected]

There are a few details here http://libcello.org/reference/show.

The semantics of the function match closely that of scanfhttp://www.cplusplus.com/reference/cstdio/scanf/,
except it is designed to work with Cello objects rather than raw C types.


Reply to this email directly or view it on GitHubhttps://github.com//issues/58#issuecomment-25126906
.

Mi twitter: http://twitter.com/garito

Temet nosce

@To1ne To1ne mentioned this issue Nov 22, 2013
@tucnak
Copy link

tucnak commented Jul 13, 2015

You'd better take a look at http://marcomaggi.github.io/docs/cre2.html

@masterl
Copy link

masterl commented Sep 22, 2015

Well, gcc has regex.h on gnu standards which could be wrapped, but the user would need to compile with gnuXX options.
Don't know what could be done for windows.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants