"True" Bol Processor grammars and parsing
BP grammars are transformational grammars allowing the production and
of strings representing musical sequences. The formalism of true grammars is
the one implemented in
(Bel 1990b:33-66) for the study of drum improvisation, plus "remote contexts"
grammar successfully compiled by BP2 is a
only if using
of the following features:
(§4.10) and associated features;
SUB and SUB1 (§4.14);
(flags) (Quickstart §11);
in rules (§8.1);
(§4.6) or weights controlled interactively (QuickStart §6);
compiling a grammar, BP2 checks whether or not it is a true BP grammar.
Nothing will happen at the time items are produced, but BP2 will refuse to
analyse (parse) items if the current grammar is not "true BP".
true BP gramma
may be used to perform a
on arbitrary strings in order to check whether or not it might have been
produced by the grammar. However, there are limitations for the validity of
this test. These limitations are discussed in great detail in (Kippen &
Bel 1992). (Also see Bel & Kippen 1992). Note for instance that the
rewrite symbol "-->" is improper in BP grammars and should be replaced with
"<-->" meaning that the rule is valid for both production and analysis.
and "<--" indicate that a rule is used exclusively in production or
analysis, respectively. Other restrictions of BP grammars deal with the order
of rules in each subgrammar. The parsing algorithm takes rules in the opposite
order of their occurrence in the subgrammar. Therefore, the last candidate
rule in each subgrammar is the one that will first be used repeatedly (until it
is no more candidate). As a consequence, its right argument should not be a
substring of the right argument of a rul
appearing higher in the subgrammar. (This is called the
patterns are recognised first.
first generate templates ("Action" menu) and then select an item or a set of
items in any text window. Select "Analyze" in the "Action" menu (or type
cmd-j). BP2 will parse all items and return the resulting strings, whenever
unsuccessful, in the "Trace" window.
parsing was unsuccessful it may be important to see at what stage of the
analysis an incorrect workstring was produced. Use "Step by step" and restart
the analysis on this particular item. The "Repeat computation" button is
inactive because parsing is deterministic.