From 2912e22000bff5b83b77daeb2b5ed111c47268b8 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 8 Jan 2019 16:29:30 +1100 Subject: Packrat.Errors specification and tests --- packrat_parser_lib_notes.txt | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'packrat_parser_lib_notes.txt') diff --git a/packrat_parser_lib_notes.txt b/packrat_parser_lib_notes.txt index a09babf..8bcac69 100644 --- a/packrat_parser_lib_notes.txt +++ b/packrat_parser_lib_notes.txt @@ -220,18 +220,26 @@ Pretty_Print Packrat.Error (actually a nested package, as this functionality is important to parsers/lexers) - functions to handle and process exception messages - - exception messages take the form of one or more "sp" separated by a space + - exception messages take the form of one or more "sp" substrings joined together, + with each symbol name being in all capitals and each position being a positive integer - this message represents the list of expected symbols at particular positions that would have resulted in a more complete parse + - one of these messages will be raised with an exception of no valid parse is possible with a given input List of datatypes: -Error_Info (containing an enum of the symbol expected, and a natural of the position) +Error_Message +Error_Info (containing a string of the symbol name expected, and a natural of the position) +Error_Info_Array List of funcs: -Newcode +Valid_Message +Valid_Identifier +Valid_Identifier_Array +Join Encode +Encode_Array Decode -Join +(the message format ensures that using "&" to join messages will still result in a valid message) @@ -249,6 +257,9 @@ Run_Tests Ratnest.Tests List of funcs: +In_Set_Check +Not_In_Set_Check + Is_Digit_Check Is_Hex_Check Is_Letter_Check -- cgit