From a47ad4cf26ede140e0b5d7997200c8e2dbccf27c Mon Sep 17 00:00:00 2001 From: Trevor Daniels Date: Mon, 17 Aug 2009 09:47:02 +0100 Subject: [PATCH] Docs: NR Notation appendices: extend parser --- .../notation/notation-appendices.itely | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/Documentation/notation/notation-appendices.itely b/Documentation/notation/notation-appendices.itely index aa24bdfeaa..631129396d 100644 --- a/Documentation/notation/notation-appendices.itely +++ b/Documentation/notation/notation-appendices.itely @@ -1011,6 +1011,7 @@ Internals Reference: @unnumberedsubsec lexer @cindex lexer +@cindex Flex A @strong{lexer} is a program which converts a sequence of characters into a sequence of tokens, a process called lexical @@ -1038,10 +1039,26 @@ created for midi, layout and paper blocks. @unnumberedsubsec parser @cindex parser +@cindex Bison +@cindex grammar for LilyPond +@cindex BNF + +A @strong{parser} analyzes the sequence of tokens produced by a +lexer to determine its grammatical structure, grouping the tokens +progressively into larger groupings according to the rules of the +grammar. If the sequence of tokens is valid the end product is a +tree of tokens whose root is the grammar's start symbol. If this +cannot be achieved the file is invalid and an appropriate error +message is produced. The LilyPond parser is built with Bison to +apply the grammar defined in @file{lily/parser.yy} and shown in +Backus Normal Form (BNF) in @ref{LilyPond grammar}. This grammar +specifies the syntactic groupings and the rules for constructing +them from their parts. -A @strong{parser} analyzes the sequence of tokens produced by -a lexer to determine its grammatical structure as defined by the -rules governing the format of an input file. +@seealso + +Installed Files: +@file{lily/parser.yy} @node parser variable @unnumberedsubsec parser variable -- 2.39.5