This is what lexical states are for. See the documentation and FAQ for more information. Roughly what you want is
<DEFAULT> SKIP: { < ~[] > } // Skip everything up to "/*@mat"
<DEFAULT> TOKEN: { < STARTMAT: "/*@mat" > : GO }
<GO> TOKEN: { <IN : "in" >
| <OUT : "out" >
| .... other rules go here ....
| <ENDMAT : "*/" > : DEFAULT // On a "*/" go back to skipping.
}