summaryrefslogtreecommitdiff
path: root/src/packrat.adb
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2020-11-28 14:24:02 +1100
committerJed Barber <jjbarber@y7mail.com>2020-11-28 14:24:02 +1100
commit6c296b5615699eac0fb569b5cfe29e96986904a5 (patch)
tree757659eb8504e0f85012dc652f5ea697aa35f7e8 /src/packrat.adb
parentb2bcd79d78276289fab3406280c787277476b357 (diff)
Skeleton of Packrat.Parsers
Diffstat (limited to 'src/packrat.adb')
-rw-r--r--src/packrat.adb28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/packrat.adb b/src/packrat.adb
new file mode 100644
index 0000000..8c1c463
--- /dev/null
+++ b/src/packrat.adb
@@ -0,0 +1,28 @@
+
+
+package body Packrat is
+
+
+ function Array_Less_Than
+ (Left, Right : in Array_Type)
+ return Boolean
+ is
+ Left_Index : Positive := Left'First;
+ Right_Index : Positive := Right'First;
+ begin
+ while Left_Index <= Left'Last and Right_Index <= Right'Last loop
+ if Left (Left_Index) < Right (Right_Index) then
+ return True;
+ elsif Left (Left_Index) /= Right (Right_Index) then
+ return False;
+ end if;
+ Left_Index := Left_Index + 1;
+ Right_Index := Right_Index + 1;
+ end loop;
+ return Left'Length < Right'Length;
+ end Array_Less_Than;
+
+
+end Packrat;
+
+