simpliest c++ example

This commit is contained in:
bronku 2025-11-20 16:35:10 +01:00
parent d587646b32
commit 909a43114b
9 changed files with 73 additions and 221 deletions

View file

@ -1,30 +0,0 @@
# Parser
## Explanation of options:
```cpp
// Bison version
%require "3.0.4"
// skeleton program to be used as parser
%skeleton "lalr1.cc"
// tells bison to generate a header file
%defines
// where the parser will live (in what namespace)
%define api.prefix {yy}
// the name of parser class
%define api.parser.class {Parser}
/* it will generate a location class which can be used in your lexer */
%locations
/* use the constructor for each token, and make_TOKENNAME functions will be generated */
%define api.token.constructor
/* use the variant type for $1~$n and $$ those variables */
%define api.value.type variant
%define parse.trace
%define parse.error verbose
```