Skip to content

Replacing pyparsing with shlex #37

@tleonhardt

Description

@tleonhardt

Python's built-in "shlex" module for simple lexical analysis is probably good enough to handle our command-line parsing in cmd2 and it is implemented in C, so its performance would probably be a lot better than pyparsing, which is implemented in pure Python.

ANTLR and PLY also look like potentially superior alternatives to pyparsing, which is slow, dated, and at least in our case requires an overly-complicated grammar.

But shlex should be preferred since it is built-in to Python and not 3rd-party.

shlex:
https://docs.python.org/3.6/library/shlex.html

pyparsing:
http://pyparsing.wikispaces.com

ANTLR:
https://github.com/antlr/antlr4

PLY:
https://github.com/dabeaz/ply

This is a long-term "down the road" idea.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions