In a sense, the second input to a parser is the grammar, with the specification of a set of symbols, including terminal symbols for tokenisation, and of a set of rules which define structures.