Parsing systems for regular and context-free languages