From ada2593ebd6037cb78ce1ba795f283105d5cff26 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 26 Jan 2019 10:50:36 +1100 Subject: Interfaces for Cursors and Graphs added --- packrat_parser_lib_notes.txt | 64 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) (limited to 'packrat_parser_lib_notes.txt') diff --git a/packrat_parser_lib_notes.txt b/packrat_parser_lib_notes.txt index 1ae9707..333b999 100644 --- a/packrat_parser_lib_notes.txt +++ b/packrat_parser_lib_notes.txt @@ -9,7 +9,8 @@ Packrat.Lexer (generic over stamp enum, input item type, array of input items, a Packrat.Lexer.Combinators (merged into Packrat.Lexer) Packrat.Util Packrat.Errors (nested) -Packrat.Graphs (nested, generic over leaf array type) +Packrat.Interfaces (nested) +Packrat.Graphs (generic over leaf array type) Packrat.Tokens (nested, generic over contained array) Packrat.Text Packrat.Text.Std (nested, generic over parser/lexer label enums) @@ -308,14 +309,75 @@ Finish +Packrat.Interfaces + - nested package, defines interfaces and types that should be used to derive an abstract syntax graph + - some of these may be removed from Interfaces and just implemented in Graphs depending on what actually + ends up being necessary for parsing + +List of interfaces: +Cursor + - Is_Nothing + - Depth + - Is_Root + - Is_Branch + - Is_Leaf + - Label + - Elements + - Start + - Finish + - Choices + - Parent + - Child_Count + - All_Child_Count + - First_Child + - Last_Child + - Next_Sibling + - Prev_Sibling + - Delete_Children + - Delete_All_Children + - Equal_Subgraph + - Subgraph_Node_Count + - Find_In_Subgraph + +Directed_Acyclic_Graph + - Contains + - Leaf + - Branch + - Is_Empty + - Is_Ambiguous + - Node_Count + - Root_Count + - Root + - Append + - Prepend + - Attach_Choice + - Clear + - Delete_Position + - Find + + + + Packrat.Graphs + - builds on the interfaces in Packrat.Interfaces + - can be replaced with a user-supplied type, assuming proper care is taken to avoid exponential issues List_of_datatypes: +Graph_Cursor + - (implements all of Interfaces.Cursor) Parse_Graph + - (implements all of Interfaces.Directed_Acyclic_Graph) List of funcs: Debug_String +Iterate +Reverse_Iterate +Iterate_Choice +Reverse_Iterate_Choice +Iterate_SUbtree +Iterate_Subtree_Choice + -- cgit