diff options
author | Jed Barber <jjbarber@y7mail.com> | 2021-01-23 02:38:49 +1100 |
---|---|---|
committer | Jed Barber <jjbarber@y7mail.com> | 2021-01-23 02:38:49 +1100 |
commit | c7195329c60123b2363ba13863f6951a21d0ff57 (patch) | |
tree | 35eb2388650888a4301f326812fa3e5554fff52b /doc/start_finish_ranges.html | |
parent | 0b0c4df3dc7b94c139c5305ea0991a34f0c43238 (diff) |
Implementation detail docs, some old notes removed
Diffstat (limited to 'doc/start_finish_ranges.html')
-rw-r--r-- | doc/start_finish_ranges.html | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/doc/start_finish_ranges.html b/doc/start_finish_ranges.html new file mode 100644 index 0000000..d69c60e --- /dev/null +++ b/doc/start_finish_ranges.html @@ -0,0 +1,37 @@ + +<!DOCTYPE html> + +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Start and Finish Ranges - Packrat Docs</title> + <link href="default.css" rel="stylesheet"> + </head> + + <body> + + + <h2>Start and Finish Ranges</h2> + + <a href="index.html">Return to Contents</a> + + + <p>When parsing input, the start position and finish position that + describe a parsed or lexed chunk are the index of the first item and + the last item of that chunk. This was done to match the idea with + how array slicing is done in Ada, but it has a few other implications.</p> + + <p>Empty chunks are described by a finish position that is less than + the start position. For consistency, this is always done as the finish + position being only one less than the start.</p> + + <p>This convention also differs from the convention used by Frost, Hafiz, + and Callaghan (2008). They used start positions corresponding to the first + item in a chunk, but finish positions corresponding to the first item after + the chunk had ended. Care should be taken to keep this in mind to avoid + off-by-one errors.</p> + + + </body> +</html> + |