From da389927ddf9240bbba10b819eb782e80a5d6bf7 Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Tue, 19 Jan 2021 02:25:44 +1100 Subject: Basic HTML documentation added --- doc/quickstart.html | 65 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 doc/quickstart.html (limited to 'doc/quickstart.html') diff --git a/doc/quickstart.html b/doc/quickstart.html new file mode 100644 index 0000000..b525f8f --- /dev/null +++ b/doc/quickstart.html @@ -0,0 +1,65 @@ + + + + + + + Quickstart Guide - Packrat Docs + + + + + + +

Quickstart Guide

+ + Return to Contents + + +

Lexing and Parsing

+ +

The package that you will need is Packrat.Standard. If you are parsing + ordinary strings then Packrat.Utilities may also be useful.
+
+ Define enumeration types for all the lexer token labels and parse graph node labels + you need, then use them to instantiate Packrat.Standard.
+
+ Instantiate subprograms from the nested Lexers package to create your lexer, + and subprograms from the nested Parsers package to create your parser.
+
+ Take special care when using any redirects from Parsers. They are used to + allow for self-referential instantiation of parser combinators and must be set properly + before using any parsers built with them. Otherwise an exception will be raised.
+
+ Feed your input through the lexer, then the results of that through the parser to + obtain a parse graph.
+
+ Use subprograms from the nested Parse_Graphs package to inspect and manipulate + the resulting graph. +

+ + +

Parsing Only

+ +

The package that you will need is Packrat.No_Lex. If you are parsing + ordinary strings then Packrat.Utilities may also be useful.
+
+ Define an enumeration type for all the parse graph node labels you need, then use it + to instantiate Packrat.No_Lex.
+
+ Instantiate subprograms from the nested Parsers package to create your parser.
+
+ Take special care when using any redirects. They are used to allow for self-referential + instantiation of parser combinators and must be set properly before using any parsers + built with them. Otherwise an exception will be raised.
+
+ Feed your input through the parser to obtain a parse graph.
+
+ Use subprograms from the nested Parse_Graphs package to inspect and manipulate + the resulting graph. +

+ + + + + -- cgit