summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-08 00:00:09 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-08 00:00:09 +1100
commit6f767eb4b27c4e15ca6c3be3b93ca187caf95bd9 (patch)
tree985ad6bb1ce2215e71fbac1281f99432eebf6c09 /src
parent809ccef242df42ab43ca0b05e48bf841f840be4b (diff)
Basic test framework and initial tests for Packrat.Util predicates
Diffstat (limited to 'src')
-rw-r--r--src/packrat-util.adb123
-rw-r--r--src/packrat-util.ads77
-rw-r--r--src/packrat.ads11
3 files changed, 211 insertions, 0 deletions
diff --git a/src/packrat-util.adb b/src/packrat-util.adb
new file mode 100644
index 0000000..6ee1d4a
--- /dev/null
+++ b/src/packrat-util.adb
@@ -0,0 +1,123 @@
+
+
+package body Packrat.Util is
+
+
+ function In_Set
+ (Element : in Character)
+ return Boolean is
+ begin
+ return False;
+ end In_Set;
+
+
+ function Not_In_Set
+ (Element : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Not_In_Set;
+
+
+
+
+
+ function Is_Digit
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Digit;
+
+
+ function Is_Hex
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Hex;
+
+
+ function Is_Letter
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Letter;
+
+
+ function Is_Alphanumeric
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Alphanumeric;
+
+
+ function Is_Punctuation
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Punctuation;
+
+
+ function Is_ASCII
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_ASCII;
+
+
+ function Is_Extended_ASCII
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Extended_ASCII;
+
+
+ function Is_Space
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Space;
+
+
+ function Is_Linespace
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Linespace;
+
+
+ function Is_End_Of_Line
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_End_Of_Line;
+
+
+ function Is_Whitespace
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Is_Whitespace;
+
+
+ function Not_Whitespace
+ (Char : in Character)
+ return Boolean is
+ begin
+ return False;
+ end Not_Whitespace;
+
+
+end Packrat.Util;
+
+
diff --git a/src/packrat-util.ads b/src/packrat-util.ads
new file mode 100644
index 0000000..ffc4d66
--- /dev/null
+++ b/src/packrat-util.ads
@@ -0,0 +1,77 @@
+
+
+with
+
+ Ada.Strings.Maps;
+
+
+package Packrat.Util is
+
+
+ generic
+ Set : in Ada.Strings.Maps.Character_Set;
+ function In_Set
+ (Element : in Character)
+ return Boolean;
+
+ generic
+ Set : in Ada.Strings.Maps.Character_Set;
+ function Not_In_Set
+ (Element : in Character)
+ return Boolean;
+
+ function Is_Digit
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Hex
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Letter
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Alphanumeric
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Punctuation
+ (Char : in Character)
+ return Boolean;
+
+ function Is_ASCII
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Extended_ASCII
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Space
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Linespace
+ (Char : in Character)
+ return Boolean;
+
+ function Is_End_Of_Line
+ (Char : in Character)
+ return Boolean;
+
+ function Is_Whitespace
+ (Char : in Character)
+ return Boolean;
+
+ function Not_Whitespace
+ (Char : in Character)
+ return Boolean;
+
+
+private
+
+
+end Packrat.Util;
+
+
diff --git a/src/packrat.ads b/src/packrat.ads
new file mode 100644
index 0000000..36410d5
--- /dev/null
+++ b/src/packrat.ads
@@ -0,0 +1,11 @@
+
+
+package Packrat is
+
+
+private
+
+
+end Packrat;
+
+