package: bump copyrights to 2021
[bison.git] / examples / c / bistromathic / README.md
blobcab5b31b31709753a1d36be0655230a23a1c67fa
1 # bistromathic - all the bells and whistles
2 This example demonstrates best practices when using Bison.
3 - Its hand-written scanner tracks locations.
4 - Its interface is pure.
5 - It uses %params to pass user information to the parser and scanner.
6 - Its scanner uses the `error` token to signal lexical errors and enter
7   error recovery.
8 - Its interface is "incremental", well suited for interaction: it uses the
9   push-parser API to feed the parser with the incoming tokens.
10 - It features an interactive command line with completion based on the
11   parser state, based on `yyexpected_tokens`.
12 - It uses Bison's standard catalogue for internationalization of generated
13   messages.
14 - It uses a custom syntax error with location, lookahead correction and
15   token internationalization.
16 - Error messages quote the source with squiggles that underline the error:
17 ```
18 > 123 456
19 1.5-7: syntax error: expected end of file or + or - or * or / or ^ before number
20     1 | 123 456
21       |     ^~~
22 ```
23 - It supports debug traces with semantic values.
24 - It uses named references instead of the traditional $1, $2, etc.
26 To customize the interaction with bistromathic, see the GNU Readline user
27 manual (see `info rluserman`).
29 <!---
30 Local Variables:
31 fill-column: 76
32 ispell-dictionary: "american"
33 End:
35 Copyright (C) 2020-2021 Free Software Foundation, Inc.
37 This file is part of Bison, the GNU Compiler Compiler.
39 Permission is granted to copy, distribute and/or modify this document
40 under the terms of the GNU Free Documentation License, Version 1.3 or
41 any later version published by the Free Software Foundation; with no
42 Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
43 Texts.  A copy of the license is included in the "GNU Free
44 Documentation License" file as part of this distribution.
46 LocalWords:  bistromathic yyexpected lookahead ispell american
47 LocalWords:  MERCHANTABILITY
49 --->