Debian Codegraph @

debian/control

raw
1 Source: kelbt
2 Section: devel
3 Priority: optional
4 Maintainer: Debian QA Group <[email protected]>
5 Build-Depends: debhelper-compat (= 13),
6 Standards-Version: 4.7.0
7 Vcs-Browser: https://salsa.debian.org/debian/kelbt
8 Vcs-Git: https://salsa.debian.org/debian/kelbt.git
9 Rules-Requires-Root: no
10
11 Package: kelbt
12 Architecture: any
13 Depends: ${misc:Depends},
14 ${shlibs:Depends},
15 Description: backtracking LR parser generator
16 Kelbt generates backtracking LALR(1) parsers. Standard LALR(1) parser
17 generators emit an error upon encountering a conflict in the parse tables.
18 Kelbt forges onward, generating parsers which handle conflicts by backtracking
19 at runtime. Kelbt is able to generate a parser for any context-free grammar and
20 therefore implements a generalized parsing method.
21 .
22 Kelbt is different from other backtracking LR systems in two ways. First, it
23 elevates backtracking to the level of semantic actions by introducing a class
24 of actions called undo actions. Undo actions are invoked as the backtracker
25 undoes parsing and allow the user to revert any side effects of forward
26 semantic actions. This makes it possible to backtrack over language constructs
27 which must modify global state in preparation for handling context
28 dependencies.
29 .
30 Second, Kelbt enables a user-controlled parsing strategy which approximates
31 that of generalized recursive-descent parsing with ordered choice. This makes
32 it easy for the user to resolve language ambiguities by ordering the grammar
33 productions of a non-terminal according to precedence. It is approximate in the
34 sense that for most grammars the equivalent of an ordered choice parsing
35 strategy is achieved. In cases where productions are parsed out of the order
36 given, there is a simple grammar transformation which remedies the problem.
37 .
38 As a proof of concept, Kelbt has been used to write a partial C++ parser
39 (included) which is composed of strictly a scanner, a name lookup stage and a
40 grammar with standard semantic actions and semantic undo actions.