| Age | Commit message (Collapse) | Author |
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
|
|
Shotgun commit:
* Remove shim sources from Makefile.am
* Move new types to command.c / command.h
* Rewrite command.c / command.h
* Refactor shim types to real types in matcher
and parser
* Initial refactor pass on vty.c
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Options may now be nested in selectors as long
as they are not the first token in sequence.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Selectors may be nested inside options [<like|so>].
Removed the ability to make multipart options [like|so].
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Missed a copy, disambigs forgot to walkback
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Comparing the wrong nodes led to duplication during
graph construction, fixed. Also update graph pretty
print to use new graph struct.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Most things back to working, all CLI units refactored
to use improved graph implementation.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
And set END_GN default text to <cr>, and scrub
a coupld of extraneous files
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Selector and option heads had pointers to their
ends, but this turned out to be unnecessary
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Bad conditional refactor broke graph deduplication
and thus disambiguation precedence
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Fix occasional bug where deleting flex's input
buffer happens earlier than flex expects
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
- cmd_make_strvec returns null pointer if str
begins with a '#'
- disallow options nested options
- NULL out state variable in parser
- flip backwards comparison
- fix memory leak in lexer
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Gnu-style code, add copyright headers, cleanup some
random style issues, shuffle around code into
relevant units, add docs.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Lots of cleanup, code consolidation, organizational
improvements.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Makes ranges where both endpoints are negative
somewhat more readable. Also validate ranges.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
And convert range delimiters to signed int
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Also fix a bug where selector elements beginning
with the same word are only parsed once
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Variables now allow strings beginning with numbers
to match, ranges and numbers are now long long to
fix OOB parses resulting in integer wraparounds.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
When building argv for matched command, only the
last node was being copied to argv; the rest were
added by reference. Additionally the regex for
certain tokens was too restrictive and disallowed
characters allowed by the old parser; these have
been reinstated.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Various memory leaks have been fixed and the quagga
memory macros are in use. Also consolidated the argv
and matching code into one graph traversal.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Free as appropriate. Additionally add new type
of node to demark graph head (START_GN).
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Queries may be run against DFA's to find matching
cmd_element, and argument lists may be constructed.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Shotgun changes to matching system
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Introduce new node type, END_GN, and remove
is_leaf flags. Reorganize command_match.c & remove
internal functions from command_match.h. Start
rewriting command.h in command_new.h with changes
for new backend.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Input matching and completions works. Still some
rough edges.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Moved test hook out of command.c into vtysh.c,
renamed graph modules, added matching code
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Implement comparator for nodes, some miscellaneous cleanup.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Options get null paths, parser state is properly
cleaned up, caller passes start node
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|
|
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
|