I have a rule that should find all characters between / and /:

regex : 
        '/' (r=~('/'))+ '/' 
        ; 

The problem is later in my grammar file  I have something that looks like:


fragment operator
        : o=('.pick'|'.length'|'.as'|'.head'|'.tail'|'.sort'
        |'.filter'|'.map'|'.uc'|'.lc' |'.split' | '.join' | '.query'
        | '.has' | '.union' | '.difference' | '.intersection' | '.unique' | 
'.once'
        | '.duplicates') '(' (e=expr  (',' e1=expr )*)? ')'     
        ;

When I parse a file that has this in it.

 prune = mdata.replace(/(?s)(.*v.directedBy..)(\w+\s+\w+)(<\/a.*)/,"$2");

I get mismatched character 'r' expecting 'f'.    This seems to be because I 
have '.difference'.   What I do not understand is why this that happening.  I 
would expect the ~('/') to say give me everything except "/" but it gets stuff 
on other tokens defined in the grammar.

Can someone shed some light on what I am doing wrong.  This is my first grammar 
with ANTLR and am confused.


------------------------------------------
Cid Dennis
ph : 303 915 9381
em: [email protected]





List: http://www.antlr.org/mailman/listinfo/antlr-interest
Unsubscribe: 
http://www.antlr.org/mailman/options/antlr-interest/your-email-address

-- 
You received this message because you are subscribed to the Google Groups 
"il-antlr-interest" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/il-antlr-interest?hl=en.

Reply via email to