vendredi 27 février 2015

multiple String literal in flex

I'm using flex to parse a whole buncha stuff, but I hit a roadbloack when I tried to detect two string literals on the same line.


heres what I mean:



"cats" < "dogs"


is being recognized as one long string



cats" < "dogs


Why is flex only considering the two most outer quotations, instead of making two separate sets? Im certain that the problem lies in my regex, so what I'm essentially asking is:


How do I write a regex that, in this scenario, would recognize the tokens STRING, LESS, STRING as opposed to just STRING?


Aucun commentaire:

Enregistrer un commentaire