From 1e67356ba64622e07877db1c65f823f0f58b1321 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 8 Jan 2019 10:51:02 +1100 Subject: Packrat.Util set predicates now work --- src/packrat-util.adb | 5 +++-- src/packrat-util.ads | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'src') 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; -- cgit