First aproximation to manual and JavaCC implementations.