diff options
author | Jed Barber <jjbarber@y7mail.com> | 2020-12-05 22:19:01 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2020-12-05 22:19:01 +1100 |
commit | 63f9f901a3c2345411b201c86dceceb4807fb974 (patch) | |
tree | 2bbd0e9ef33599bb60bd38b3eb2804d288c9a0c2 | |
parent | 8e5afbe87e05ce78521a3dbcd0ba8dc71bbaffec (diff) |
Reduced generic instantiation size blowup
-rw-r--r-- | example/sentence.adb | 6 | ||||
-rw-r--r-- | src/packrat-text.ads | 37 |
2 files changed, 3 insertions, 40 deletions
diff --git a/example/sentence.adb b/example/sentence.adb index 5270d3a..cdae38d 100644 --- a/example/sentence.adb +++ b/example/sentence.adb @@ -3,7 +3,7 @@ with Ada.Text_IO, - Packrat.Text, + Packrat.Standard, Packrat.Utilities; use @@ -19,8 +19,8 @@ procedure Sentence is type Lexer_Labels is (Word, Whitespace); type Parser_Labels is (S, NP, PP, VP, Det, Noun, Verb, Prep); - package Text_Rat is new Packrat.Text (Lexer_Labels, Parser_Labels); - package My_Rat renames Text_Rat.Standard; + package My_Rat is new Packrat.Standard + (Lexer_Labels, Parser_Labels, Character, String); diff --git a/src/packrat-text.ads b/src/packrat-text.ads deleted file mode 100644 index c3a5c51..0000000 --- a/src/packrat-text.ads +++ /dev/null @@ -1,37 +0,0 @@ - - -with - - Packrat.Standard; - - -generic - - type Lexer_Labels is (<>); - type Parser_Labels is (<>); - -package Packrat.Text is - - - package Standard is new Packrat.Standard - (Lexer_Labels => Lexer_Labels, - Parser_Labels => Parser_Labels, - Element_Type => Character, - Element_Array => String); - - package Wide is new Packrat.Standard - (Lexer_Labels => Lexer_Labels, - Parser_Labels => Parser_Labels, - Element_Type => Wide_Character, - Element_Array => Wide_String); - - package Wide_Wide is new Packrat.Standard - (Lexer_Labels => Lexer_Labels, - Parser_Labels => Parser_Labels, - Element_Type => Wide_Wide_Character, - Element_Array => Wide_Wide_String); - - -end Packrat.Text; - - |