Hey everybody! This is my first try of using this mail list. ^_^_ So here is my problem: I have a file that looks something like this:
{if $whatever == "string"} Freeform text to display {if $whatever == "string"} and here as well {/if} {/if} Think of it as smarty syntax. I would like to get the freeform text in the block. I could match anything but that. My concept to create a rule (using bison) for that was: \}[^\{]*\{ This would match anything (maybe even newlines) from the end of the if statement to the next statement. Here is the entire lex file: "if" {return IF;} \/if {return IF_END;} "(" {return LBRA;} ")" {return RBRA;} "{" {return BLOO;} "}" {return BLOC;} \$[a-zA-Z]+ {return VAR;} == {return CMP;} "<" {return CMP;} ">" {return CMP;} "\""[^"]+"\"" {return STRING;} ";" {return ENDSTATEMENT;} \}[^\{]*\{ {return FREEFORM_TEXT;} How is it possible to make a rule or regex for the freeform text? Thanx in advance _______________________________________________ help-bison@gnu.org http://lists.gnu.org/mailman/listinfo/help-bison