First version of the API to define a grammar