> I need check use the follow Regexp in my grammar:
>
> ^( [^a]|a[^q]|aq[^u]|aqu[^i])+
>
> But when I use like:
>
> rule test
> [^( [^a]|a[^q]|aq[^u]|aqu[^i])+]
> end
>
> I got the errror: `ruby_source_from_string': Expected one of +, *,
> #, .., ?, / at line 20 etc.
The square brackets in treetop are used to introduce a character class (see http://www.regular-expressions.info/charclass.html).
It seems you are trying to fit a whole regular expression in there.
Try something along the lines of:
rule test
( [^a] "|a" [^q] "|aq" [^u] "|aqu" [^i] )+
end
(Note: Not tested)
Christian