summaryrefslogtreecommitdiff
path: root/doc/start_finish_ranges.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/start_finish_ranges.html')
-rw-r--r--doc/start_finish_ranges.html37
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>
+