From 67edc77677d366d4dc0ff42154c79a1d87c2dd29 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Thu, 10 Jan 2019 15:27:56 +1100 Subject: Packrat.Lexer.Combinators specification --- src/packrat-lexer.ads | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/packrat-lexer.ads (limited to 'src/packrat-lexer.ads') diff --git a/src/packrat-lexer.ads b/src/packrat-lexer.ads new file mode 100644 index 0000000..611a407 --- /dev/null +++ b/src/packrat-lexer.ads @@ -0,0 +1,30 @@ + + +generic + + type Label_Enum is (<>); + type Element is private; + type Element_Array is array (Positive range <>) of Element; + + with package Gen_Tokens is new Tokens (Label_Enum, Element, Element_Array); + +package Packrat.Lexer is + + + type Combinator is access function + (Input : in Element_Array; + Start : in Positive; + Length : out Natural; + Value : out Element_Array) + return Result; + + + type Combinator_Array is array (Positive range <>) of Combinator; + + +private + + +end Packrat.Lexer; + + -- cgit