summaryrefslogtreecommitdiff
path: root/doc/errors.html
blob: e0f12c06cf99a20537f095cdd90d9e841e41418d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

<!DOCTYPE html>

<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>Handling Errors - Packrat Docs</title>
    <link href="default.css" rel="stylesheet">
  </head>

  <body>


  <h2>Handling Errors</h2>

  <a href="index.html">Return to Contents</a>


  <p>Whenever a <em>Lexer_Error</em> or <em>Parser_Error</em> is raised it is always accompanied
  with a string that contains encoded information about where in the input the error occurred.</p>

  <p>Such strings should not be examined directly, but if the <em>Decode</em> function from
  <em>Packrat.Errors</em> is used then an array of symbol/position pairs is obtained. Each of those
  pairs describes a point in the input where, if the given symbol was successfully found, a more
  successful parse would have resulted.</p>

  <p>Unfortunately at this time no resumption of lexing or parsing can be done once an error has
  occurred.</p>


  </body>
</html>