summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2019-01-08 10:51:02 +1100
committerJed Barber <jjbarber@y7mail.com>2019-01-08 10:51:02 +1100
commit1e67356ba64622e07877db1c65f823f0f58b1321 (patch)
tree83d41773bbe4cba497ee2a26eb2450b10255396e /src
parent458d695b56779d707ae8689295f334b934d3e3f5 (diff)
Packrat.Util set predicates now work
Diffstat (limited to 'src')
-rw-r--r--src/packrat-util.adb5
-rw-r--r--src/packrat-util.ads3
2 files changed, 6 insertions, 2 deletions
diff --git a/src/packrat-util.adb b/src/packrat-util.adb
index dc9968b..c1335e0 100644
--- a/src/packrat-util.adb
+++ b/src/packrat-util.adb
@@ -9,6 +9,7 @@ package body Packrat.Util is
package Latin renames Ada.Characters.Latin_1;
+ package Strmaps renames Ada.Strings.Maps;
@@ -17,7 +18,7 @@ package body Packrat.Util is
(Element : in Character)
return Boolean is
begin
- return False;
+ return Strmaps.Is_In (Element, Set);
end In_Set;
@@ -25,7 +26,7 @@ package body Packrat.Util is
(Element : in Character)
return Boolean is
begin
- return False;
+ return not Strmaps.Is_In (Element, Set);
end Not_In_Set;
diff --git a/src/packrat-util.ads b/src/packrat-util.ads
index ffc4d66..cada441 100644
--- a/src/packrat-util.ads
+++ b/src/packrat-util.ads
@@ -20,6 +20,9 @@ package Packrat.Util is
(Element : in Character)
return Boolean;
+
+
+
function Is_Digit
(Char : in Character)
return Boolean;