From 0abd0d9444164cbb85df0e5a50451b5f98fef3db Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Fri, 4 Dec 2020 15:28:52 +1100 Subject: Instantiation package improvements --- src/packrat-no_lex.ads | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 src/packrat-no_lex.ads (limited to 'src/packrat-no_lex.ads') diff --git a/src/packrat-no_lex.ads b/src/packrat-no_lex.ads new file mode 100644 index 0000000..bde416f --- /dev/null +++ b/src/packrat-no_lex.ads @@ -0,0 +1,41 @@ + + +with + + Packrat.Traits, + Packrat.Parse_Graphs, + Packrat.Parsers; + + +generic + + type Parser_Labels is (<>); + + type Element_Type is private; + type Element_Array is array (Positive range <>) of Element_Type; + + with function "<" (Left, Right : in Element_Type) return Boolean is <>; + +package Packrat.No_Lex is + + + package Parser_Traits is new Packrat.Traits + (Label_Enum => Parser_Labels, + Element_Type => Element_Type, + Element_Array => Element_Array); + + package Parse_Graphs is new Packrat.Parse_Graphs + (Traits => Parser_Traits); + + package Parsers is new Packrat.Parsers + (Traits => Parser_Traits, + Graphs => Parse_Graphs); + + package Parser_Tokens renames Parser_Traits.Tokens; + + subtype Parser_Result is Parse_Graphs.Parse_Graph; + + +end Packrat.No_Lex; + + -- cgit