views:

15

answers:

1

How do you make a context free grammar that analyzes mostly literal text (spaces, characters, symbols, etc.) while also looking for expressions of the form ${...} or $someCommand{...}? Note if it finds "I got $10 today", it should not do anything special with it.

Is it possible?

A: 

Yes, it is possible.

Since this is definetely the right answer to your question, I sincerely believe you will accept it real soon. No?

TheBlastOne
Sure, I think I found my problem anyway. The default for this parser is to do words and not characters, so I was having trouble parsing strings like "dsa${..}", because if it found this string, $ wouldn't be recognized. Once I disabled the automatic whitespace parsing that came out of the box, and just did 1 character at a time, it works.
egervari
Cool story, this all. You ask (kind of, at least) a yes-no question, I reply "Yep", and you post the real solution as a comment to my "solution", yet still accept my answer. I really like that. Stackoverflow obviously is a good place. Thank you very much for sharing humor, competence and open communication with me/us all.
TheBlastOne