Dynamic allocation of input buffer

- Allocate buffer with strdup
- Update function prototypes
- Also allocate parser object dynamically