distinguishing a string with flex

Posted by haluk on Stack Overflow See other posts from Stack Overflow or by haluk
Published on 2010-04-05T14:15:22Z Indexed on 2010/04/05 14:23 UTC
Read the original article Hit count: 207

Filed under:
|
|
|

Hi,

I need to tokenize some strings which will be splitted of according to operators like = and !=. I was successful using regex until the string has != operator. In my case, string was seperated into two parts, which is expected but ! mark is in the left side even it is part of given operator. Therefore, I believe that regex is not suitable for it and I want to benefit from lex. Since I do not have enough knowledge and experience with lex, I am not sure whether it fits my work or not. Basically, I am trying to do replace the right hand side of the operators with actual values from other data. Do you people think that can it be helpful for my case?

Thanks.

© Stack Overflow or respective owner

Related posts about lex

Related posts about jflex