HI: I have the grammar: statements:(inputStatement|schemaStatement|filtersStatement|COMMENT)* EOF; As you see ,it will match as many inputStatements as there are in the input file. How can change the grammar to make sure there is only one inputStatment in the input file? Thanks.