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

regex supporting problem #4

Closed
qingliangcn opened this issue Apr 24, 2016 · 2 comments
Closed

regex supporting problem #4

qingliangcn opened this issue Apr 24, 2016 · 2 comments

Comments

@qingliangcn
Copy link

qingliangcn commented Apr 24, 2016

Erlang Version: R18.3

when i use this regex in leex(*.xrl):

\/\*(\*(?!\/)|[^*])*\*\/

i got this error:

 bad regexp `illegal character ?'
@qingliangcn
Copy link
Author

sorry for not reading the close post

@rvirding
Copy link
Owner

The reason you are getting an error is that the patterns supported by leex are not the same as for instance Perl. They are a set of patterns which can be compiled to an efficient DFA. This is impossible to do with very many of the options in Perl regexs. It is this feature of being able to generate a DFA which makes this type of tool efficient to use. For a description of what is available see the leex documentation.

? only means matches 0 or 1 of the preceding expressions.

@rvirding rvirding reopened this Apr 24, 2016
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

2 participants