@top T { (One | Two | Id)+ } @skip { space } One { one Id } Two { two Id } @external specialize {Id} spec1 from "./something" { one, two } @tokens { Id { @asciiLetter+ } space { @whitespace+ } } # Produces specialized tokens one a two b three ==> T(One(Id), Two(Id), Id)