|
librdesc
|
Boolean algebra grammar example for librdesc. More...
Go to the source code of this file.
Enumerations | |
| enum | balg_tk { TK_NOTOKEN , TK_TRUE , TK_FALSE , TK_IDENT , TK_PIPE , TK_AMP , TK_EXCL , TK_LPAREN , TK_RPAREN , TK_LCURLY , TK_RCURLY , TK_EQ , TK_COMMA , TK_SEMI } |
| terminal symbols (tokens) | |
| enum | balg_nt { NT_BIT , NT_IDENT , NT_CALL , NT_CALL_OPTPARAMS , NT_EXPR , NT_EXPR_REST , NT_TERM , NT_TERM_REST , NT_FACTOR , NT_ATOM , NT_STMT , NT_STMTS , NT_ASGN , NT_IDENT_LS , NT_IDENT_LS_REST , NT_EXPR_LS , NT_EXPR_LS_REST } |
| non-terminal Symbols | |
Variables | |
| const char | balg_tks [BALG_TK_COUNT] |
token character mapping (for exblex) | |
| const char *const | balg_tk_names [BALG_TK_COUNT] |
| names of tokens that used in BNF | |
| const char *const | balg_tk_names_escaped [BALG_TK_COUNT] |
| names of tokens that can be used in dotlang graph (special chars are escaped) | |
| const char *const | balg_nt_names [BALG_NT_COUNT] |
| non-terminal names (for debugging/printing CST) | |
Boolean algebra grammar example for librdesc.
This file defines a sample CFG for a simple Boolean Algebra language. It serves two main purposes:
bnf_dsl.h) to define grammars.Language features:
| const char* const balg_nt_names[BALG_NT_COUNT] |
non-terminal names (for debugging/printing CST)
| const char* const balg_tk_names[BALG_TK_COUNT] |
names of tokens that used in BNF
| const char* const balg_tk_names_escaped[BALG_TK_COUNT] |
names of tokens that can be used in dotlang graph (special chars are escaped)
| const char balg_tks[BALG_TK_COUNT] |
token character mapping (for exblex)