summaryrefslogtreecommitdiff
path: root/lib/grammar_sandbox.c
AgeCommit message (Collapse)Author
2016-09-13lib: Move string completions out of command_match.cQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-09lib: Reorganize grammar sandboxQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-09lib: Add testing shim for graph deletionQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-08lib: Fix uninitialized pointer segfaultQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-08lib: Update grammar sandbox driverQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-09-07lib: Fix deduplication bug, reinstate graph printQuentin Young
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>
2016-09-07lib: Continue matching system refactorQuentin Young
Most things back to working, all CLI units refactored to use improved graph implementation. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-11lib: Refactor CLI interface function namesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-10lib: Add completion string convenience functionsQuentin Young
And set END_GN default text to <cr>, and scrub a coupld of extraneous files Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-09lib: Handle vararg in graph pretty-printQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-09lib: Fix various minor bugsQuentin Young
- 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>
2016-08-08lib: Code cleanup, formatting, & headersQuentin Young
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>
2016-08-05lib: Add docstring supportQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-04lib: Unrefactor to signed long long for rangesQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-03lib: Implement status variableQuentin Young
Matcher now keeps track of why it failed Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-01lib: Add partial completion supportQuentin Young
Completions now include nodes that the input partially matches as well as the children of nodes those that the input exactly matches. Also some minor cleanup and bugfixes. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-08-01lib: Fix OOB range parses, variable matchesQuentin Young
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>
2016-08-01lib: Add partial matching supportQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-29lib: Cleanup some memory issues in CLIQuentin Young
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>
2016-07-27lib: Improve argv constructionQuentin Young
Fixed a variety of failure cases and wrote a nice doc string. Reverted add_node doc string to correct explanation of procedure. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-27lib: Cleanup parser memory managementQuentin Young
Free as appropriate. Additionally add new type of node to demark graph head (START_GN). Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-27lib: Add matching and argv supportQuentin Young
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>
2016-07-22lib: Reorganize some matching stuffQuentin Young
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>
2016-07-21lib: Mostly complete matcherQuentin Young
Input matching and completions works. Still some rough edges. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-19lib: Break up functions, begin matcherQuentin Young
Moved test hook out of command.c into vtysh.c, renamed graph modules, added matching code Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-19lib: Implement node comparison functionQuentin Young
Implement comparator for nodes, some miscellaneous cleanup. Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-18lib: Fix some DFA construction bugsQuentin Young
Options get null paths, parser state is properly cleaned up, caller passes start node Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-17lib: Finish implementing grammar, DFA constructionQuentin Young
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2016-07-12Add grammar sandbox frameworkQuentin Young