Search Results

Search found 1 results on 1 pages for 'user1293945'.

Page 1/1 | 1 

  • antlr: How to rewrite only specific

    - by user1293945
    I am sure antlr can solve my problem, but can't figure out how to implement it, even high level. I rapidly got caught into syntax problems of antlr itself. My grammar is quite simple and made of following tokens and rules. Don't really need to go in their details here. The evaluator resolves to expressions, which finally resolve to IDENT: evaluator : expression EOF! ; ... ... term : PARTICIPANT_TYPE(IDENT | '('! expression ')'! | max | min | if_ | NUMBER)+ ; Now, I would like to analyse and rewrite the 'term', so that IDENT tokens (and them only) get re-written with the PARTICIPANT_TYPE. All the others should simply remain the same.

    Read the article

1