From: drh Date: Fri, 28 Aug 2020 13:10:00 +0000 (+0000) Subject: Update Lemon documentation. Patches from sgbeal. X-Git-Tag: version-3.34.0~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b8524168eb50520ec5f4cc5cd709be06e210818;p=thirdparty%2Fsqlite.git Update Lemon documentation. Patches from sgbeal. FossilOrigin-Name: f5dc83442bf010bc4083e083b3a1acbb9918b7e685ca676dd899a0e09df196bc --- diff --git a/doc/lemon.html b/doc/lemon.html index 714cbfa5b2..b1f871481d 100644 --- a/doc/lemon.html +++ b/doc/lemon.html @@ -27,7 +27,7 @@ parser generator.

The language parser code created by Lemon is very robust and is well-suited for use in internet-facing applications that need to -safely process maliciously crafted inputs. +safely process maliciously crafted inputs.

The "lemon.exe" command-line tool itself works great when given a valid input grammar file and almost always gives helpful @@ -48,36 +48,36 @@ To summarize:

The main goal of Lemon is to translate a context free grammar (CFG) for a particular language into C code that implements a parser for that language. -The program has two inputs: +The program has two inputs:

-Typically, only the grammar specification is supplied by the programmer. +

Typically, only the grammar specification is supplied by the programmer. Lemon comes with a default parser template which works fine for most applications. But the user is free to substitute a different parser template if desired.

Depending on command-line options, Lemon will generate up to -three output files. +three output files.

-By default, all three of these output files are generated. +

By default, all three of these output files are generated. The header file is suppressed if the "-m" command-line option is used and the report file is omitted when "-q" is selected.

The grammar specification file uses a ".y" suffix, by convention. In the examples used in this document, we'll assume the name of the grammar file is "gram.y". A typical use of Lemon would be the -following command: +following command:

    lemon gram.y
 
-This command will generate three output files named "gram.c", +

This command will generate three output files named "gram.c", "gram.h" and "gram.out". The first is C code to implement the parser. The second is the header file that defines numerical values for all @@ -88,11 +88,11 @@ the states used by the parser automaton.

The behavior of Lemon can be modified using command-line options. You can obtain a list of the available command-line options together -with a brief explanation of what each does by typing +with a brief explanation of what each does by typing

    lemon "-?"
 
-As of this writing, the following command-line options are supported: +

As of this writing, the following command-line options are supported: