- Define the minimal language, which accept only empty string and nothing else.
grammar.txt
contains no production rule butparsergen
still generates nontrivial code from it.%SHOW_UNDEFINED
is defined to demonstrate all possible places to insert user-defined code. For instance inParser.cpp
:// This file is fully generated by running parsergen v1.6.0 // with grammer definition file "grammar.txt" // %HEADERS_FOR_CPP undefined (expanded here otherwise) #include "Parser.h" #include "ParserIdDef.h" #include <bux/ImplLR1.h> #include <bux/XException.h> namespace { using namespace bux::LR1; // %LOCAL_CPP undefined (expanded here otherwise) ... } // namespace // %SCOPED_CPP_HEAD undefined (expanded here otherwise) ::C_Parser::C_Parser(): bux::LR1::C_Parser(g_policy) {} // %SCOPED_CPP_TAIL undefined (expanded here otherwise)
MinLang
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||