diff -Nru bisonc++-4.11.00/bisonc++.cc bisonc++-4.13.01/bisonc++.cc --- bisonc++-4.11.00/bisonc++.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/bisonc++.cc 2015-12-13 16:26:55.000000000 +0000 @@ -54,6 +54,8 @@ Arg::LongOption("no-parse-member"), // options only {"no-decoration", 'D'}, + {"no-default-action-return", 'N'}, + {"own-debug", Arg::None}, {"own-tokens", 'T'}, {"parsefun-skeleton", 'P'}, @@ -88,7 +90,7 @@ int main(int argc, char **argv) try { - Arg &arg = Arg::initialize("AB:b:C:c:Df:H:hI:i:M:m:n:p:P:s:S:tTVv", + Arg &arg = Arg::initialize("AB:b:C:c:Df:H:hI:i:M:m:n:Np:P:s:S:tTVv", longOptions, longEnd, argc, argv); arg.versionHelp(usage, version, 1); diff -Nru bisonc++-4.11.00/bisonc++.xref bisonc++-4.13.01/bisonc++.xref --- bisonc++-4.11.00/bisonc++.xref 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/bisonc++.xref 2015-12-13 16:26:55.000000000 +0000 @@ -1,16 +1,10 @@ oxref by Frank B. Brokken (f.b.brokken@rug.nl) -oxref V1.00.02 2012-2015 +oxref V1.00.03 2012-2015 -CREATED Sun, 17 May 2015 14:57:34 +0000 +CREATED Sun, 13 Dec 2015 15:34:33 +0000 CROSS REFERENCE FOR: -fxs tmp/libmodules.a ---------------------------------------------------------------------- -accept(Options::PathType, char const*) - Full name: Options::accept(Options::PathType, char const*) - Source: accept.cc - Used By: - assign.cc: Options::assign(std::string*, Options::PathType, char const*) - actionCases(std::ostream&) const Full name: Generator::actionCases(std::ostream&) const Source: actioncases.cc @@ -26,8 +20,8 @@ handleproductionelements.cc: Parser::handleProductionElements(Meta__::SType&, Meta__::SType const&) nestedblock.cc: Parser::nestedBlock(Block&) -addIncludeQuotes(std::string&) - Full name: Options::addIncludeQuotes(std::string&) +addIncludeQuotes(std::__cxx11::basic_string, std::allocator >&) + Full name: Options::addIncludeQuotes(std::__cxx11::basic_string, std::allocator >&) Source: addincludequotes.cc Used By: setquotedstrings.cc: Options::setQuotedStrings() @@ -45,8 +39,8 @@ Used By: notreducible.cc: State::notReducible(unsigned int) -addPolymorphic(std::string const&, std::string const&) - Full name: Parser::addPolymorphic(std::string const&, std::string const&) +addPolymorphic(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + Full name: Parser::addPolymorphic(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) Source: addpolymorphic.cc Used By: parse.cc: Parser::executeAction(int) @@ -56,7 +50,7 @@ Source: addproduction.cc Used By: augmentgrammar.cc: Rules::augmentGrammar(Symbol*) - openrule.cc: Parser::openRule(std::string const&) + openrule.cc: Parser::openRule(std::__cxx11::basic_string, std::allocator > const&) parse.cc: Parser::executeAction(int) addProductions(Symbol const*, unsigned int) @@ -77,32 +71,26 @@ Used By: notreducible.cc: State::notReducible(unsigned int) -assign(std::string*, Options::PathType, char const*) - Full name: Options::assign(std::string*, Options::PathType, char const*) +assign(std::__cxx11::basic_string, std::allocator >*, Options::PathType, char const*) + Full name: Options::assign(std::__cxx11::basic_string, std::allocator >*, Options::PathType, char const*) Source: assign.cc Used By: parse.cc: Parser::executeAction(int) -atClassname() const - Full name: Generator::atClassname() const - Source: atclassname.cc - Used By: - data.cc: GLOBALS data.cc 28data.o - -AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, int, bool) - Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, int, bool) +AtDollar(AtDollar::Type, unsigned int, unsigned int, std::__cxx11::basic_string, std::allocator > const&, int, bool) + Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::__cxx11::basic_string, std::allocator > const&, int, bool) Source: atdollar1.cc Used By: - atindex.cc: Block::atIndex(unsigned int, std::string const&) - dollar.cc: Block::dollar(unsigned int, std::string const&, bool) - dollarindex.cc: Block::dollarIndex(unsigned int, std::string const&, bool) + atindex.cc: Block::atIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + dollar.cc: Block::dollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) + dollarindex.cc: Block::dollarIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) -AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, std::string const&, int) - Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::string const&, std::string const&, int) +AtDollar(AtDollar::Type, unsigned int, unsigned int, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, int) + Full name: AtDollar::AtDollar(AtDollar::Type, unsigned int, unsigned int, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, int) Source: atdollar2.cc Used By: - iddollar.cc: Block::IDdollar(unsigned int, std::string const&) - idindex.cc: Block::IDindex(unsigned int, std::string const&) + iddollar.cc: Block::IDdollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + idindex.cc: Block::IDindex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) atElse(bool&) const Full name: Generator::atElse(bool&) const @@ -116,36 +104,12 @@ Used By: data.cc: GLOBALS data.cc 28data.o -atIndex(unsigned int, std::string const&) - Full name: Block::atIndex(unsigned int, std::string const&) +atIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + Full name: Block::atIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) Source: atindex.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) -atLtype() const - Full name: Generator::atLtype() const - Source: atltype.cc - Used By: - data.cc: GLOBALS data.cc 28data.o - -atMatchedTextFunction() const - Full name: Generator::atMatchedTextFunction() const - Source: atmatchedtextfunction.cc - Used By: - data.cc: GLOBALS data.cc 28data.o - -atNameSpacedClassname() const - Full name: Generator::atNameSpacedClassname() const - Source: atnamespacedclassname.cc - Used By: - data.cc: GLOBALS data.cc 28data.o - -atTokenFunction() const - Full name: Generator::atTokenFunction() const - Source: attokenfunction.cc - Used By: - data.cc: GLOBALS data.cc 28data.o - augmentGrammar(Symbol*) Full name: Rules::augmentGrammar(Symbol*) Source: augmentgrammar.cc @@ -158,12 +122,6 @@ Used By: data.cc: GLOBALS data.cc 28data.o -baseclassHeaderName() const - Full name: Options::baseclassHeaderName() const - Source: baseclassheadername.cc - Used By: - conflicts.cc: Generator::conflicts() const - becomesDerivable(Production const*) Full name: Grammar::becomesDerivable(Production const*) Source: becomesderivable.cc @@ -176,8 +134,8 @@ Used By: distributelasetof.cc: State::distributeLAsetOf(StateItem&) -bolAt(std::ostream&, std::string&, std::istream&, bool&) const - Full name: Generator::bolAt(std::ostream&, std::string&, std::istream&, bool&) const +bolAt(std::ostream&, std::__cxx11::basic_string, std::allocator >&, std::istream&, bool&) const + Full name: Generator::bolAt(std::ostream&, std::__cxx11::basic_string, std::allocator >&, std::istream&, bool&) const Source: bolat.cc Used By: insert2.cc: Generator::insert(std::ostream&, unsigned int, char const*) const @@ -188,14 +146,6 @@ Used By: nextstate.cc: State::nextState(Next&) -canonicalQuote() - Full name: Scanner::canonicalQuote() - Source: canonicalquote.cc - Used By: - parse.cc: Parser::executeAction(int) - setprecedence.cc: Parser::setPrecedence(int) - useterminal.cc: Parser::useTerminal() - checkConflicts() Full name: State::checkConflicts() Source: checkconflicts.cc @@ -247,8 +197,8 @@ Used By: data.cc: GLOBALS data.cc 28data.o -cleanDir(std::string&, bool) - Full name: Options::cleanDir(std::string&, bool) +cleanDir(std::__cxx11::basic_string, std::allocator >&, bool) + Full name: Options::cleanDir(std::__cxx11::basic_string, std::allocator >&, bool) Source: cleandir.cc Used By: setbasicstrings.cc: Options::setBasicStrings() @@ -258,7 +208,7 @@ Source: clear.cc Used By: expectrules.cc: Parser::expectRules() - open.cc: Block::open(unsigned int, std::string const&) + open.cc: Block::open(unsigned int, std::__cxx11::basic_string, std::allocator > const&) close() Full name: Block::close() @@ -297,6 +247,116 @@ Used By: haskernel.cc: State::hasKernel(std::vector > const&) const +cxx11] + Full name: ScannerBase::s_out__[abi:cxx11] + Source: lex.cc + Used By: + checkendofrawstring.cc: Scanner::checkEndOfRawString() + eoln.cc: Scanner::eoln() + handlerawstring.cc: Scanner::rawString() + handlexstring.cc: Scanner::handleXstring(unsigned int) + returnquoted.cc: Scanner::returnQuoted(void (Scanner::*)()) + returntypespec.cc: Scanner::returnTypeSpec() + parse.cc: Parser::executeAction(int) + +cxx11] + Full name: Parser::s_hiddenName[abi:cxx11] + Source: data.cc + Used By: + nexthiddenname.cc: Parser::nextHiddenName[abi:cxx11]() + +cxx11] + Full name: Production::s_fileName[abi:cxx11] + Source: data.cc + Used By: + showconflicts.cc: RRConflict::showConflicts(Rules const&) const + showconflicts.cc: SRConflict::showConflicts(Rules const&) const + production1.cc: Production::Production(Symbol const*, unsigned int) + storeFilename.cc: Production::storeFilename(std::__cxx11::basic_string, std::allocator > const&) + +cxx11] + Full name: Generator::s_insert[abi:cxx11] + Source: data.cc + Used By: + insert.cc: Generator::insert(std::ostream&) const + +cxx11]() + Full name: Scanner::canonicalQuote[abi:cxx11]() + Source: canonicalquote.cc + Used By: + parse.cc: Parser::executeAction(int) + setprecedence.cc: Parser::setPrecedence(int) + useterminal.cc: Parser::useTerminal() + +cxx11]() + Full name: Parser::nextHiddenName[abi:cxx11]() + Source: nexthiddenname.cc + Used By: + nestedblock.cc: Parser::nestedBlock(Block&) + +cxx11]() const + Full name: Options::baseclassHeaderName[abi:cxx11]() const + Source: baseclassheadername.cc + Used By: + conflicts.cc: Generator::conflicts() const + +cxx11]() const + Full name: Generator::atTokenFunction[abi:cxx11]() const + Source: attokenfunction.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +cxx11]() const + Full name: Generator::atNameSpacedClassname[abi:cxx11]() const + Source: atnamespacedclassname.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +cxx11]() const + Full name: Generator::atClassname[abi:cxx11]() const + Source: atclassname.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +cxx11]() const + Full name: Generator::atMatchedTextFunction[abi:cxx11]() const + Source: atmatchedtextfunction.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +cxx11]() const + Full name: Generator::atLtype[abi:cxx11]() const + Source: atltype.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +cxx11](AtDollar const&) const + Full name: Parser::returnPolymorphic[abi:cxx11](AtDollar const&) const + Source: returnpolymorphic.cc + Used By: + handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int) + +cxx11](AtDollar const&) const + Full name: Parser::returnUnion[abi:cxx11](AtDollar const&) const + Source: returnunion.cc + Used By: + handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int) + +cxx11](Options::PathType, char const*) + Full name: Options::accept[abi:cxx11](Options::PathType, char const*) + Source: accept.cc + Used By: + assign.cc: Options::assign(std::__cxx11::basic_string, std::allocator >*, Options::PathType, char const*) + +cxx11](unsigned int) const + Full name: Rules::sType[abi:cxx11](unsigned int) const + Source: stype.cc + Used By: + checkfirsttype.cc: Parser::checkFirstType() + returnpolymorphic.cc: Parser::returnPolymorphic[abi:cxx11](AtDollar const&) const + returnunion.cc: Parser::returnUnion[abi:cxx11](AtDollar const&) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const + debug(std::ostream&) const Full name: Generator::debug(std::ostream&) const Source: debug.cc @@ -333,21 +393,27 @@ Used By: data.cc: GLOBALS data.cc 28data.o -defineNonTerminal(std::string const&, std::string const&) - Full name: Parser::defineNonTerminal(std::string const&, std::string const&) +defaultActionReturn(std::ostream&) const + Full name: Generator::defaultActionReturn(std::ostream&) const + Source: defaultactionreturn.cc + Used By: + data.cc: GLOBALS data.cc 28data.o + +defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + Full name: Parser::defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) Source: definenonterminal.cc Used By: nestedblock.cc: Parser::nestedBlock(Block&) -defineTerminal(std::string const&, Symbol::Type) - Full name: Parser::defineTerminal(std::string const&, Symbol::Type) +defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + Full name: Parser::defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) Source: defineterminal.cc Used By: - definetokenname.cc: Parser::defineTokenName(std::string const&, bool) + definetokenname.cc: Parser::defineTokenName(std::__cxx11::basic_string, std::allocator > const&, bool) parse.cc: Parser::executeAction(int) -defineTokenName(std::string const&, bool) - Full name: Parser::defineTokenName(std::string const&, bool) +defineTokenName(std::__cxx11::basic_string, std::allocator > const&, bool) + Full name: Parser::defineTokenName(std::__cxx11::basic_string, std::allocator > const&, bool) Source: definetokenname.cc Used By: parse.cc: Parser::executeAction(int) @@ -383,14 +449,14 @@ Used By: computelasets.cc: State::computeLAsets() -dollar(unsigned int, std::string const&, bool) - Full name: Block::dollar(unsigned int, std::string const&, bool) +dollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) + Full name: Block::dollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) Source: dollar.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) -dollarIndex(unsigned int, std::string const&, bool) - Full name: Block::dollarIndex(unsigned int, std::string const&, bool) +dollarIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) + Full name: Block::dollarIndex(unsigned int, std::__cxx11::basic_string, std::allocator > const&, bool) Source: dollarindex.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) @@ -408,8 +474,8 @@ Used By: lex.cc: Scanner::executeAction__(unsigned int) -errExisting(std::string const&, std::string const&, std::string const&) const - Full name: Generator::errExisting(std::string const&, std::string const&, std::string const&) const +errExisting(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const + Full name: Generator::errExisting(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const Source: errexisting.cc Used By: conflicts.cc: Generator::conflicts() const @@ -421,11 +487,11 @@ handleatsign.cc: Parser::handleAtSign(Block&, AtDollar const&, int) handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int) -errNoSemantic(char const*, AtDollar const&, std::string const&) const - Full name: Parser::errNoSemantic(char const*, AtDollar const&, std::string const&) const +errNoSemantic(char const*, AtDollar const&, std::__cxx11::basic_string, std::allocator > const&) const + Full name: Parser::errNoSemantic(char const*, AtDollar const&, std::__cxx11::basic_string, std::allocator > const&) const Source: errnosemantic.cc Used By: - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const error(char const*) Full name: Parser::error(char const*) @@ -451,8 +517,8 @@ Used By: parse.cc: Parser::executeAction(int) -filename(std::string const&) - Full name: Generator::filename(std::string const&) +filename(std::__cxx11::basic_string, std::allocator > const&) + Full name: Generator::filename(std::__cxx11::basic_string, std::allocator > const&) Source: filename.cc Used By: baseclass.cc: Generator::baseClass(std::ostream&) const @@ -486,14 +552,14 @@ Full name: FirstSet::FirstSet(Element const*) Source: firstset1.cc Used By: - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) - terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) + terminal2.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) -grep(std::string const&, std::string const&) const - Full name: Generator::grep(std::string const&, std::string const&) const +grep(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const + Full name: Generator::grep(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const Source: grep.cc Used By: - errexisting.cc: Generator::errExisting(std::string const&, std::string const&, std::string const&) const + errexisting.cc: Generator::errExisting(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) const handleAtSign(Block&, AtDollar const&, int) Full name: Parser::handleAtSign(Block&, AtDollar const&, int) @@ -543,14 +609,14 @@ Used By: lex.cc: Scanner::executeAction__(unsigned int) -IDdollar(unsigned int, std::string const&) - Full name: Block::IDdollar(unsigned int, std::string const&) +IDdollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + Full name: Block::IDdollar(unsigned int, std::__cxx11::basic_string, std::allocator > const&) Source: iddollar.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) -IDindex(unsigned int, std::string const&) - Full name: Block::IDindex(unsigned int, std::string const&) +IDindex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + Full name: Block::IDindex(unsigned int, std::__cxx11::basic_string, std::allocator > const&) Source: idindex.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) @@ -598,15 +664,16 @@ Source: insert2.cc Used By: augmentgrammar.cc: Rules::augmentGrammar(Symbol*) - definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&) - requirenonterminal.cc: Parser::requireNonTerminal(std::string const&) + definenonterminal.cc: Parser::defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + requirenonterminal.cc: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) usesymbol.cc: Parser::useSymbol() insert(std::ostream&) const - Full name: NonTerminal::insert(std::ostream&) const - Source: v.cc + Full name: SRConflict::insert(std::ostream&) const + Source: insert.cc Used By: - destructor.cc: NonTerminal::~NonTerminal() + insertext.cc: State::insertExt(std::ostream&) const + insertstd.cc: State::insertStd(std::ostream&) const insert(std::ostream&) const Full name: LookaheadSet::insert(std::ostream&) const @@ -615,10 +682,11 @@ operatorinsert.cc: operator<<(std::ostream&, LookaheadSet const&) insert(std::ostream&) const - Full name: Generator::insert(std::ostream&) const - Source: insert.cc + Full name: FirstSet::insert(std::ostream&) const + Source: oinsert.cc Used By: - filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const + showfirst.cc: GLOBALS showfirst.cc 12showfirst.o + insertext.cc: GLOBALS insertext.cc 25insertext.o insert(std::ostream&) const Full name: RRConflict::insert(std::ostream&) const @@ -628,18 +696,16 @@ insertstd.cc: State::insertStd(std::ostream&) const insert(std::ostream&) const - Full name: SRConflict::insert(std::ostream&) const + Full name: Generator::insert(std::ostream&) const Source: insert.cc Used By: - insertext.cc: State::insertExt(std::ostream&) const - insertstd.cc: State::insertStd(std::ostream&) const + filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const insert(std::ostream&) const - Full name: FirstSet::insert(std::ostream&) const - Source: oinsert.cc + Full name: NonTerminal::insert(std::ostream&) const + Source: v.cc Used By: - showfirst.cc: GLOBALS showfirst.cc 12showfirst.o - insertext.cc: GLOBALS insertext.cc 25insertext.o + destructor.cc: NonTerminal::~NonTerminal() insert(std::ostream&, Production const*) const Full name: Item::insert(std::ostream&, Production const*) const @@ -668,11 +734,11 @@ Used By: tokens.cc: Generator::tokens(std::ostream&) const -insert(Terminal*, std::string const&) - Full name: Rules::insert(Terminal*, std::string const&) +insert(Terminal*, std::__cxx11::basic_string, std::allocator > const&) + Full name: Rules::insert(Terminal*, std::__cxx11::basic_string, std::allocator > const&) Source: insert1.cc Used By: - defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type) + defineterminal.cc: Parser::defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) predefine.cc: Parser::predefine(Terminal const*) useterminal.cc: Parser::useTerminal() @@ -709,13 +775,13 @@ insertext.cc: GLOBALS insertext.cc 25insertext.o inspect() - Full name: SRConflict::inspect() + Full name: RRConflict::inspect() Source: inspect.cc Used By: checkconflicts.cc: State::checkConflicts() inspect() - Full name: RRConflict::inspect() + Full name: SRConflict::inspect() Source: inspect.cc Used By: checkconflicts.cc: State::checkConflicts() @@ -736,7 +802,7 @@ Full name: Options::instance() Source: instance.cc Used By: - generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&) + generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::hash, std::allocator > >, std::equal_to, std::allocator > >, std::allocator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > > const&) parser1.cc: Parser::Parser(Rules&) intersection(LookaheadSet const&) const @@ -757,7 +823,7 @@ Used By: setpolymorphicdecl.cc: Options::setPolymorphicDecl() setstype.cc: Options::setStype() - setuniondecl.cc: Options::setUnionDecl(std::string const&) + setuniondecl.cc: Options::setUnionDecl(std::__cxx11::basic_string, std::allocator > const&) Item() Full name: Item::Item() @@ -798,6 +864,7 @@ debugincludes.cc: Generator::debugIncludes(std::ostream&) const debuginit.cc: Generator::debugInit(std::ostream&) const debuglookup.cc: Generator::debugLookup(std::ostream&) const + defaultactionreturn.cc: Generator::defaultActionReturn(std::ostream&) const errorverbose.cc: Generator::errorVerbose(std::ostream&) const lex.cc: Generator::lex(std::ostream&) const ltype.cc: Generator::ltype(std::ostream&) const @@ -853,14 +920,14 @@ distributelasetof.cc: State::distributeLAsetOf(StateItem&) initialstate.cc: State::initialState() -lookup(std::string const&) - Full name: Symtab::lookup(std::string const&) +lookup(std::__cxx11::basic_string, std::allocator > const&) + Full name: Symtab::lookup(std::__cxx11::basic_string, std::allocator > const&) Source: lookup.cc Used By: cleanup.cc: Parser::cleanup() - definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&) - defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type) - requirenonterminal.cc: Parser::requireNonTerminal(std::string const&) + definenonterminal.cc: Parser::defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + defineterminal.cc: Parser::defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + requirenonterminal.cc: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) setprecedence.cc: Parser::setPrecedence(int) usesymbol.cc: Parser::useSymbol() useterminal.cc: Parser::useTerminal() @@ -911,9 +978,9 @@ Full name: Parser::multiplyDefined(Symbol const*) Source: multiplydefined.cc Used By: - definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&) - defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type) - requirenonterminal.cc: Parser::requireNonTerminal(std::string const&) + definenonterminal.cc: Parser::defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + defineterminal.cc: Parser::defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + requirenonterminal.cc: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) useterminal.cc: Parser::useTerminal() nameOrValue(std::ostream&) const @@ -945,7 +1012,7 @@ Full name: Parser::negativeIndex(AtDollar const&) const Source: negativeindex.cc Used By: - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const warnautoignored.cc: Parser::warnAutoIgnored(char const*, AtDollar const&) const nestedBlock(Block&) @@ -954,12 +1021,12 @@ Used By: handleproductionelements.cc: Parser::handleProductionElements(Meta__::SType&, Meta__::SType const&) -newRule(NonTerminal*, std::string const&, unsigned int) - Full name: Rules::newRule(NonTerminal*, std::string const&, unsigned int) +newRule(NonTerminal*, std::__cxx11::basic_string, std::allocator > const&, unsigned int) + Full name: Rules::newRule(NonTerminal*, std::__cxx11::basic_string, std::allocator > const&, unsigned int) Source: newrule.cc Used By: augmentgrammar.cc: Rules::augmentGrammar(Symbol*) - openrule.cc: Parser::openRule(std::string const&) + openrule.cc: Parser::openRule(std::__cxx11::basic_string, std::allocator > const&) newState() Full name: State::newState() @@ -981,25 +1048,19 @@ nexton.cc: State::nextOn(Symbol const*) const notreducible.cc: State::notReducible(unsigned int) -nextHiddenName() - Full name: Parser::nextHiddenName() - Source: nexthiddenname.cc - Used By: - nestedblock.cc: Parser::nestedBlock(Block&) - nextState(Next&) Full name: State::nextState(Next&) Source: nextstate.cc Used By: construct.cc: State::construct() -NonTerminal(std::string const&, std::string const&, Symbol::Type) - Full name: NonTerminal::NonTerminal(std::string const&, std::string const&, Symbol::Type) +NonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + Full name: NonTerminal::NonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) Source: nonterminal1.cc Used By: augmentgrammar.cc: Rules::augmentGrammar(Symbol*) - definenonterminal.cc: Parser::defineNonTerminal(std::string const&, std::string const&) - requirenonterminal.cc: Parser::requireNonTerminal(std::string const&) + definenonterminal.cc: Parser::defineNonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + requirenonterminal.cc: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) usesymbol.cc: Parser::useSymbol() nonTerminalSymbol(NonTerminal const*, std::ostream&) @@ -1020,20 +1081,20 @@ Used By: lex.cc: Scanner::executeAction__(unsigned int) -open(unsigned int, std::string const&) - Full name: Block::open(unsigned int, std::string const&) +open(unsigned int, std::__cxx11::basic_string, std::allocator > const&) + Full name: Block::open(unsigned int, std::__cxx11::basic_string, std::allocator > const&) Source: open.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) -openRule(std::string const&) - Full name: Parser::openRule(std::string const&) +openRule(std::__cxx11::basic_string, std::allocator > const&) + Full name: Parser::openRule(std::__cxx11::basic_string, std::allocator > const&) Source: openrule.cc Used By: parse.cc: Parser::executeAction(int) -operator()(std::string const&) - Full name: Block::operator()(std::string const&) +operator()(std::__cxx11::basic_string, std::allocator > const&) + Full name: Block::operator()(std::__cxx11::basic_string, std::allocator > const&) Source: opfuncharp.cc Used By: lex.cc: Scanner::executeAction__(unsigned int) @@ -1127,7 +1188,7 @@ Used By: unused.cc: NonTerminal::unused(NonTerminal const*) showunusednonterminals.cc: Rules::showUnusedNonTerminals() const - generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&) + generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::hash, std::allocator > >, std::equal_to, std::allocator > >, std::allocator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > > const&) unused.cc: Terminal::unused(Terminal const*) unused.cc: Production::unused(Production const*) @@ -1156,17 +1217,17 @@ data.cc: GLOBALS data.cc 28data.o popStream() - Full name: Scanner::popStream() - Source: popstream.cc - Used By: - lex.cc: Scanner::lex__() - -popStream() Full name: ScannerBase::popStream() Source: lex.cc Used By: popstream.cc: Scanner::popStream() +popStream() + Full name: Scanner::popStream() + Source: popstream.cc + Used By: + lex.cc: Scanner::lex__() + predefine(Terminal const*) Full name: Parser::predefine(Terminal const*) Source: predefine.cc @@ -1210,8 +1271,8 @@ Used By: staticdata.cc: Generator::staticData(std::ostream&) const -pushStream(std::string const&) - Full name: ScannerBase::pushStream(std::string const&) +pushStream(std::__cxx11::basic_string, std::allocator > const&) + Full name: ScannerBase::pushStream(std::__cxx11::basic_string, std::allocator > const&) Source: lex.cc Used By: handlexstring.cc: Scanner::handleXstring(unsigned int) @@ -1244,7 +1305,7 @@ Full name: Writer::reductions(FBB::Table&, State const&) Source: reductions.cc Used By: - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) reductionSymbol(Element const*, unsigned int, FBB::Table&) Full name: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&) @@ -1276,14 +1337,14 @@ Used By: checkconflicts.cc: State::checkConflicts() -replace(std::string&, char, std::string const&) - Full name: Generator::replace(std::string&, char, std::string const&) +replace(std::__cxx11::basic_string, std::allocator >&, char, std::__cxx11::basic_string, std::allocator > const&) + Full name: Generator::replace(std::__cxx11::basic_string, std::allocator >&, char, std::__cxx11::basic_string, std::allocator > const&) Source: replace.cc Used By: conflicts.cc: Generator::conflicts() const -replaceBaseFlag(std::string&) const - Full name: Generator::replaceBaseFlag(std::string&) const +replaceBaseFlag(std::__cxx11::basic_string, std::allocator >&) const + Full name: Generator::replaceBaseFlag(std::__cxx11::basic_string, std::allocator >&) const Source: replacebaseflag.cc Used By: filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const @@ -1295,11 +1356,11 @@ Used By: data.cc: GLOBALS data.cc 28data.o -requireNonTerminal(std::string const&) - Full name: Parser::requireNonTerminal(std::string const&) +requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) + Full name: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) Source: requirenonterminal.cc Used By: - openrule.cc: Parser::openRule(std::string const&) + openrule.cc: Parser::openRule(std::__cxx11::basic_string, std::allocator > const&) reRead(unsigned int) Full name: ScannerBase::Input::reRead(unsigned int) @@ -1307,12 +1368,6 @@ Used By: returntypespec.cc: Scanner::returnTypeSpec() -returnPolymorphic(AtDollar const&) const - Full name: Parser::returnPolymorphic(AtDollar const&) const - Source: returnpolymorphic.cc - Used By: - handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int) - returnQuoted(void (Scanner::*)()) Full name: Scanner::returnQuoted(void (Scanner::*)()) Source: returnquoted.cc @@ -1331,12 +1386,6 @@ Used By: lex.cc: Scanner::executeAction__(unsigned int) -returnUnion(AtDollar const&) const - Full name: Parser::returnUnion(AtDollar const&) const - Source: returnunion.cc - Used By: - handledollar.cc: Parser::handleDollar(Block&, AtDollar const&, int) - RmReduction(unsigned int, unsigned int, Symbol const*, bool) Full name: RmReduction::RmReduction(unsigned int, unsigned int, Symbol const*, bool) Source: rmreduction1.cc @@ -1372,26 +1421,26 @@ Source: data.cc Used By: define.cc: State::define(Rules const&) - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) s_at Full name: Generator::s_at Source: data.cc Used By: - replaceatkey.cc: Generator::replaceAtKey(std::string&, unsigned int) const - replacebaseflag.cc: Generator::replaceBaseFlag(std::string&) const + replaceatkey.cc: Generator::replaceAtKey(std::__cxx11::basic_string, std::allocator >&, unsigned int) const + replacebaseflag.cc: Generator::replaceBaseFlag(std::__cxx11::basic_string, std::allocator >&) const s_atBol Full name: Generator::s_atBol Source: data.cc Used By: - bolat.cc: Generator::bolAt(std::ostream&, std::string&, std::istream&, bool&) const + bolat.cc: Generator::bolAt(std::ostream&, std::__cxx11::basic_string, std::allocator >&, std::istream&, bool&) const s_atFlag Full name: Generator::s_atFlag Source: data.cc Used By: - replacebaseflag.cc: Generator::replaceBaseFlag(std::string&) const + replacebaseflag.cc: Generator::replaceBaseFlag(std::__cxx11::basic_string, std::allocator >&) const s_counter Full name: NonTerminal::s_counter @@ -1502,7 +1551,7 @@ Used By: operatorsubis2.cc: LookaheadSet::operator-=(Symbol const*) reduction.cc: Writer::reduction(FBB::Table&, StateItem const&) - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) selectsymbolic.cc: Generator::selectSymbolic(Terminal const*, std::vector >&) parser1.cc: Parser::Parser(Rules&) @@ -1513,27 +1562,6 @@ notreducible.cc: State::notReducible(unsigned int) parser1.cc: Parser::Parser(Rules&) -s_fileName - Full name: Production::s_fileName - Source: data.cc - Used By: - showconflicts.cc: RRConflict::showConflicts(Rules const&) const - showconflicts.cc: SRConflict::showConflicts(Rules const&) const - production1.cc: Production::Production(Symbol const*, unsigned int) - storeFilename.cc: Production::storeFilename(std::string const&) - -s_hiddenName - Full name: Parser::s_hiddenName - Source: data.cc - Used By: - nexthiddenname.cc: Parser::nextHiddenName() - -s_insert - Full name: Generator::s_insert - Source: data.cc - Used By: - insert.cc: Generator::insert(std::ostream&) const - s_insert Full name: State::s_insert Source: data.cc @@ -1542,6 +1570,14 @@ define.cc: State::define(Rules const&) s_insertPtr + Full name: Item::s_insertPtr + Source: data.cc + Used By: + itemcontext.cc: StateItem::itemContext(std::ostream&) const + plainitem.cc: StateItem::plainItem(std::ostream&) const + insertext.cc: State::insertExt(std::ostream&) const + +s_insertPtr Full name: NonTerminal::s_insertPtr Source: data.cc Used By: @@ -1555,11 +1591,33 @@ multiplydefined.cc: Parser::multiplyDefined(Symbol const*) s_insertPtr - Full name: StateItem::s_insertPtr + Full name: Terminal::s_insertPtr Source: data.cc Used By: + setprecedence.cc: GLOBALS setprecedence.cc 12setprecedence.o + showfirst.cc: Rules::showFirst() const + showterminals.cc: GLOBALS showterminals.cc 12showterminals.o + showunusedrules.cc: Rules::showUnusedRules() const + showunusedterminals.cc: Rules::showUnusedTerminals() const + derivesentence.cc: GLOBALS derivesentence.cc 13derivesentence.o + insert.cc: GLOBALS insert.cc 14insert.o + insert.cc: GLOBALS insert.cc 15insert.o + transition.cc: GLOBALS transition.cc 23transition.o + transitionkernel.cc: GLOBALS transitionkernel.cc 23transitionkernel.o + insert.cc: GLOBALS insert.cc 24insert.o + showconflicts.cc: GLOBALS showconflicts.cc 24showconflicts.o insertext.cc: State::insertExt(std::ostream&) const - insertstd.cc: State::insertStd(std::ostream&) const + inserttoken.cc: GLOBALS inserttoken.cc 26inserttoken.o + reductionsymbol.cc: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) + terminalsymbol.cc: GLOBALS terminalsymbol.cc 26terminalsymbol.o + transition.cc: Writer::transition(Next const&, FBB::Table&) + filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const + multiplydefined.cc: GLOBALS multiplydefined.cc 2multiplydefined.o + destructor.cc: GLOBALS destructor.cc 8destructor.o + setvalue.cc: GLOBALS setvalue.cc 8setvalue.o + unused.cc: GLOBALS unused.cc 8unused.o + standard.cc: GLOBALS standard.cc 9standard.o s_insertPtr Full name: Next::s_insertPtr @@ -1569,37 +1627,18 @@ insertstd.cc: State::insertStd(std::ostream&) const s_insertPtr - Full name: Item::s_insertPtr - Source: data.cc - Used By: - itemcontext.cc: StateItem::itemContext(std::ostream&) const - plainitem.cc: StateItem::plainItem(std::ostream&) const - insertext.cc: State::insertExt(std::ostream&) const - -s_insertPtr - Full name: Terminal::s_insertPtr + Full name: StateItem::s_insertPtr Source: data.cc Used By: - setprecedence.cc: Rules::setPrecedence(Terminal const*) - showfirst.cc: Rules::showFirst() const - showterminals.cc: Rules::showTerminals() const - showunusedrules.cc: Rules::showUnusedRules() const - showunusedterminals.cc: Rules::showUnusedTerminals() const - insert.cc: Item::insert(std::ostream&, Production const*) const - transitionkernel.cc: Next::transitionKernel(std::ostream&) const insertext.cc: State::insertExt(std::ostream&) const - reductionsymbol.cc: Writer::reductionSymbol(Element const*, unsigned int, FBB::Table&) - transition.cc: Writer::transition(Next const&, FBB::Table&) - filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const - multiplydefined.cc: Parser::multiplyDefined(Symbol const*) - destructor.cc: GLOBALS destructor.cc 8destructor.o + insertstd.cc: State::insertStd(std::ostream&) const s_lastLineNr Full name: Rules::s_lastLineNr Source: data.cc Used By: addproduction.cc: Rules::addProduction(unsigned int) - newrule.cc: Rules::newRule(NonTerminal*, std::string const&, unsigned int) + newrule.cc: Rules::newRule(NonTerminal*, std::__cxx11::basic_string, std::allocator > const&, unsigned int) sethiddenaction.cc: Rules::setHiddenAction(Block const&) s_locationValue @@ -1619,20 +1658,20 @@ Source: data.cc Used By: assignnonterminalnumbers.cc: Rules::assignNonTerminalNumbers() - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) s_nConflicts - Full name: SRConflict::s_nConflicts + Full name: RRConflict::s_nConflicts Source: data.cc Used By: - handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int) + comparereductions.cc: RRConflict::compareReductions(unsigned int) define.cc: State::define(Rules const&) s_nConflicts - Full name: RRConflict::s_nConflicts + Full name: SRConflict::s_nConflicts Source: data.cc Used By: - comparereductions.cc: RRConflict::compareReductions(unsigned int) + handlesrconflict.cc: SRConflict::handleSRconflict(unsigned int, __gnu_cxx::__normal_iterator > > const&, unsigned int) define.cc: State::define(Rules const&) s_nExpectedConflicts @@ -1646,7 +1685,7 @@ Full name: Parser::s_nHidden Source: data.cc Used By: - nexthiddenname.cc: Parser::nextHiddenName() + nexthiddenname.cc: Parser::nextHiddenName[abi:cxx11]() s_nr Full name: Production::s_nr @@ -1666,26 +1705,14 @@ Used By: instance.cc: Options::instance() -s_out__ - Full name: ScannerBase::s_out__ - Source: lex.cc - Used By: - checkendofrawstring.cc: Scanner::checkEndOfRawString() - eoln.cc: Scanner::eoln() - handlerawstring.cc: Scanner::rawString() - handlexstring.cc: Scanner::handleXstring(unsigned int) - returnquoted.cc: Scanner::returnQuoted(void (Scanner::*)()) - returntypespec.cc: Scanner::returnTypeSpec() - parse.cc: Parser::executeAction(int) - s_precedence Full name: Terminal::s_precedence Source: data.cc Used By: expectrules.cc: Parser::expectRules() parse.cc: Parser::executeAction(int) - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) - terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) + terminal2.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) s_semanticValue Full name: Parser::s_semanticValue @@ -1732,22 +1759,22 @@ Full name: StateType::s_stateName Source: data.cc Used By: - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) s_stype__ Full name: Parser::s_stype__ Source: data.cc Used By: checkfirsttype.cc: Parser::checkFirstType() - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const s_threadConst Full name: Writer::s_threadConst Source: data.cc Used By: - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) statesarray.cc: Writer::statesArray() const - writer0.cc: Writer::Writer(std::string const&, Rules const&) + writer0.cc: Writer::Writer(std::__cxx11::basic_string, std::allocator > const&, Rules const&) s_undefined Full name: NonTerminal::s_undefined @@ -1757,25 +1784,25 @@ showunusednonterminals.cc: Rules::showUnusedNonTerminals() const s_unused - Full name: Production::s_unused + Full name: NonTerminal::s_unused Source: data.cc Used By: - showunusedrules.cc: Rules::showUnusedRules() const - unused.cc: Production::unused(Production const*) + unused.cc: NonTerminal::unused(NonTerminal const*) + showunusednonterminals.cc: Rules::showUnusedNonTerminals() const s_unused - Full name: NonTerminal::s_unused + Full name: Production::s_unused Source: data.cc Used By: - unused.cc: NonTerminal::unused(NonTerminal const*) - showunusednonterminals.cc: Rules::showUnusedNonTerminals() const + showunusedrules.cc: Rules::showUnusedRules() const + unused.cc: Production::unused(Production const*) s_value Full name: Terminal::s_value Source: data.cc Used By: setvalue.cc: Terminal::setValue(unsigned int) - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) s_valueSet Full name: Terminal::s_valueSet @@ -1802,17 +1829,17 @@ Used By: substituteblock.cc: Parser::substituteBlock(int, Block&) -Scanner(std::string const&) - Full name: Scanner::Scanner(std::string const&) +Scanner(std::__cxx11::basic_string, std::allocator > const&) + Full name: Scanner::Scanner(std::__cxx11::basic_string, std::allocator > const&) Source: scanner1.cc Used By: parser1.cc: Parser::Parser(Rules&) -ScannerBase(std::string const&, std::string const&) - Full name: ScannerBase::ScannerBase(std::string const&, std::string const&) +ScannerBase(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) + Full name: ScannerBase::ScannerBase(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&) Source: lex.cc Used By: - scanner1.cc: Scanner::Scanner(std::string const&) + scanner1.cc: Scanner::Scanner(std::__cxx11::basic_string, std::allocator > const&) scannerH(std::ostream&) const Full name: Generator::scannerH(std::ostream&) const @@ -1832,13 +1859,13 @@ Used By: tokens.cc: Generator::tokens(std::ostream&) const -semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const - Full name: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const +semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const + Full name: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const Source: semtag.cc Used By: - returnpolymorphic.cc: Parser::returnPolymorphic(AtDollar const&) const + returnpolymorphic.cc: Parser::returnPolymorphic[abi:cxx11](AtDollar const&) const returnsingle.cc: Parser::returnSingle(AtDollar const&) const - returnunion.cc: Parser::returnUnion(AtDollar const&) const + returnunion.cc: Parser::returnUnion[abi:cxx11](AtDollar const&) const setAccessorVariables() Full name: Options::setAccessorVariables() @@ -1897,8 +1924,8 @@ lex.cc: Scanner::executeAction__(unsigned int) settags.cc: Scanner::setTags() const -setLocationDecl(std::string const&) - Full name: Options::setLocationDecl(std::string const&) +setLocationDecl(std::__cxx11::basic_string, std::allocator > const&) + Full name: Options::setLocationDecl(std::__cxx11::basic_string, std::allocator > const&) Source: setlocationdecl.cc Used By: parse.cc: Parser::executeAction(int) @@ -1915,14 +1942,14 @@ Used By: expectrules.cc: Parser::expectRules() -setOpt(std::string*, char const*, std::string const&) - Full name: Options::setOpt(std::string*, char const*, std::string const&) +setOpt(std::__cxx11::basic_string, std::allocator >*, char const*, std::__cxx11::basic_string, std::allocator > const&) + Full name: Options::setOpt(std::__cxx11::basic_string, std::allocator >*, char const*, std::__cxx11::basic_string, std::allocator > const&) Source: setopt.cc Used By: setbasicstrings.cc: Options::setBasicStrings() -setPath(std::string*, int, std::string const&, char const*, char const*) - Full name: Options::setPath(std::string*, int, std::string const&, char const*, char const*) +setPath(std::__cxx11::basic_string, std::allocator >*, int, std::__cxx11::basic_string, std::allocator > const&, char const*, char const*) + Full name: Options::setPath(std::__cxx11::basic_string, std::allocator >*, int, std::__cxx11::basic_string, std::allocator > const&, char const*, char const*) Source: setpath2.cc Used By: setpathstrings.cc: Options::setPathStrings() @@ -1934,16 +1961,16 @@ setaccessorvariables.cc: Options::setAccessorVariables() setPolymorphicDecl() - Full name: Options::setPolymorphicDecl() + Full name: Parser::setPolymorphicDecl() Source: setpolymorphicdecl.cc Used By: - setpolymorphicdecl.cc: Parser::setPolymorphicDecl() + parse.cc: Parser::executeAction(int) setPolymorphicDecl() - Full name: Parser::setPolymorphicDecl() + Full name: Options::setPolymorphicDecl() Source: setpolymorphicdecl.cc Used By: - parse.cc: Parser::executeAction(int) + setpolymorphicdecl.cc: Parser::setPolymorphicDecl() setPrecedence(int) Full name: Parser::setPrecedence(int) @@ -1952,17 +1979,17 @@ parse.cc: Parser::executeAction(int) setPrecedence(Terminal const*) - Full name: Rules::setPrecedence(Terminal const*) + Full name: Production::setPrecedence(Terminal const*) Source: setprecedence.cc Used By: - setprecedence.cc: Parser::setPrecedence(int) + setprecedence.cc: Rules::setPrecedence(Terminal const*) + updateprecedence.cc: Rules::updatePrecedence(Production*, std::vector > const&) setPrecedence(Terminal const*) - Full name: Production::setPrecedence(Terminal const*) + Full name: Rules::setPrecedence(Terminal const*) Source: setprecedence.cc Used By: - setprecedence.cc: Rules::setPrecedence(Terminal const*) - updateprecedence.cc: Rules::updatePrecedence(Production*, std::vector > const&) + setprecedence.cc: Parser::setPrecedence(int) setPrintTokens() Full name: Options::setPrintTokens() @@ -2006,7 +2033,7 @@ Used By: handlexstring.cc: Scanner::handleXstring(unsigned int) popstream.cc: Scanner::popStream() - scanner1.cc: Scanner::Scanner(std::string const&) + scanner1.cc: Scanner::Scanner(std::__cxx11::basic_string, std::allocator > const&) setUnionDecl() Full name: Parser::setUnionDecl() @@ -2014,8 +2041,8 @@ Used By: parse.cc: Parser::executeAction(int) -setUnionDecl(std::string const&) - Full name: Options::setUnionDecl(std::string const&) +setUnionDecl(std::__cxx11::basic_string, std::allocator > const&) + Full name: Options::setUnionDecl(std::__cxx11::basic_string, std::allocator > const&) Source: setuniondecl.cc Used By: setuniondecl.cc: Parser::setUnionDecl() @@ -2030,7 +2057,7 @@ Full name: Terminal::setValue(unsigned int) Source: setvalue.cc Used By: - definetokenname.cc: Parser::defineTokenName(std::string const&, bool) + definetokenname.cc: Parser::defineTokenName(std::__cxx11::basic_string, std::allocator > const&, bool) setVerbosity() Full name: Options::setVerbosity() @@ -2039,13 +2066,13 @@ cleanup.cc: Parser::cleanup() showConflicts(Rules const&) const - Full name: SRConflict::showConflicts(Rules const&) const + Full name: RRConflict::showConflicts(Rules const&) const Source: showconflicts.cc Used By: define.cc: State::define(Rules const&) showConflicts(Rules const&) const - Full name: RRConflict::showConflicts(Rules const&) const + Full name: SRConflict::showConflicts(Rules const&) const Source: showconflicts.cc Used By: define.cc: State::define(Rules const&) @@ -2074,8 +2101,8 @@ Used By: state1.cc: State::State(unsigned int) -srTable(State const*, std::string const&, FBB::Table&, std::ostream&) - Full name: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) +srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) + Full name: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) Source: srtable.cc Used By: srtables.cc: Writer::srTables() const @@ -2092,10 +2119,13 @@ Used By: showrules.cc: Rules::showRules() const productioninfo.cc: Writer::productionInfo(Production const*, std::ostream&) + checkemptyblocktype.cc: Parser::checkEmptyBlocktype() checkfirsttype.cc: Parser::checkFirstType() errindextoolarge.cc: Parser::errIndexTooLarge(AtDollar const&, int) const - errnosemantic.cc: Parser::errNoSemantic(char const*, AtDollar const&, std::string const&) const + errnosemantic.cc: Parser::errNoSemantic(char const*, AtDollar const&, std::__cxx11::basic_string, std::allocator > const&) const + handleproductionelement.cc: Parser::handleProductionElement(Meta__::SType&) negativeindex.cc: Parser::negativeIndex(AtDollar const&) const + substituteblock.cc: Parser::substituteBlock(int, Block&) warnautoignored.cc: Parser::warnAutoIgnored(char const*, AtDollar const&) const warnautooverride.cc: Parser::warnAutoOverride(AtDollar const&) const warnuntaggedvalue.cc: Parser::warnUntaggedValue(AtDollar const&) const @@ -2127,11 +2157,11 @@ Used By: data.cc: GLOBALS data.cc 28data.o -storeFilename(std::string const&) - Full name: Production::storeFilename(std::string const&) +storeFilename(std::__cxx11::basic_string, std::allocator > const&) + Full name: Production::storeFilename(std::__cxx11::basic_string, std::allocator > const&) Source: storeFilename.cc Used By: - newrule.cc: Rules::newRule(NonTerminal*, std::string const&, unsigned int) + newrule.cc: Rules::newRule(NonTerminal*, std::__cxx11::basic_string, std::allocator > const&, unsigned int) stype(std::ostream&) const Full name: Generator::stype(std::ostream&) const @@ -2139,15 +2169,6 @@ Used By: data.cc: GLOBALS data.cc 28data.o -sType(unsigned int) const - Full name: Rules::sType(unsigned int) const - Source: stype.cc - Used By: - checkfirsttype.cc: Parser::checkFirstType() - returnpolymorphic.cc: Parser::returnPolymorphic(AtDollar const&) const - returnunion.cc: Parser::returnUnion(AtDollar const&) const - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const - substituteBlock(int, Block&) Full name: Parser::substituteBlock(int, Block&) Source: substituteblock.cc @@ -2161,13 +2182,13 @@ Used By: define.cc: State::define(Rules const&) -Symbol(std::string const&, Symbol::Type, std::string const&) - Full name: Symbol::Symbol(std::string const&, Symbol::Type, std::string const&) +Symbol(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, std::__cxx11::basic_string, std::allocator > const&) + Full name: Symbol::Symbol(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, std::__cxx11::basic_string, std::allocator > const&) Source: symbol1.cc Used By: - nonterminal1.cc: NonTerminal::NonTerminal(std::string const&, std::string const&, Symbol::Type) - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) - terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type) + nonterminal1.cc: NonTerminal::NonTerminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) + terminal2.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) symbolicNames() const Full name: Writer::symbolicNames() const @@ -2175,17 +2196,17 @@ Used By: staticdata.cc: Generator::staticData(std::ostream&) const -Terminal(std::string const&, std::string const&, Symbol::Type) - Full name: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type) +Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) + Full name: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) Source: terminal2.cc Used By: data.cc: GLOBALS data.cc 12data.o -Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) - Full name: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) +Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) + Full name: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) Source: terminal1.cc Used By: - defineterminal.cc: Parser::defineTerminal(std::string const&, Symbol::Type) + defineterminal.cc: Parser::defineTerminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) useterminal.cc: Parser::useTerminal() terminalSymbol(Terminal const*, std::ostream&) @@ -2198,7 +2219,7 @@ Full name: Rules::termToNonterm(Symbol*, Symbol*) Source: termtononterm.cc Used By: - requirenonterminal.cc: Parser::requireNonTerminal(std::string const&) + requirenonterminal.cc: Parser::requireNonTerminal(std::__cxx11::basic_string, std::allocator > const&) threading(std::ostream&) const Full name: Generator::threading(std::ostream&) const @@ -2234,7 +2255,7 @@ Full name: Writer::transitions(FBB::Table&, std::vector > const&) Source: transitions.cc Used By: - srtable.cc: Writer::srTable(State const*, std::string const&, FBB::Table&, std::ostream&) + srtable.cc: Writer::srTable(State const*, std::__cxx11::basic_string, std::allocator > const&, FBB::Table&, std::ostream&) undefined(NonTerminal const*) Full name: NonTerminal::undefined(NonTerminal const*) @@ -2242,14 +2263,14 @@ Used By: showunusednonterminals.cc: Rules::showUnusedNonTerminals() const -undelimit(std::string const&) - Full name: Options::undelimit(std::string const&) +undelimit(std::__cxx11::basic_string, std::allocator > const&) + Full name: Options::undelimit(std::__cxx11::basic_string, std::allocator > const&) Source: undelimit.cc Used By: handlexstring.cc: Scanner::handleXstring(unsigned int) - cleandir.cc: Options::cleanDir(std::string&, bool) - setopt.cc: Options::setOpt(std::string*, char const*, std::string const&) - definepathname.cc: Parser::definePathname(std::string*) + cleandir.cc: Options::cleanDir(std::__cxx11::basic_string, std::allocator >&, bool) + setopt.cc: Options::setOpt(std::__cxx11::basic_string, std::allocator >*, char const*, std::__cxx11::basic_string, std::allocator > const&) + definepathname.cc: Parser::definePathname(std::__cxx11::basic_string, std::allocator >*) unused(NonTerminal const*) Full name: NonTerminal::unused(NonTerminal const*) @@ -2310,7 +2331,7 @@ Full name: Production::vectorIdx(unsigned int) const Source: vectoridx.cc Used By: - stype.cc: Rules::sType(unsigned int) const + stype.cc: Rules::sType[abi:cxx11](unsigned int) const beyonddotisnonterminal.cc: Item::beyondDotIsNonTerminal() const firstbeyonddot.cc: Item::firstBeyondDot(FirstSet*) const hasrightofdot.cc: Item::hasRightOfDot(Symbol const&) const @@ -2321,57 +2342,57 @@ Full name: version Source: version.cc Used By: - usage.cc: usage(std::string const&) + usage.cc: usage(std::__cxx11::basic_string, std::allocator > const&) filter.cc: Generator::filter(std::istream&, std::ostream&, bool) const visitReduction(unsigned int) - Full name: RRConflict::visitReduction(unsigned int) + Full name: SRConflict::visitReduction(unsigned int) Source: visitreduction.cc Used By: - inspect.cc: RRConflict::inspect() + inspect.cc: SRConflict::inspect() visitReduction(unsigned int) - Full name: SRConflict::visitReduction(unsigned int) + Full name: RRConflict::visitReduction(unsigned int) Source: visitreduction.cc Used By: - inspect.cc: SRConflict::inspect() + inspect.cc: RRConflict::inspect() warnAutoIgnored(char const*, AtDollar const&) const Full name: Parser::warnAutoIgnored(char const*, AtDollar const&) const Source: warnautoignored.cc Used By: - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const warnAutoOverride(AtDollar const&) const Full name: Parser::warnAutoOverride(AtDollar const&) const Source: warnautooverride.cc Used By: - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const warnUntaggedValue(AtDollar const&) const Full name: Parser::warnUntaggedValue(AtDollar const&) const Source: warnuntaggedvalue.cc Used By: - semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::string const&) const) const + semtag.cc: Parser::semTag(char const*, AtDollar const&, bool (Parser::*)(std::__cxx11::basic_string, std::allocator > const&) const) const -Writer(std::string const&, Rules const&) - Full name: Writer::Writer(std::string const&, Rules const&) +Writer(std::__cxx11::basic_string, std::allocator > const&, Rules const&) + Full name: Writer::Writer(std::__cxx11::basic_string, std::allocator > const&, Rules const&) Source: writer0.cc Used By: - generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::equal_to, std::allocator > > const&) + generator1.cc: Generator::Generator(Rules const&, std::unordered_map, std::allocator >, std::__cxx11::basic_string, std::allocator >, std::hash, std::allocator > >, std::equal_to, std::allocator > >, std::allocator, std::allocator > const, std::__cxx11::basic_string, std::allocator > > > > const&) year Full name: year Source: version.cc Used By: - usage.cc: usage(std::string const&) + usage.cc: usage(std::__cxx11::basic_string, std::allocator > const&) ~Element() Full name: Element::~Element() Source: destructor.cc Used By: destructor.cc: Symbol::~Symbol() - symbol1.cc: Symbol::Symbol(std::string const&, Symbol::Type, std::string const&) + symbol1.cc: Symbol::Symbol(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, std::__cxx11::basic_string, std::allocator > const&) ~Symbol() Full name: Symbol::~Symbol() @@ -2379,8 +2400,8 @@ Used By: destructor.cc: NonTerminal::~NonTerminal() destructor.cc: Terminal::~Terminal() - terminal1.cc: Terminal::Terminal(std::string const&, Symbol::Type, unsigned int, Terminal::Association, std::string const&) - terminal2.cc: Terminal::Terminal(std::string const&, std::string const&, Symbol::Type) + terminal1.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, Symbol::Type, unsigned int, Terminal::Association, std::__cxx11::basic_string, std::allocator > const&) + terminal2.cc: Terminal::Terminal(std::__cxx11::basic_string, std::allocator > const&, std::__cxx11::basic_string, std::allocator > const&, Symbol::Type) ~Terminal() Full name: Terminal::~Terminal() diff -Nru bisonc++-4.11.00/build bisonc++-4.13.01/build --- bisonc++-4.11.00/build 2015-08-29 09:59:05.000000000 +0000 +++ bisonc++-4.13.01/build 2015-12-18 08:43:02.000000000 +0000 @@ -1,40 +1,64 @@ #!/usr/bin/icmake -qt/tmp/bisonc++ -#define LOGENV "BISONCPP" - #include "icmconf" -list g_log; -string g_logPath = getenv(LOGENV)[1]; +string + g_logPath, + g_cwd = chdir(""); // initial working directory, ends in / + +int g_echo = ON; + +#include "icmake/cuteoln" +#include "icmake/backtick" #include "icmake/setopt" #include "icmake/run" #include "icmake/md" #include "icmake/special" +#include "icmake/precompileheaders" -#include "icmake/md5sum" -#include "icmake/log" -#include "icmake/writelog" -#include "icmake/logdirs" -#include "icmake/logfiles" -#include "icmake/readlog" -#include "icmake/adddir" -#include "icmake/removedir" -#include "icmake/remove" +#include "icmake/pathfile" +#include "icmake/findall" +#include "icmake/loginstall" +#include "icmake/logrecursive" +#include "icmake/logzip" +#include "icmake/logfile" #include "icmake/uninstall" #include "icmake/clean" #include "icmake/manpage" #include "icmake/manual" #include "icmake/github" +#include "icmake/destinstall" #include "icmake/install" -string g_cwd = chdir(""); // initial working directory - void main(int argc, list argv) { string option; string strip; + int idx; + + for (idx = listlen(argv); idx--; ) + { + if (argv[idx] == "-q") + { + g_echo = OFF; + argv -= (list)"-q"; + } + else if (argv[idx] == "-P") + { + g_gch = 0; + argv -= (list)"-P"; + } + else if (strfind(argv[idx], "LOG:") == 0) + { + g_logPath = argv[idx]; + argv -= (list)g_logPath; + g_logPath = substr(g_logPath, 4, strlen(g_logPath)); + } + } + + echo(g_echo); option = argv[1]; @@ -44,14 +68,14 @@ if (option == "distclean") clean(1); - if (option == "install") - install(argv[2], argv[3]); - if (option != "") special(); + if (option == "install") + install(argv[2], argv[3]); + if (option == "uninstall") - uninstall(); + uninstall(argv[2]); if (option == "github") github(); @@ -64,6 +88,7 @@ if (option == "library") { + precompileHeaders(); system("icmbuild library"); exit(0); } @@ -73,12 +98,14 @@ if (option == "program") { + precompileHeaders(); system("icmbuild program " + strip); exit(0); } if (option == "oxref") { + precompileHeaders(); system("icmbuild program " + strip); run("oxref -fxs tmp/lib" LIBRARY ".a > " PROGRAM ".xref"); exit(0); @@ -87,14 +114,16 @@ if (option == "scanner") { chdir("scanner"); - system("flexc++ lexer"); + system("flexc++ -i scanner.ih lexer"); chdir(".."); system("icmbuild program " + strip); exit(0); } - printf("Usage: build [-p] what\n" - "Where `what' is one of:\n" + printf("Usage: build [-q] what\n" + "Where\n" + " [-q]: run quietly, do not show executed commands\n" + "`what' is one of:\n" " clean - clean up remnants of previous " "compilations\n" " distclean - clean + fully remove tmp/\n" @@ -106,26 +135,29 @@ " oxref [strip] - same a `program', also builds xref file\n" " using oxref\n" " scanner [strip] - build new scanner, then 'build program'\n" - " install program [path] - install the program at `path'\n" - " (by default `" BINARY "')\n" - " install skel [base] - install the skeleton files in `base'\n" - " (by default in `" SKEL "')\n" - " install man [base] - install the man pages in `base'\n" - " (by default in `" MAN "')\n" - " install manual [base]- install the manual in `base'\n" - " (by default in `" MANUAL "')\n" - " install std [base] - install standard docs in `base'\n" - " (by default in `" STD "')\n" - " install extra [base] - install extra docs in `base'\n" - " (by default in `" EXTRA "')\n" - " uninstall - remove installed files and empty " - "directories\n" + " install [LOG:path] selection [base] -\n" + " to install the software in the locations " + "defined \n" + " in the INSTALL.im file, optionally below " + "base.\n" + " LOG:path is optional: if specified `path' " + "is the\n" + " logfile on which the installation log is " + "written.\n" + " selection can be\n" + " x, to install all components,\n" + " or a combination of:\n" + " a (additional documentation),\n" + " b (binary program),\n" + " d (standard documentation),\n" + " m (man-pages)\n" + " s (skeleton files)\n" + " u (user guide)\n" + " uninstall logfile - remove files and empty directories listed\n" + " in the file 'logfile'\n" " github - prepare github's gh-pages update\n" " (internal use only)\n" "\n" - "If the environment variable DRYRUN is defined, no commands are\n" - "actually executed\n" - "\n" ); - exit(1); + exit(0); } diff -Nru bisonc++-4.11.00/changelog bisonc++-4.13.01/changelog --- bisonc++-4.11.00/changelog 2015-08-30 11:24:55.000000000 +0000 +++ bisonc++-4.13.01/changelog 2015-12-18 12:41:44.000000000 +0000 @@ -1,3 +1,87 @@ +bisonc++ (4.13.01) + + * slightly modified the icmake build scripts to prevent multiple inclusions + of some of the installed files. + + -- Frank B. Brokken Fri, 18 Dec 2015 13:41:08 +0100 + +bisonc++ (4.13.00) + + * 'build install' supports an optional LOG: argument: the (relative or + absolute) path to a installation log file. The environment variable + BISONCPP is no longer used. + + * Updated the usage info displayed by `./build', altered the procedure to + install the files at their final destinations. + + * Following a suggestion made by gendx the polymorphic class Semantic now + defines a variadic template constructor, allowing Semantic objects + (and thus SType::emplace) to be initialized (c.q. called) using any set of + argument types that are supported by Semantic's DataType. Also, the + (internally used) classes HasDefault and NoDefault are now superfluous and + were removed (from skeletons/bisonc++polymorphic and + skeletons/bisonc++polymorphic.inline). + + * Adapted the icmake build files to icmake 8.00.04 + + -- Frank B. Brokken Sun, 13 Dec 2015 16:29:41 +0100 + +bisonc++ (4.12.03) + + * Kevin Brodsky observed that the installation scripts used 'chdir' rather + than 'cd'. Fixed in this release. + + * Kevin Brodsky also observed that the combined size of all precompiled + headers might exceed some disks capacities. The option -P was added to the + ./build script to prevent the use of precompiled headers. + + -- Frank B. Brokken Mon, 05 Oct 2015 20:17:56 +0200 + +bisonc++ (4.12.02) + + * Refined the 'build uninstall' procedure + + -- Frank B. Brokken Sun, 04 Oct 2015 16:27:18 +0200 + +bisonc++ (4.12.01) + + * The implementation of the ./build script was improved. + + -- Frank B. Brokken Thu, 01 Oct 2015 18:41:45 +0200 + +bisonc++ (4.12.00) + + * Added 'build uninstall'. This command only works if, when calling one of + the 'build install' alternatives and when calling 'build uninstall' the + environment variable BISONCPP contains the (preferably absolute) filename + of a file on which installed files and directories are logged. + Note that 'build (dist)clean' does not remove the file pointed at by the + BISONCPP environment variable, unless that file happpens to be in a + directory removed by 'build (dist)clean'. See also the file INSTALL. + Defining the BISONCPP environment variable as ~/.bisoncpp usually works + well. + + * Guillaume Endignoux offered several valuable suggestions: + - Classes may not have default constructors, but may still be used if + the default $$ = $1 action is not used. This can now be controlled using + option --no-default-action-return (-N). When this option is specified + the default $$ = $1 assignment of semantic values when returning from an + action block isn't provided. When this option is specified then Bisonc++ + generates a warning for typed rules (non-terminals) whose action blocks + do not provide an explicit $$ return value. + - To assign a value to $$ a member `emplace' is provided, expecting the + arguments of the type represented by $$. + - In cases where a $x.get() cannot return a reference to a + value matching tt(Tag::NAME) and the associated type does not provide a + default constructor this function throws an exception reporting + STYPE::get: no default constructor available + + * Bisonc++'s documentation about using polymorphic values was modified, in + particular the information about how the various polymorphic values can + be assigned and retrieved. + + -- Frank B. Brokken Tue, 29 Sep 2015 11:48:18 +0200 + bisonc++ (4.11.00) * Cleanup of the manual, in particular how lexical scanners can access the @@ -78,7 +162,7 @@ bisonc++ (4.09.02) * Wilko Kuiper reported an annoying bug in the skeleton lex.in, causing the - compilation of parser.ih to fail. This release fixes that bug. + compilation of parser.hh to fail. This release fixes that bug. -- Frank B. Brokken Mon, 28 Jul 2014 16:46:35 +0200 @@ -170,7 +254,7 @@ * re-installed the --namespace option (see the next item) * Warnings are issued when options or directives are specified wchich are - ignored because the target file (e.g., parser.h, parser.ih) already + ignored because the target file (e.g., parser.h, parser.hh) already exists. These warnings are not issued for parse.cc and parserbase.h, which are by default rewritten at each bisonc++ run. These warnings are issued for the `class-header', `class-name', `baseclass-header', `namespace', @@ -222,7 +306,7 @@ bisonc++ (4.02.01) * Parser-class header files (e.g., Parser.h) and parser-class internal - header files (e.g., Parser.ih) generated with bisonc++ < 4.02.00 require + header files (e.g., Parser.hh) generated with bisonc++ < 4.02.00 require two hand-modifications when used in combination with bisonc++ >= 4.02.00: In Parser.h, just below the declaration @@ -230,7 +314,7 @@ add: void exceptionHandler__(std::exception const &exc); - In Parser.ih, assuming the name of the generated class is `Parser', add + In Parser.hh, assuming the name of the generated class is `Parser', add the following member definition (if a namespace is used: within the namespace's scope): inline void Parser::exceptionHandler__(std::exception const &exc) @@ -253,7 +337,7 @@ * Include guards of parser.h and parserbase.h include the namespace identifier, if %namespace has been used. - * Provided print()'s implementation in bisonc++.ih with a correct + * Provided print()'s implementation in bisonc++.hh with a correct class-prifix (was a fixed Parser::) * Textual corrections of the man-page and manual. @@ -311,10 +395,10 @@ implementing these classes were removed. * The Parser's inline functions are all private and were moved to the - parser's .ih file. This doesn't affect current implementations, as - parser.h and parser.ih are only generated once, but newly generated + parser's .hh file. This doesn't affect current implementations, as + parser.h and parser.hh are only generated once, but newly generated parsers no longer define the Parser's inline members (error, print__, and - lex) in parser.h but in parser.ih + lex) in parser.h but in parser.hh * @@ can be used (instead of d_loc__) to refer to a rule's location stack value. diff -Nru bisonc++-4.11.00/CLASSES.bobcat bisonc++-4.13.01/CLASSES.bobcat --- bisonc++-4.11.00/CLASSES.bobcat 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/CLASSES.bobcat 2015-12-13 16:26:55.000000000 +0000 @@ -1,12 +1,12 @@ -a2x align arg datetime -errno +exception indent -msg +mstream +pattern +ranger +stat string table tablesupport -typetrait -x2a diff -Nru bisonc++-4.11.00/debian/changelog bisonc++-4.13.01/debian/changelog --- bisonc++-4.11.00/debian/changelog 2015-11-30 22:23:07.000000000 +0000 +++ bisonc++-4.13.01/debian/changelog 2015-12-18 16:35:52.000000000 +0000 @@ -1,8 +1,58 @@ -bisonc++ (4.11.00-1build1) xenial; urgency=medium +bisonc++ (4.13.01-1) unstable; urgency=low - * Rebuild for bobcat 3 -> 4 ABI transition + [ Frank B. Brokken ] + * New upstream release uses slightly modified build scripts, simplifying + the install-targets of debian/rules. - -- Michael Hudson-Doyle Tue, 01 Dec 2015 11:23:07 +1300 + [ tony mancill ] + * Add manpage typos patch. + * Modify the short package description for bisonc++-doc. + * This is the first Debian upload to addresses FTBFS with icmake. + The build issue was fixed in upstream 4.13.00. (Closes: #808016) + + -- Frank B. Brokken Fri, 18 Dec 2015 13:55:14 +0100 + +bisonc++ (4.13.00-1) unstable; urgency=low + + * New upstream release (adapted to icmake 8.00.04, simplifies the + polymorphic class Semantic. + + * Modified 'rules' so that additional documentation now appears in + /usr/share/doc/bisonc++-doc + + -- Frank B. Brokken Thu, 17 Dec 2015 21:07:10 +0100 + +bisonc++ (4.12.03-1) unstable; urgency=low + + * Upstream fixed a flaw in the installation script, Upstream's 'build' + script now supports -P to prevent the use of precompiled headers + + * Upstream release supports the use of precompiled headers + + -- Frank B. Brokken Tue, 06 Oct 2015 11:56:58 +0200 + +bisonc++ (4.12.01-1) unstable; urgency=low + + * New upstream release (no changes related to the Debian distribution) + + * Removed the get-orig-sources target from debian/rules, and updated + debian/rules to reflect the new installation syntax of the upstream + ./build install command + + -- Frank B. Brokken Thu, 01 Oct 2015 18:47:25 +0200 + +bisonc++ (4.12.00-1) unstable; urgency=low + + * New upstream release adds new option (--no-default-action-return), and + provides new members for handling polymorphic semantic values. + + -- Frank B. Brokken Tue, 29 Sep 2015 11:53:50 +0200 + +bisonc++ (4.11.00-2) unstable; urgency=low + + * New package translation using the new C++ naming system + + -- Frank B. Brokken Wed, 09 Sep 2015 12:15:54 +0200 bisonc++ (4.11.00-1) unstable; urgency=low diff -Nru bisonc++-4.11.00/debian/control bisonc++-4.13.01/debian/control --- bisonc++-4.11.00/debian/control 2015-11-30 22:23:07.000000000 +0000 +++ bisonc++-4.13.01/debian/control 2015-12-18 16:35:52.000000000 +0000 @@ -4,9 +4,9 @@ Maintainer: Frank B. Brokken Uploaders: George Danchev , tony mancill -Build-Depends: debhelper (>= 9), libbobcat-dev (>= 3.25.01), - icmake (>= 7.22.01), - yodl (>= 3.05.0) +Build-Depends: debhelper (>= 9), libbobcat-dev (>= 4.01.03), + icmake (>= 8.00.04), + yodl (>= 3.06.0) Standards-Version: 3.9.6 Homepage: https://fbb-git.github.io/bisoncpp/ Vcs-Git: git://anonscm.debian.org/collab-maint/bisoncpp.git @@ -51,7 +51,7 @@ Architecture: all Section: doc Depends: ${shlibs:Depends}, ${misc:Depends} -Description: Bison-style parser generator for C++ +Description: Bison-style parser generator for C++ documentation Bisonc++ was designed after `bison++', created by Alain Coetmeur. Bisonc++ adds to bison++ a cleaner class-design, using a base-class to communicate lexical tokens to a lexical scanner. diff -Nru bisonc++-4.11.00/debian/patches/manpage_typos.patch bisonc++-4.13.01/debian/patches/manpage_typos.patch --- bisonc++-4.11.00/debian/patches/manpage_typos.patch 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/debian/patches/manpage_typos.patch 2015-12-18 16:35:52.000000000 +0000 @@ -0,0 +1,39 @@ +--- a/documentation/man/bisonc++.yo ++++ b/documentation/man/bisonc++.yo +@@ -226,7 +226,7 @@ + the implementation header is created if not yet existing, receiving the + filename tt(.ih). + it() A verbose description of the generated parser. This file is +-comparable to the verbose ouput file originally generated by bf(bison++). It ++comparable to the verbose output file originally generated by bf(bison++). It + is generated when the option tt(--verbose) or tt(-V) is provided. If so, bic() + writes the file tt(.output), where tt() is the name of the + file containing the grammar definition. +@@ -448,7 +448,7 @@ + specification, characteristics, and use of polymorphic semantic + values. + it() bf(%prec) tt(token) nl() +- Overrules the defined precendence of an operator for a particular ++ Overrules the defined precedence of an operator for a particular + grammatical rule. A well known application of tt(%prec) is: + verb( + expression: +@@ -919,7 +919,7 @@ + ) + + To avoid collisions with names defined by the parser's (base) class, the +-following identifiers should not be used as token nams: ++following identifiers should not be used as token names: + itemization( + it() Identifiers ending in two underscores; + it() Any of the following identifiers: tt(ABORT, ACCEPT, ERROR, clearin, +--- a/documentation/manual/directives/prec.yo ++++ b/documentation/manual/directives/prec.yo +@@ -1,6 +1,6 @@ + Syntax: bf(%prec) tt(token) nl() + The construction bf(%prec) tt(token) may be used in production rules to +-overrule the actual precendence of an operator in a particular production ++overrule the actual precedence of an operator in a particular production + rule. Well known is the construction + verb( + expression: diff -Nru bisonc++-4.11.00/debian/patches/series bisonc++-4.13.01/debian/patches/series --- bisonc++-4.11.00/debian/patches/series 2015-11-30 22:23:07.000000000 +0000 +++ bisonc++-4.13.01/debian/patches/series 2015-12-18 16:35:52.000000000 +0000 @@ -0,0 +1 @@ +manpage_typos.patch diff -Nru bisonc++-4.11.00/debian/rules bisonc++-4.13.01/debian/rules --- bisonc++-4.11.00/debian/rules 2015-11-30 22:23:07.000000000 +0000 +++ bisonc++-4.13.01/debian/rules 2015-12-18 16:35:52.000000000 +0000 @@ -6,14 +6,6 @@ # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. -# The following is for internal development usage only -# Update that sum when new _upstream_ releases occur, this -# catches silent file content forges at the upstream server side -# Archive downloaded from https://www.icce.rug.nl/debian/bisonc++ -# file: bisonc++_x.y.z.tar.gz - -MD5TRUSTED := 0c14d348dd789d4d8bdd44f95053f42b - # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 @@ -65,21 +57,19 @@ dh_installdirs # Add here commands to install the package into debian/bisonc++. - ./build install program debian/bisonc++/usr/bin/bisonc++ - ./build install skel debian/bisonc++/usr/share/bisonc++ - GZIP=-9n ./build install man debian/bisonc++/usr/share/man/man1 - ./build install std debian/bisonc++/usr/share/doc/bisonc++ + ./build install bdms debian/bisonc++ install-indep: - ./build install manual debian/bisonc++-doc/usr/share/doc/bisonc++-doc - ./build install extra debian/bisonc++-doc/usr/share/doc/bisonc++-doc # Build architecture-independent files here. binary-indep: build-indep install-indep + + ./build install au debian/bisonc++-doc + dh_testdir -i dh_testroot -i dh_installdocs -i README.class-setup README.flex README.lookaheads README.states README.parser README.states-and-conflicts - dh_installinfo -i + #dh_installinfo -i dh_installchangelogs -i dh_link -i dh_compress -i @@ -91,11 +81,12 @@ # Build architecture-dependent files here. binary-arch: build install + dh_testdir -a dh_testroot -a dh_installchangelogs -a dh_installdocs README-0.98 -a - dh_installexamples -a + #dh_installexamples -a #dh_installman -a dh_link -a dh_strip -a @@ -107,40 +98,7 @@ dh_md5sums -a dh_builddeb -a -DEBVERSION:=$(shell head -n 1 debian/changelog | sed -e 's/^[^(]*(\([^)]*\)).*/\1/') -UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.]*$$//' -e 's/.dfsg$$//') -UPNAME := bisonc++ -UPFILE := $(UPNAME)_$(UPVERSION).tar.gz -DEFILE := $(UPNAME)_$(UPVERSION).orig.tar.gz -URL := https://www.icce.rug.nl/debian/bisonc++ -MD5CURRENT := `md5sum ../tarballs/$(DEFILE) | sed -e 's/ .*//'` - -get-orig-source: - @@dh_testdir - @@[ -d ../tarballs/. ]||mkdir -p ../tarballs - - -@if [ ! -f ../tarballs/$(DEFILE) ] ; then \ - echo -e "Downloading $(URL)/$(UPFILE)\nSaving into ../tarballs/$(DEFILE) ..." ; \ - wget --no-check-certificate --quiet -N -nv -T20 -t3 -O \ - ../tarballs/$(DEFILE) $(URL)/$(UPFILE) ; \ - else \ - echo "Upstream source tarball has already been downloaded" ; \ - fi - - -@if [ "$(MD5CURRENT)" != "$(MD5TRUSTED)" ] ; then \ - echo "Expecting upstream filename md5sum $(MD5TRUSTED), but $(MD5CURRENT) found" ; \ - echo "Upstream filename md5sum is NOT trusted! Possible upstream filename forge!" ; \ - false ; \ - else \ - echo "Upstream filename md5sum is trusted!" ; \ - fi - - -print-version: - @@echo "Debian version: $(DEBVERSION)" - @@echo "Upstream version: $(UPVERSION)" - - binary: binary-arch binary-indep .PHONY: build clean binary-indep binary-arch binary install configure + diff -Nru bisonc++-4.11.00/documentation/man/bisonc++.yo bisonc++-4.13.01/documentation/man/bisonc++.yo --- bisonc++-4.11.00/documentation/man/bisonc++.yo 2015-08-29 08:50:35.000000000 +0000 +++ bisonc++-4.13.01/documentation/man/bisonc++.yo 2015-12-13 16:26:55.000000000 +0000 @@ -586,13 +586,12 @@ manpagesection(5. POLYMORPHIC SEMANTIC VALUES) - The tt(%polymorphic) directive results in bic() generating a parser using + The tt(%polymorphic) directive allows bic() to generate a parser using polymorphic semantic values. The various semantic values are specified as pairs, consisting of em(tags) (which are bf(C++) identifiers), and bf(C++) -type names. Tags and type names are separated from each other by -colons. Multiple tag and type name combinations are separated from each other -by semicolons, and an optional semicolon ends the final tag/type -specification. +type names. Tags and type names are separated by colons. Multiple tag and type +name combinations are separated by semicolons, and an optional semicolon ends +the final tag/type specification. Here is an example, defining three semantic values: an tt(int), a tt(std::string) and a tt(std::vector): @@ -602,12 +601,13 @@ ) The identifier to the left of the colon is called the em(tag-identifier) (or simply em(tag)), and the type name to the right of the colon is called the -em(type-name). The type-names must be built-in types or must offer default -constructors. - - If type-names refer to types declared in header files that were not -already included by the parser's base class header, then these header files -must be inserted using the tt(%baseclass-preinclude) directive. +em(type-name). Since bic() version 4.12.00 the types no longer have to +offer offer default constructors, but if no default constructor is available +then the option tt(--no-default-action-return) is required. + + When polymorphic type-names refer to types not yet declared by the +parser's base class header, then these types must be declared in a header file +whose location is specified through the tt(%baseclass-preinclude) directive. includefile(../manual/grammar/polymorphictype.yo) diff -Nru bisonc++-4.11.00/documentation/man/options bisonc++-4.13.01/documentation/man/options --- bisonc++-4.11.00/documentation/man/options 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/man/options 2015-12-13 16:26:55.000000000 +0000 @@ -147,7 +147,7 @@ it() lsoption(implementation-header)(i)(filename)nl() tt(Filename) defines the name of the file to contain the implementation header. It defaults to the name of the generated - parser class plus the suffix tt(.ih). + parser class plus the suffix tt(.hh). The implementation header should contain all directives and declarations em(only) used by the implementations of the parser's @@ -162,7 +162,7 @@ tt(Pathname) defines the path name to the file containing the skeleton of the implementation header. t defaults to the installation-defined default path name (e.g., - tt(/usr/share/bisonc++/) plus tt(bisonc++.ih)). + tt(/usr/share/bisonc++/) plus tt(bisonc++.hh)). it() loption(insert-stype)nl() This option is only effective if the tt(debug) option (or diff -Nru bisonc++-4.11.00/documentation/manual/class/privmembers.yo bisonc++-4.13.01/documentation/manual/class/privmembers.yo --- bisonc++-4.11.00/documentation/manual/class/privmembers.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/class/privmembers.yo 2015-12-13 16:26:55.000000000 +0000 @@ -125,7 +125,7 @@ Used internally. it() bf(void print__()()):nl() Used internally. - it() bf(void print())):nl() + it() bf(void print()):nl() By default implemented inline in the tt(parser.ih) internal header file, this member calls tt(print__) to display the last received token and corrseponding matched text. The tt(print__) member is only implemented @@ -144,3 +144,4 @@ it() bf(void Base::top__+nop()()):nl() Used internally. ) + diff -Nru bisonc++-4.11.00/documentation/manual/directives/output.yo bisonc++-4.13.01/documentation/manual/directives/output.yo --- bisonc++-4.11.00/documentation/manual/directives/output.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/directives/output.yo 2015-12-13 16:26:55.000000000 +0000 @@ -12,4 +12,4 @@ it() The parser's implementation header file: tt(.ih), configurable using tt(%implementation-header) (see section ref(IHEADER)) or tt(%filenames) (see section ref(FILES)); - ) \ No newline at end of file + ) diff -Nru bisonc++-4.11.00/documentation/manual/directives/polymorphic.yo bisonc++-4.13.01/documentation/manual/directives/polymorphic.yo --- bisonc++-4.11.00/documentation/manual/directives/polymorphic.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/directives/polymorphic.yo 2015-12-13 16:26:55.000000000 +0000 @@ -1,9 +1,8 @@ Syntax: bf(%polymorphic) tt(polymorphic-specification(s)) - The tt(%polymorphic) directive results in defining and using a + The tt(%polymorphic) directive is used by bic() to define a polymorphic semantic value class, which can be used as a - (preferred) alternative to the (traditional) a tt(union) - specification. + (preferred) alternative to (traditional) tt(union) types. Refer to section ref(POLYMORPHIC) for a detailed description of the specification, characteristics, and use of polymorphic diff -Nru bisonc++-4.11.00/documentation/manual/examples/mfcalc/build bisonc++-4.13.01/documentation/manual/examples/mfcalc/build --- bisonc++-4.11.00/documentation/manual/examples/mfcalc/build 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/examples/mfcalc/build 2015-12-13 16:26:55.000000000 +0000 @@ -3,7 +3,7 @@ case $1 in (clean) rm -f parser/[pP]arse* mfcalc - cp parser/internalheader.ih parser/Parser.ih + cp parser/internalheader.hh parser/Parser.ih cp parser/parser.header parser/Parser.h ;; (mfcalc) diff -Nru bisonc++-4.11.00/documentation/manual/examples/rpnconstruct.yo bisonc++-4.13.01/documentation/manual/examples/rpnconstruct.yo --- bisonc++-4.11.00/documentation/manual/examples/rpnconstruct.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/examples/rpnconstruct.yo 2015-12-13 16:26:55.000000000 +0000 @@ -36,4 +36,4 @@ % ) - \ No newline at end of file + diff -Nru bisonc++-4.11.00/documentation/manual/grammar/code.yo bisonc++-4.13.01/documentation/manual/grammar/code.yo --- bisonc++-4.11.00/documentation/manual/grammar/code.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/code.yo 2015-12-13 16:26:55.000000000 +0000 @@ -1,32 +1,34 @@ The parser using polymorphic semantic values adds several classes to the generated files. The majority of these are class templates, defined in -tt(parserbase.h). In addition, some of the additionally implemented code is -added to the tt(parse.cc) source file. +tt(parserbase.h); some of the additionally implemented code is added to the +tt(parse.cc) source file. To minimize namespace pollution most of the additional code is contained in a namespace of its own: tt(Meta__). If the tt(%namespace) directive was used then tt(Meta__) is nested under the namespace declared by that directive. The -name tt(Meta__) hints at the fact that much of the code implementing +name tt(Meta__) provides a hint to the fact that much of the code implementing polymorphic semantic values uses template meta programming. bf(The enumeration 'enum class Tag__') -One notable exception is the enumeration tt(Tag__). It is declared outside of -tt(Meta__) (but inside the tt(%namespace) namespace, if provided) to simplify -its use. Its identifiers are the tags declared by the tt(%polymorphic) -directive. This is a strongly typed enumeration. The tt(%weak-tags) directive -can be used to declare a pre C++-11 standard tt(enum Tag__). +One notable exception to the above is the enumeration tt(Tag__). To simplify +its use it is declared outside of tt(Meta__) (but inside the tt(%namespace) +namespace, if provided). Its identifiers are the tags declared by the +tt(%polymorphic) directive. This is a strongly typed enumeration. The +tt(%weak-tags) directive can be used to declare a pre C++-11 standard `tt(enum +Tag__)'. bf(The namespace Meta__) Below, tt(DataType) refers to the semantic value's data type that is -associated with a tt(Tag__) identifier; tt(ReturnType) equals tt(DataType) if -tt(DataType) is a built-in type (like tt(int, double,) etc.), while it is -equal to tt(DataType const &) otherwise (for, e.g., class-type data types). +associated with a tt(Tag__) identifier. Furthermore, tt(ReturnType) equals +tt(DataType) if tt(DataType) is a built-in type (like tt(int, double,) etc.), +in other cases (for, e.g., class-type data types) it is equal to tt(DataType +const &) . The important elements of the namespace tt(Meta__) are: itemization( - it() The polymorphic semantic value's base class tt(Base).nl() + it() First, the polymorphic semantic value's base class tt(Base).nl() Its public interface offers the following members:nl() itemization( itt(Tag__ tag() const:) returns the semantic value type's tag. @@ -34,100 +36,128 @@ element of the type matching the tag. the data element of the type matching the tag (also see below at the description of the class tt(SType)). - itt(DataType &get() const:) accesses the (modifiable) data - element of the type matching the tag. + itt(DataType &get() const:) provides access to the (modifiable) + data element of the type matching the tag. ) - it() The semantic value classes tt(Semantic: public Base).nl() - tt(Semantic) classes are derived for each of the tag - identifiers tt(ID) declared at the tt(%polymorphic) - directive. tt(Semantic) classes contain a tt(mutable - DataType) data member. Their public interfaces offer the following - members: - itemization( - it() A default constructor; - it() A tt(Semantic(DataType const &)) constructor; - it() A tt(Semantic(DataType &&)) constructor; - it() An tt(operator ReturnType() const) conversion operator; - it() An tt(operator DataType &()t) conversion operator. - ) - tt(Semantic) objects are usually not explicitly used. Rather, - their use is implied by the actual semantic value class tt(SType) and - by several support functions (see below). - - it() De semantic value class tt(SType: public std::shared_ptr) - provides access to the various semantic value types. The tt(SType__) - class becomes the parser's tt(STYPE__) type, and explicitly accessing - tt(Semantic) should never be necessary.nl() - tt(SType)'s public interface offers the following members: - itemization( - it() Constructors: default, copy and move constructors.nl() - Since the parser's semantic value and semantic value stack is - completely controlled by the parser, and since the actual semantic - data values are unknown at construction time of the semantic value - (tt(d_val__)) and of the semantic value stack, no constructors - expecting tt(DataType) values are provided. - it() Assignment operators.nl() - The standard overloaded assignment operator (copy and move variants) - as well as copy and move assignment operators for the types declared - at the tt(%polymorphic) directive are provided. Assigning a value - using tt(operator=) allocates a tt(Semantic) object for - the tag matching the right-hand side's data type, and resets the - tt(SType)'s tt(shared_pointer) to this new tt(Semantic) - object. Be aware that this may break the default association of the - semantic value as declared by a tt(%type) directive. When breaking - the default association make sure that explicit tags are used (as in - $1), overriding the default association with the - currently active association. In most cases, however, the assignment - is not used to break the default association but simply to assign a - value to $$. By default the tt(SType)'s shared pointer is zero, and - the assignment initializes the semantic value to a value of the - proper type. Assuming a lexical scanner may return a tt(NR) token, - offering an tt(int number() const) accessor, then part of tt(expr) - rule could be: verb( - expr: - NR - { - $$ = d_scanner.number(); - } - ... + it() Second, the semantic value classes tt(Semantic: public + Base).nl() + The various tt(Semantic) classes are derived for each of the + tag identifiers tt(ID) that are declared at the tt(%polymorphic) + directive. These tt(Semantic) classes contain a tt(mutable + DataType) data member. Their public interfaces offer the following + members: + itemization( + it() Constructors accepting the same sets of arguments as + supported by its tt(DataType) data member. The arguments + passed to the tt(Semantic) constructor are perfectly forwarded + to the tt(DataType) member. E.g., if tt(DataType) supports a + default constructor, a copy constructor and/or a move + constructor then the matching tt(Semantic) class also offers a + default constructor, a constructor expecting a tt(DataType) + object, and a constructor expecting an anonymous tt(DataType) + object. + it() An tt(operator ReturnType() const) conversion operator; + it() An tt(operator DataType &()t) conversion operator. + ) + tt(Semantic) objects are usually not explicitly + used. Rather, their use is implied by the actual semantic value class + tt(SType) and by several support functions (see below). + + it() Third, the semantic value class tt(SType: public + std::shared_ptr) provides access to the various semantic value + types. The tt(SType__) class becomes the parser's tt(STYPE__) type, + and explicitly accessing tt(Semantic) should never be + necessary.nl() + tt(SType)'s public interface offers the following members: + itemization( + it() Constructors: default (available if the tt(Semantic) type + class offers a default constructor), copy and move + constructors.nl() + Since the parser's semantic value and semantic value stack is + completely controlled by the parser, and since the actual + semantic data values are unknown at construction time of the + semantic value (tt(d_val__)) and of the semantic value stack, + no constructors expecting tt(DataType) values are provided. + it() Assignment operators.nl() + The standard overloaded assignment operator (copy and move + variants) as well as copy and move assignment operators for + the types declared at the tt(%polymorphic) directive are + provided. Assigning a value using tt(operator=) allocates a + tt(Semantic) object for the tag matching the + right-hand side's data type, and resets the tt(SType)'s + tt(shared_pointer) to this new tt(Semantic) + object.nl() + Be aware that this may break the default association of the + semantic value as declared by a tt(%type) directive. When + breaking the default association make sure that explicit tags + are used (as in tt($)), overriding the default + association with the currently active association. Usually, + however, the assignment is of course not used to break the + default association but simply to assign a value to $$. By + default the tt(SType)'s shared pointer is zero, and the + assignment initializes the semantic value to a value of the + proper type.nl() + Assuming a lexical scanner may return a tt(NR) token, offering + an tt(int number() const) accessor, then part of an tt(expr) + rule could be: + verb( + expr: NR + { + $$ = d_scanner.number(); + } ... + ) + whereafter tt(expr)'s semantic value has been initialized + to a tt(Semantic). + it() tt(DataType &get())nl() + This tt(get) member returns a reference to the (modifiable) + semantic value stored inside tt(Semantic).nl() + This member checks for 0-pointers and for tt(Tag__) mismatches + between the requested and actual tt(Tag__), in that case + replacing the current tt(Semantic) object pointed to by a new + tt(Semantic) object of the type associated with the requested + tt(Tag__). However, if that type does not provide a default + constructor then a tt(runtime_error) exception is thrown + holding the description + verb( + STYPE::get: no default constructor available + ) + it() tt(ReturnType data() const)nl() + Here, tt(ReturnType) refers to the semantic value stored inside + tt(Semantic). If the type-name is a built-in type a + copy of the value is returned, otherwise a reference to a + constant object is returned;nl() + This is a (partially) em(unchecking) variant of the + corresponing tt(get) member, resulting in a em(segfault) if + used when the tt(shared_ptr) holds a 0-pointer, and throwing a + tt(std::bad_cast) in case of a mismatch between the requested + and actual tt(Tag__). + it() tt(DataType &data())nl() + This member returns a reference to the (modifiable) semantic + value stored inside tt(Semantic).nl() + This is a (partially) em(unchecking) variant of the + corresponing tt(get) member, resulting in a em(segfault) if + used when the tt(shared_ptr) holds a 0-pointer, and throwing a + tt(std::bad_cast) in case of a mismatch between the requested + and actual tt(Tag__). + it() tt(void emplace(Args &&...args))nl() + This member perfectly forwars its tt(args) arguments to the + currently stored tt(Semantic) value type, replacing its + current value by the newly constructed tt(Semantic) value. + ) + These members may explicitly be tagged, using constructions like + verb( + SS.emplace(5, 'c'); + ) + But the shorthand tt(($)) can also be used, which automatically + provides the correct tag: + verb( + (SS).emplace(5, 'c'); ) - after which tt(expr)'s semantic value has been initialized to a - tt(Semantic). - it(ReturnType get() const) returns the semantic - value stored inside tt(Semantic). If the type-name is a - built-in type a copy of the value is returned, otherwise a - reference to a constant object is returned;nl() - This member checks for 0-pointers and for tt(Tag__) mismatches - between the requested and actual tt(Tag__), throwing a - tt(std::logic_error) if found. - it(DataType &get()) returns a reference to the (modifiable) - semantic value stored inside tt(Semantic).nl() - This member checks for 0-pointers and for tt(Tag__) mismatches - between the requested and actual tt(Tag__), in that case - replacing the current tt(Semantic) object pointed to by a new - tt(Semantic) object of the requested tt(Tag__). - it(ReturnType data() const. ReturnType) refers to the semantic - value stored inside tt(Semantic). If the type-name is a - built-in type a copy of the value is returned, otherwise a - reference to a constant object is returned;nl() - This is a (partially) em(unchecking) variant of the corresponing - tt(get) member, resulting in a em(Segfault) if used when the - tt(shared_ptr) holds a 0-pointer, and throwing a - tt(std::bad_cast) in case of a mismatch between the requested and - actual tt(Tag__). - it(DataType &data()) returns a reference to the (modifiable) - semantic value stored inside tt(Semantic).nl() - This is a (partially) em(unchecking) variant of the corresponing - tt(get) member, resulting in a em(Segfault) if used when the - tt(shared_ptr) holds a 0-pointer, and throwing a - tt(std::bad_cast) in case of a mismatch between the requested and - actual tt(Tag__). - ) ) When an incorrect tag is specified (e.g., with tt(get(), -$$), or tt($1)), the generated code correctly copiles, -but the program will throw a tt(std::bad_cast) exception once the offending +$$), or tt($1)), the generated code correctly compiles, +but the program likely throws a tt(std::bad_cast) exception once the offending code is executed. bf(Additional Headers) diff -Nru bisonc++-4.11.00/documentation/manual/grammar/parser.yo bisonc++-4.13.01/documentation/manual/grammar/parser.yo --- bisonc++-4.11.00/documentation/manual/grammar/parser.yo 2015-08-28 15:19:01.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/parser.yo 2015-12-13 16:26:55.000000000 +0000 @@ -48,7 +48,7 @@ As the tt(combi) rule is not associated with a specific semantic value, its semantic value could be either tt(INT) or tt(TEXT). Irrespective of what is actually returned by tt(combi), its semantic value can be passed on to a -function (tt(process(STYPE__ const &)), responsible for the semantic value's +function (tt(process(STYPE__ const &))), responsible for the semantic value's further processing. Here are the definition of the tt(combi) non-terminal and action blocks for the tt(rule) non-terminal: verb( diff -Nru bisonc++-4.11.00/documentation/manual/grammar/poly/scanner/scanner.ih bisonc++-4.13.01/documentation/manual/grammar/poly/scanner/scanner.ih --- bisonc++-4.11.00/documentation/manual/grammar/poly/scanner/scanner.ih 2015-08-28 14:52:03.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/poly/scanner/scanner.ih 2015-12-13 16:26:55.000000000 +0000 @@ -1,7 +1,7 @@ #include "scanner.h" #include "../parser/parserbase.h" -// end of scanner.ih +// end of scanner.hh diff -Nru bisonc++-4.11.00/documentation/manual/grammar/polymorphicdirective.yo bisonc++-4.13.01/documentation/manual/grammar/polymorphicdirective.yo --- bisonc++-4.11.00/documentation/manual/grammar/polymorphicdirective.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/polymorphicdirective.yo 2015-12-13 16:26:55.000000000 +0000 @@ -1,8 +1,9 @@ - The tt(%polymorphic) directive results in bic() generating a parser using -polymorphic semantic values. Each semantic value specification consists of a -em(tag), which is a bf(C++) identifier, and a bf(C++) type definition. + When encountering the tt(%polymorphic) directive bic() generates a parser +that uses polymorphic semantic values. Each semantic value specification +consists of a em(tag), which is a bf(C++) identifier, and a bf(C++) type +definition. -Tags and type definitions are separated from each other by a colon, and +Tags and type definitions are separated by colons, and multiple semantic values specifications are separated by semicolons. The semicolon trailing the final semantic value specification is optional. @@ -19,10 +20,12 @@ The identifier to the left of the colon is called the em(type-identifier), and the type definition to the right of the colon is called the em(type-definition). Types specified at the tt(%polymorphic) type-definitions -must be built-in types or class-type declarations. Class types mentioned at -the tt(%polymorphic) directive must offer default constructors. +must be built-in types or class-type declarations. Since bic() version 4.12.00 +the types no longer have to offer offer default constructors, but if no +default constructor is available then the option +tt(--no-default-action-return) is required. - If type declarations refer to types declared in header files that were -not already included by the parser's base class header, then these header -file(s) must be inserted using the tt(%baseclass-preinclude) directive as + When polymorphic type-names refer to types not yet declared by the +parser's base class header, then these types must be declared in a header file +whose location is specified through the tt(%baseclass-preinclude) directive as these types are referred to in the generated tt(parserbase.h) header file. diff -Nru bisonc++-4.11.00/documentation/manual/grammar/polymorphictype.yo bisonc++-4.13.01/documentation/manual/grammar/polymorphictype.yo --- bisonc++-4.11.00/documentation/manual/grammar/polymorphictype.yo 2015-08-29 08:48:46.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/polymorphictype.yo 2015-12-13 16:26:55.000000000 +0000 @@ -1,7 +1,7 @@ The tt(%type) directive is used to associate (non-)terminals with semantic value types. -Non-terminals may automatically be associated with polymorphic semantic +Non-terminals may be associated with polymorphic semantic values using tt(%type) directives. E.g., after: verb( %polymorphic INT: int; TEXT: std::string @@ -16,10 +16,11 @@ $$ = $1 + $3; } ) - automatically associates $$, $1 and $3 with tt(int) values. $$ is an + automatically associates $$, $1 and $3 with tt(int) values. Here $$ is an lvalue (representing the semantic value associated with the tt(expr:) rule), -while $1 and $3 represent the tt(int) semantic value associated with the -tt(expr) non-terminal in the production rule tt('-' expr) (rvalues). +while $1 and $3 represent, because of the tt(%type) specification, tt(int) +semantic values which are associated with, resp., the first and second +tt(expr) non-terminal in the production rule tt(expr '+' expr). When negative dollar indices (like $-1) are used, pre-defined associations between non-terminals and semantic types are ignored. With positive indices @@ -56,7 +57,7 @@ includefile(polytable) includefile(polytablenotes) -bf(Member calls) (`$$.', `$1.', etc.):) +bf(Member calls) (`$$.', `$1.', `($$)', `($1)', etc.):) When using `$$.' or `$1.' default tags are ignored. A warning is issued that the default tag is ignored. This syntax allows members of the semantic @@ -64,7 +65,10 @@ ignored if there are no additional characters (e.g., blanks, closing parentheses) between the dollar-expressions and the member selector operator (e.g., no tags are used with $1.member(), but tags are used with -($1).member()). The opposite, overriding default tag associations, is +tt(($1).member())). In fact, notations like tt(($$), ($1)), etc. are synonym +to using tt($$.get(), $1.get()) + +The opposite, overriding default tag associations, is accomplished using constructions like $$ and $1. When negative dollar indices are used, the appropriate tag must explicitly be @@ -81,7 +85,7 @@ arg: { - call($-1->get()); + call($-1.get()); } ; ) @@ -116,14 +120,14 @@ case it is the lexical scanner's responsibility to assign a properly typed value to the parser's tt(STYPE__ d_val__) data member. When the lexical scanner receives a pointer to the parser's tt(d_val__) data member (using, -e.g., a member tt(setSval(STYPE__ *dval)) +e.g., a member tt(setSval(STYPE__ *dval))) IFDEF(manual)((cf. section ref(PRIVDATA)))(), then the lecical scanner must use em(tagged assignment) as shown in the above example to reach the different polymorphic types. The lexical scanner, having defined a tt(Parser::STYPE__ *d_val) data member could then use statements like verb( - d_val->get() = stoi(matched()); + d_val.get() = stoi(matched()); ) to assign an tt(int) value to the parser's semantic value, which is then immediately available when the lexical scanner's tt(lex) function diff -Nru bisonc++-4.11.00/documentation/manual/grammar/polymorphic.yo bisonc++-4.13.01/documentation/manual/grammar/polymorphic.yo --- bisonc++-4.11.00/documentation/manual/grammar/polymorphic.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/grammar/polymorphic.yo 2015-12-13 16:26:55.000000000 +0000 @@ -1,7 +1,7 @@ -Bic() may generate code using polymorphic semantic values. The approach -discussed here is a direct result of a suggestion originally made by Dallas -A. Clement in September 2007. All sources of the example discussed in this -section can be retrieved from the lurl(poly) directory. +Bic() may define polymorphic semantic values. The approach discussed here is a +direct result of a suggestion originally made by Dallas A. Clement in +September 2007. All sources of the example discussed in this section can be +retrieved from the lurl(poly) directory. One may wonder why a tt(union) is still used by b() as bf(C++) offers inherently superior approaches to combine multiple types in one type. The @@ -11,14 +11,13 @@ bf(bison++); dropping the tt(union) would needlessly impede backward compatibility. -The (preferred) alternative to using a tt(union), however, is using a -polymorphic base class. Although it is possible to define your own polymorphic -semantic value classes, bic() makes life easy by offering the tt(%polymorphic) -directive. +The (preferred) alternative to a tt(union), however, is a polymorphic base +class. Although it is possible to define your own polymorphic semantic value +classes, bic() makes life easy by offering the tt(%polymorphic) directive. The example program (cf. lurl(poly)) implements a polymorphic base class, and derived classes containing either an tt(int) or a tt(std::string) semantic -value. These types are asociated with tags (resp. tt(INT) and tt(TEXT) using +value. These types are asociated with tags (resp. tt(INT) and tt(TEXT)) using the tt(%polymorphic) directive, which is discussed next. diff -Nru bisonc++-4.11.00/documentation/manual/invoking/options.yo bisonc++-4.13.01/documentation/manual/invoking/options.yo --- bisonc++-4.11.00/documentation/manual/invoking/options.yo 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/manual/invoking/options.yo 2015-12-13 16:26:55.000000000 +0000 @@ -210,6 +210,13 @@ functions which are called from the rules's actions have not yet been impleemented. + it() loption(no-default-action-return) (soption(N))nl() + Do not use the default tt($$ = $1) assignment of semantic values + when returning from an action block. When this option is specified + then bic() generates a warning for typed rules (non-terminals) + whose action blocks do not provide an explicit tt($$) return + value. + it() loption(no-lines)nl() Do not put tt(#line) preprocessor directives in the file containing the parser's tt(parse) function. By default the file containing diff -Nru bisonc++-4.11.00/documentation/regression/fun/parser/_setfunction.cc bisonc++-4.13.01/documentation/regression/fun/parser/_setfunction.cc --- bisonc++-4.11.00/documentation/regression/fun/parser/_setfunction.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/regression/fun/parser/_setfunction.cc 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -//#include "parser.ih" +//#include "parser.hh" // //RuleValue Parser::setFunction() //{ diff -Nru bisonc++-4.11.00/documentation/regression/fun/parser/_variable.cc bisonc++-4.13.01/documentation/regression/fun/parser/_variable.cc --- bisonc++-4.11.00/documentation/regression/fun/parser/_variable.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/regression/fun/parser/_variable.cc 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -// #include "parser.ih" +// #include "parser.hh" // // RuleValue Parser::variable() // { diff -Nru bisonc++-4.11.00/documentation/regression/run bisonc++-4.13.01/documentation/regression/run --- bisonc++-4.11.00/documentation/regression/run 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/regression/run 2015-12-13 16:26:55.000000000 +0000 @@ -3,18 +3,18 @@ # Modifiy the COMMAND variable to your taste, if your shell isn't # mentioned. By specifying your COMMAND-shell last it will be used; COMMAND="/usr/bin/tcsh -f" -COMMAND=/bin/bash +#COMMAND=/bin/bash # Assuming bisonc++ is in your computer's search-path. If not, define # BISONCPP as the full path to bisconc++: -BISONCPP=/home/frank/git/bisonc++/src/bisonc++/tmp/bin/binary +#BISONCPP=/home/frank/git/bisonc++/src/bisonc++/tmp/bin/binary BISONCPP=bisonc++ # UNCOMMENT the following variables if you want to run the examples from # the source distribution's documentation/regression directory rather than # from bisonc++ documentation's `regression' subdirectory. -# SKEL=../../../../skeletons -# BISONCPP="../../../../tmp/bin/bisonc++ -S ${SKEL}" +SKEL=../../../../skeletons +BISONCPP="../../../../tmp/bin/binary -S ${SKEL}" example() { diff -Nru bisonc++-4.11.00/documentation/regression/simplecalc/parser/parser.h bisonc++-4.13.01/documentation/regression/simplecalc/parser/parser.h --- bisonc++-4.11.00/documentation/regression/simplecalc/parser/parser.h 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/regression/simplecalc/parser/parser.h 2015-12-13 16:26:55.000000000 +0000 @@ -30,6 +30,7 @@ int lookup(bool recovery); void nextToken(); void print__(); + void exceptionHandler__(std::exception const &exc); }; inline void Parser::error(char const *msg) diff -Nru bisonc++-4.11.00/documentation/regression/simplecalc/parser/parser.ih bisonc++-4.13.01/documentation/regression/simplecalc/parser/parser.ih --- bisonc++-4.11.00/documentation/regression/simplecalc/parser/parser.ih 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/documentation/regression/simplecalc/parser/parser.ih 2015-12-13 16:26:55.000000000 +0000 @@ -14,3 +14,7 @@ // symbols from the namespace std without specifying std:: //using namespace std; +inline void Parser::exceptionHandler__(std::exception const &exc) +{ + throw; +} diff -Nru bisonc++-4.11.00/generator/data.cc bisonc++-4.13.01/generator/data.cc --- bisonc++-4.11.00/generator/data.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/generator/data.cc 2015-12-13 16:26:55.000000000 +0000 @@ -15,6 +15,7 @@ {"debugfunctions", &Generator::debugFunctions}, {"debugincludes", &Generator::debugIncludes}, {"debuglookup", &Generator::debugLookup}, + {"defaultactionreturn", &Generator::defaultActionReturn}, {"errorverbose", &Generator::errorVerbose}, {"namespace-open", &Generator::namespaceOpen}, {"namespace-close", &Generator::namespaceClose}, diff -Nru bisonc++-4.11.00/generator/defaultactionreturn.cc bisonc++-4.13.01/generator/defaultactionreturn.cc --- bisonc++-4.11.00/generator/defaultactionreturn.cc 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/generator/defaultactionreturn.cc 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,14 @@ +#include "generator.ih" + +void Generator::defaultActionReturn(ostream &out) const +{ + if (d_arg.option('N')) + return; + + key(out); + + out << + " // save default non-nested block $$\n" + " if (int size = s_productionInfo[production].d_size)\n" + " d_val__ = d_vsp__[1 - size];\n"; +} diff -Nru bisonc++-4.11.00/generator/generator.h bisonc++-4.13.01/generator/generator.h --- bisonc++-4.11.00/generator/generator.h 2015-08-30 12:05:10.000000000 +0000 +++ bisonc++-4.13.01/generator/generator.h 2015-12-13 16:26:55.000000000 +0000 @@ -97,6 +97,7 @@ void debugInit(std::ostream &out) const; void debugDecl(std::ostream &out) const; void debugLookup(std::ostream &out) const; + void defaultActionReturn(std::ostream &out) const; void errorVerbose(std::ostream &out) const; void lex(std::ostream &out) const; void ltype(std::ostream &out) const; diff -Nru bisonc++-4.11.00/icmake/adddir bisonc++-4.13.01/icmake/adddir --- bisonc++-4.11.00/icmake/adddir 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/adddir 2015-12-13 16:26:55.000000000 +0000 @@ -5,7 +5,7 @@ int keep = 1; string elem; - for (idx = sizeof(dir); idx--; ) + for (idx = listlen(dir); idx--; ) { elem = dir[idx]; diff -Nru bisonc++-4.11.00/icmake/backtick bisonc++-4.13.01/icmake/backtick --- bisonc++-4.11.00/icmake/backtick 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/backtick 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,10 @@ +list backtick(string arg) +{ + list ret; + + echo(OFF); + ret = `arg`; + echo(g_echo); + return ret; +} + diff -Nru bisonc++-4.11.00/icmake/clean bisonc++-4.13.01/icmake/clean --- bisonc++-4.11.00/icmake/clean 2015-08-28 16:07:15.000000000 +0000 +++ bisonc++-4.13.01/icmake/clean 2015-12-13 16:26:55.000000000 +0000 @@ -10,7 +10,7 @@ if (dist) - run("rm -rf tmp"); + run("rm -rf tmp bisonc++.ih.gch */*.ih.gch" ); chdir("documentation"); diff -Nru bisonc++-4.11.00/icmake/cuteoln bisonc++-4.13.01/icmake/cuteoln --- bisonc++-4.11.00/icmake/cuteoln 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/cuteoln 2015-12-18 09:29:58.000000000 +0000 @@ -0,0 +1,4 @@ +string cutEoln(string text) +{ + return resize(text, strlen(text) - 1); +} diff -Nru bisonc++-4.11.00/icmake/destinstall bisonc++-4.13.01/icmake/destinstall --- bisonc++-4.11.00/icmake/destinstall 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/destinstall 2015-12-18 09:19:13.000000000 +0000 @@ -0,0 +1,5 @@ +void destInstall(string dest, string base) +{ + chdir(g_cwd + base); // go to the base directory + run(g_cwd + "icmake/installer " + dest + "/ "); // install the files +} diff -Nru bisonc++-4.11.00/icmake/findall bisonc++-4.13.01/icmake/findall --- bisonc++-4.11.00/icmake/findall 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/findall 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,26 @@ +// assuming we're in g_cwd, all entries of type 'type' matching source/pattern +// are returned w/o final \n + +list findAll(string type, string source, string pattern) +{ + string cmd; + list entries; + list ret; + int idx; + + chdir(source); + + cmd = "find ./ -mindepth 1 -maxdepth 1 -type " + type; + + if (pattern != "") + pattern = "-name '" + pattern + "'"; + + entries = backtick(cmd + " " + pattern + " -printf \"%f\\n\""); + + for (idx = listlen(entries); idx--; ) + ret += (list)cutEoln(entries[idx]); + + chdir(g_cwd); + + return ret; +} diff -Nru bisonc++-4.11.00/icmake/install bisonc++-4.13.01/icmake/install --- bisonc++-4.11.00/icmake/install 2015-08-30 11:15:55.000000000 +0000 +++ bisonc++-4.13.01/icmake/install 2015-12-18 09:28:51.000000000 +0000 @@ -1,133 +1,138 @@ -string setWhere(string where, string defaultWhere) -{ - if (where == "") - where = defaultWhere; - - md(where); - return where; -} -void install(string what, string where) +void install(string request, string dest) { - list files; - int idx; + string target; + int components = 0; + list pathsplit; string base; - string dest; + base = "tmp/install/"; - if (what == "program") - { - if (where == "") - where = BINARY; + md(base); - // 'where' exists, but is no regular file - if (exists(where) && ((int)stat(where)[0] & S_IFREG) == 0) - { - printf("'build install program path': path must be a " - "regular file\n"); - exit(0); - } + if (request == "x") + components = 63; + else + { + if (strfind(request, "a") != -1) // additional documentation + components |= 1; + if (strfind(request, "b") != -1) // binary program + components |= 2; + if (strfind(request, "d") != -1) // standard documentation + components |= 4; + if (strfind(request, "m") != -1) // man-pages + components |= 8; + if (strfind(request, "s") != -1) // skeleton + components |= 16; + if (strfind(request, "u") != -1) // user guide + components |= 32; + } - md(get_path(where)); + chdir(g_cwd); // determine the destination path + if (dest == "") + dest = "/"; + else + md(dest); - printf(" INSTALLING the executable `", where, "'\n"); - run("icmbuild install program " + where); + dest = cutEoln(backtick("readlink -f " + dest)[0]); - log(where); + if (g_logPath != "") + backtick("icmake/log " + dest + " " + g_logPath); - writeLog(); // exits - } - if (what == "skel") + if (components & 1) { - where = setWhere(where, SKEL); + printf("\n installing additional documentation\n"); - printf(" INSTALLING skeleton files at `" + where + "'\n"); + target = base + "a/" ADD + "/bison-docs/"; + printf(" installing original bison's docs below `", target + "'\n"); + logRecursive("documentation/html", target); - run("cp skeletons/* " + where); - logFiles("skeletons", where); + target = base + "a/" ADD + "/examples/"; + printf(" installing examples below `", target + "'\n"); + logRecursive("documentation/examples", target); - writeLog(); - } + logRecursive("documentation/man/calculator", target + "/calculator/"); - if (what == "man") - { - where = setWhere(where, MAN); + printf(" installing regression tests below `", target + "'\n"); + logRecursive("documentation/regression", target + "/regression/"); + + printf(" installing polymorphic semval demo at `", + target + "poly/'\n"); + logRecursive("tmp/manual/poly", target + "poly/"); - printf(" INSTALLING the manual page in `", where, "'\n"); - dest = where + "/" PROGRAM ".1.gz"; + printf(" installing polymorphic impl. demo at `", + target + "/essence/'\n"); + logRecursive("tmp/manual/essence", target + "/essence/"); - run("gzip -9 -n < tmp/man/" PROGRAM ".1 > " + dest); - log(dest); + chdir(base); // go to the base directory - writeLog(); + destInstall(dest, base + "a"); } - if (what == "manual") + if (components & 2) { - base = setWhere(where, MANUAL); + target = base + "b/" BINARY; + pathsplit = path_file(target); - logDirs("tmp/manual", base); - printf(" INSTALLING the manual below `", base, "'\n"); - run("cp -r tmp/manual/* " + base); - logFiles("tmp/manual", base); + printf(" installing the executable `", target, "'\n"); + logFile("tmp/bin", "binary", pathsplit[0], pathsplit[1]); - writeLog(); + destInstall(dest, base + "b"); } - if (what == "std") + + if (components & (4 | 8)) { - base = setWhere(where, STD); + target = base + "d/" DOC "/"; + if (components & 4) + { + printf(" installing the changelog at `", target, "\n"); + logZip("", "changelog", target ); - printf(" INSTALLING the changelog at `", base, "\n"); - dest = base + "/changelog.gz"; - run("gzip -9 -n < changelog > " + dest); - log(dest); - - printf(" INSTALLING the html-manual page at `", base, "\n"); - run("cp tmp/manhtml/" PROGRAM "man.html " + base); - log(base + "/" PROGRAM "man.html"); + destInstall(dest, base + "d"); + } - writeLog(); + if (components & 8) + { + printf(" installing the html-manual pages at `", target, "\n"); + logInstall("tmp/manhtml", "", target); + + destInstall(dest, base + "d"); + } } - if (what == "extra") + + if (components & 8) { - where = setWhere(where, EXTRA); + target = base + "m/" MAN "/"; + printf(" installing the manual pages below `", target, "'\n"); + + logZip("tmp/man", "bisonc++.1", target); - base = where + "/bison-docs"; + destInstall(dest, base + "m"); + } - printf(" INSTALLING original bison's docs below `", base + "'\n"); + if (components & 16) + { + target = base + "s/" SKEL "/"; + printf(" installing skeleton files at `" + target + "'\n"); + logInstall("skeletons", "", target); - logDirs("documentation/html", base + "/html"); - run("cp -r documentation/html " + base); - logFiles("documentation/html", base + "/html"); + destInstall(dest, base + "s"); + } - where += "/examples"; - printf(" INSTALLING examples below `", where + "'\n"); - logDirs("documentation/examples", where); - run("cp -r documentation/examples/* " + where); - logFiles("documentation/examples", where); + if (components & 32) + { + target = base + "u/" UGUIDE "/"; + printf(" installing the user-guide at `", target, "'\n"); + logInstall("tmp/manual", "", target); - base = where + "/calculator"; - md(base); - logDirs("documentation/man/calculator", base); - run("cp -r documentation/man/calculator/* " + base); - logFiles("documentation/man/calculator", base); + destInstall(dest, base + "u"); + } - base = where + "/regression"; - printf(" INSTALLING regression tests below `", base + "'\n"); - md(base); - logDirs("documentation/regression", base); - run("cp -r documentation/regression/* " + base); - logFiles("documentation/regression", base); - writeLog(); - } + printf("\n Installation completed\n"); exit(0); } - - - - diff -Nru bisonc++-4.11.00/icmake/installer bisonc++-4.13.01/icmake/installer --- bisonc++-4.11.00/icmake/installer 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/installer 2015-12-18 08:10:56.000000000 +0000 @@ -0,0 +1,17 @@ +#!/bin/bash + +if [ $# -eq 0 ] ; then + echo destination path, ending in /, must be provided + exit 0 +fi + +for src in `find -mindepth 1 -type d` # create missing target dirs +do + [ ! -e $1$src ] && mkdir -p $1$src +done + +for file in `find -type f -or -type l` +do + cp -d --preserve=timestamps $file $1$file +done + diff -Nru bisonc++-4.11.00/icmake/log bisonc++-4.13.01/icmake/log --- bisonc++-4.11.00/icmake/log 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/log 2015-12-13 16:26:55.000000000 +0000 @@ -1,16 +1,9 @@ -void log(string file) -{ - string md5; +#!/bin/bash - if (g_logPath == "") // do not store uninstall info - return; - - echo(OFF); - file = `"realpath " + file`[0]; - file = substr(file, 0, strlen(file) - 1); - md5 = md5sum(file); - echo(ON); - - g_log += (list)("file " + md5 + " " + file); -} +find tmp/install -type f -exec md5sum "{}" \; | + sed 's|tmp/install|'$1'|' > $2 +find tmp/install -type l -exec printf "link %s\n" "{}" \; | + sed 's|tmp/install|'$1'|' >> $2 +find tmp/install -type d -exec printf "dir %s\n" "{}" \; | + sed 's|tmp/install|'$1'|' >> $2 diff -Nru bisonc++-4.11.00/icmake/logdirs bisonc++-4.13.01/icmake/logdirs --- bisonc++-4.11.00/icmake/logdirs 2015-08-29 11:48:21.000000000 +0000 +++ bisonc++-4.13.01/icmake/logdirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,15 +0,0 @@ -void logDirs(string source, string dest) -{ - list files; - int idx; - - echo(OFF); - - files = `"(chdir " + source + ";find ./ -type d)"`; - - for (idx = sizeof(files); idx--; ) - { - echo(OFF); - md(dest + "/" + files[idx]); - } -} diff -Nru bisonc++-4.11.00/icmake/logfile bisonc++-4.13.01/icmake/logfile --- bisonc++-4.11.00/icmake/logfile 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/logfile 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,7 @@ +void logFile(string srcdir, string src, string destdir, string dest) +{ + chdir(g_cwd); + md(destdir); + + run("cp " + srcdir + "/" + src + " " + destdir + "/" + dest); +} diff -Nru bisonc++-4.11.00/icmake/logfiles bisonc++-4.13.01/icmake/logfiles --- bisonc++-4.11.00/icmake/logfiles 2015-08-29 11:48:21.000000000 +0000 +++ bisonc++-4.13.01/icmake/logfiles 2015-12-13 16:26:55.000000000 +0000 @@ -6,6 +6,6 @@ echo(OFF); files = `"(chdir " + source + ";find ./ -type f)"`; - for (idx = sizeof(files); idx--; ) + for (idx = listlen(files); idx--; ) log(dest + "/" + files[idx]); } diff -Nru bisonc++-4.11.00/icmake/loginstall bisonc++-4.13.01/icmake/loginstall --- bisonc++-4.11.00/icmake/loginstall 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/loginstall 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,39 @@ +// source and dest, absolute or reachable from g_cwd, should exist. +// files and links in source matching dest (if empty: all) are copied to dest +// and are logged in g_log + +// Before they are logged, dest is created + +void logInstall(string src, string pattern, string dest) +{ + list entries; + int idx; + + chdir(g_cwd); + + md(dest); + src += "/"; + dest += "/"; + + if (listlen(makelist(O_DIR, src)) == 0) + { + printf("Warning: ", src, " not found: can't install ", src, pattern, + " at ", dest, "\n"); + return; + } + + entries = findAll("f", src, pattern); + + for (idx = listlen(entries); idx--; ) + run("cp " + src + entries[idx] + " " + dest); + + chdir(g_cwd); + entries = findAll("l", src, pattern); + + for (idx = listlen(entries); idx--; ) + run("cp " CPOPTS " " + src + entries[idx] + " " + dest); +} + + + + diff -Nru bisonc++-4.11.00/icmake/logrecursive bisonc++-4.13.01/icmake/logrecursive --- bisonc++-4.11.00/icmake/logrecursive 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/logrecursive 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,30 @@ +// log recursively all files and directories in src as entries in dest +// dest is created if necessary + +void logRecursive(string src, string dest) +{ + list dirs; + string next; + int idx; + + chdir(g_cwd); + + if (!exists(src)) + { + printf("skipping unavailable directory `", src, "'\n"); + return; + } + + dirs = findAll("d", src, ""); // find all subdirs + + for (idx = listlen(dirs); idx--; ) // visit all subdirs + { + next = "/" + dirs[idx]; + logRecursive(src + next, dest + next); + } + logInstall(src, "", dest); +} + + + + diff -Nru bisonc++-4.11.00/icmake/logzip bisonc++-4.13.01/icmake/logzip --- bisonc++-4.11.00/icmake/logzip 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/logzip 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,45 @@ +// names may be a series of files in src, not a wildcard. +// if it's empty then all files in src are used. +// the files are gzipped and logged in dest. +// src and dest do not have to end in / + +void logZip(string src, string names, string dest) +{ + list files; + int idx; + string file; + + chdir(g_cwd); + + md(dest); + dest += "/"; + + if (src != "") + { + if (listlen(makelist(O_DIR, src)) == 0) + { + printf("Warning: ", src, " not found: can't install ", src, names, + " at ", dest, "\n"); + return; + } + chdir(src); + } + + if (names == "") + files = makelist("*"); + else + files = strtok(names, " "); + + for (idx = listlen(files); idx--; ) + { + file = files[idx]; + run("gzip -n -9 < " + file + " > " + file + ".gz"); + } + + run("tar cf - *.gz | (cd " + g_cwd + "; cd " + dest + "; tar xf -)"); + + run("rm *.gz"); +} + + + diff -Nru bisonc++-4.11.00/icmake/md bisonc++-4.13.01/icmake/md --- bisonc++-4.11.00/icmake/md 2015-08-29 10:02:10.000000000 +0000 +++ bisonc++-4.13.01/icmake/md 2015-12-13 16:26:55.000000000 +0000 @@ -10,19 +10,16 @@ list paths; string dir; - paths = strtok(target, " "); - - for (idx = sizeof(paths); idx--; ) + if (!exists(target)) + run("mkdir -p " + target); + else if (((int)stat(target)[0] & S_IFDIR) == 0) { - dir = paths[idx]; - if (!exists(dir)) - { - run("mkdir -p " + dir); - echo(OFF); - target = `"realpath " + dir`[0]; - echo(ON); - target = substr(target, 0, strlen(target) - 1); - g_log += (list)("dir " + target); // log new dirs - } + printf(target + " exists, but is not a directory\n"); + exit(1); } } + + + + + diff -Nru bisonc++-4.11.00/icmake/md5sum bisonc++-4.13.01/icmake/md5sum --- bisonc++-4.11.00/icmake/md5sum 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/md5sum 1970-01-01 00:00:00.000000000 +0000 @@ -1,8 +0,0 @@ -string md5sum(string file) -{ - string ret; - echo(OFF); - ret = strtok(`"md5sum " + file`[0], " \t")[0]; - echo(ON); -} - diff -Nru bisonc++-4.11.00/icmake/pathfile bisonc++-4.13.01/icmake/pathfile --- bisonc++-4.11.00/icmake/pathfile 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/pathfile 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,21 @@ +list path_file(string path) +{ + list ret; + int len; + int idx; + + for (len = strlen(path), idx = len; idx--; ) + { + if (path[idx] == "/") + { + ret = + (list)substr(path, 0, idx) + (list)substr(path, idx + 1, len); + return ret; + } + } + + ret = (list)"" + (list)path; + return ret; +} + + diff -Nru bisonc++-4.11.00/icmake/precompileheaders bisonc++-4.13.01/icmake/precompileheaders --- bisonc++-4.11.00/icmake/precompileheaders 1970-01-01 00:00:00.000000000 +0000 +++ bisonc++-4.13.01/icmake/precompileheaders 2015-12-13 16:26:55.000000000 +0000 @@ -0,0 +1,43 @@ +string g_compiler; +int g_gch = 1; + +void _precompile(string class) +{ + string classIH; + + classIH = class + ".ih"; + if (classIH younger class + ".ih.gch") + run(g_compiler + " -x c++-header " + classIH); +} + +void precompileHeaders() +{ + int idx; + list classes; + string class; + + if (!g_gch) + return; + + classes = makelist(O_SUBDIR, "*"); + + + g_compiler = setOpt(CXX, "CXX") + " " + + setOpt(CXXFLAGS, "CXXFLAGS") + " "; + + + _precompile("main"); // precompile the main program .ih file + + + for (idx = listlen(classes); idx--; ) + { + class = classes[idx]; + + chdir(class); + + _precompile(class); + + chdir(g_cwd); + } +} + diff -Nru bisonc++-4.11.00/icmake/readlog bisonc++-4.13.01/icmake/readlog --- bisonc++-4.11.00/icmake/readlog 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/readlog 1970-01-01 00:00:00.000000000 +0000 @@ -1,10 +0,0 @@ -void readlog() -{ - list line; - - while (line = fgets(g_logPath, (int)line[1])) - g_log += strtok(line[0], "\n"); // add logfile entries w/o \n -} - - - diff -Nru bisonc++-4.11.00/icmake/remove bisonc++-4.13.01/icmake/remove --- bisonc++-4.11.00/icmake/remove 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/remove 2015-12-13 16:26:55.000000000 +0000 @@ -1,13 +1,40 @@ -void remove(list entry) -{ - int equal; +#!/bin/bash - equal = md5sum(entry[2]) == entry[1]; +g_echo=$2 - echo(OFF); +rm_f() +{ + [ $g_echo -ne 0 ] && echo rm $1 + rm -f $1 +} - if (equal) - run("rm " + entry[2]); - else - printf("not removing modified file ", entry[2], "\n"); +rm_dir() +{ + [ $g_echo -ne 0 ] && echo rmdir $1 + rmdir --ignore-fail-on-non-empty -p $1 } + + +IFS=" +" + +for line in `cat $1` +do + field1=`echo $line | awk '{printf $1}'` + field2=`echo $line | awk '{printf $2}'` + + if [ $field1 == "link" ] ; then + rm_f $field2 + elif [ $field1 == "dir" ] ; then + rm_dir $field2 + elif [ -e "$field2" ] ; then + if [ "$field1" != "`md5sum $field2 | awk '{printf $1}'`" ] ; then + echo $field2 changed, not removed + else + rm_f $field2 + fi + fi +done + +rm_f $1 + diff -Nru bisonc++-4.11.00/icmake/removedir bisonc++-4.13.01/icmake/removedir --- bisonc++-4.11.00/icmake/removedir 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/removedir 1970-01-01 00:00:00.000000000 +0000 @@ -1,32 +0,0 @@ -void removeDir(string dir) -{ - list parts; - int idx; - int dirIdx; - list entries; - int warn = 1; - - parts = strtok(dir, "/"); - chdir(dir); - - echo(OFF); - - for (idx = sizeof(parts); idx--; ) - { - entries = `"ls -A"`; - - if (sizeof(entries) != 0) - { - if (warn) - printf("not removing non-empty dir ", dir, "\n"); - return; - } - - warn = 0; - chdir(".."); - run("rmdir " + parts[idx]); - } -} - - - diff -Nru bisonc++-4.11.00/icmake/run bisonc++-4.13.01/icmake/run --- bisonc++-4.11.00/icmake/run 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/icmake/run 2015-12-13 16:26:55.000000000 +0000 @@ -1,15 +1,8 @@ -int g_dryrun = setOpt("", "DRYRUN") != ""; - -void runP(int testValue, string cmd) -{ - if (g_dryrun) - printf(cmd, "\n"); - else - system(testValue, cmd); -} - void run(string cmd) { - runP(0, cmd); + if (g_echo == OFF) + cmd += "> /dev/null 2>&1"; + + system(0, cmd); } diff -Nru bisonc++-4.11.00/icmake/special bisonc++-4.13.01/icmake/special --- bisonc++-4.11.00/icmake/special 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/icmake/special 2015-12-13 16:26:55.000000000 +0000 @@ -1,11 +1,7 @@ -string g_skel; - void special() { - g_skel = setOpt(SKEL, "SKEL"); - if ("INSTALL.im" newer "options/SKEL") - run("echo \"#define _Skel_ \\\"" + g_skel + "\\\"\" > options/SKEL"); + run("echo \"#define _Skel_ \\\"" SKEL + "\\\"\" > options/SKEL"); if (! exists("release.yo") || "VERSION" newer "release.yo") { diff -Nru bisonc++-4.11.00/icmake/uninstall bisonc++-4.13.01/icmake/uninstall --- bisonc++-4.11.00/icmake/uninstall 2015-08-30 11:21:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/uninstall 2015-12-13 16:26:55.000000000 +0000 @@ -1,36 +1,24 @@ -void uninstall() +void uninstall(string logfile) { - string key; int idx; list entry; - list dir; + string dir; + list line; - if (g_logPath == "") // do not store uninstall info + if (!exists(logfile)) { - printf(LOGENV " environment variable not available\n"); + printf("installation log file " + logfile + " not found\n"); exit(0); } - readlog(); + run("icmake/remove " + logfile + " " + (string)g_echo); + + exit(0); +} - echo(OFF); - for (idx = sizeof(g_log); idx--; ) // separate dir from file - { - entry = strtok(g_log[idx], " \n"); - if (entry[0] == "dir") - dir = addDir(dir, entry[1]); - else if (entry[0] == "file") - remove(entry); - } - for (idx = sizeof(dir); idx--; ) - removeDir(dir[idx]); - echo(ON); - run("rm " + g_logPath); - exit(0); -} diff -Nru bisonc++-4.11.00/icmake/writelog bisonc++-4.13.01/icmake/writelog --- bisonc++-4.11.00/icmake/writelog 2015-08-29 08:10:22.000000000 +0000 +++ bisonc++-4.13.01/icmake/writelog 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -void writeLog() -{ - int idx; - - if (g_logPath == "") // do not store uninstall info - return; - - for (idx = sizeof(g_log); idx--; ) - fprintf(g_logPath, g_log[idx], "\n"); - - exit(0); -} - - - - diff -Nru bisonc++-4.11.00/INSTALL bisonc++-4.13.01/INSTALL --- bisonc++-4.11.00/INSTALL 2015-08-30 09:04:36.000000000 +0000 +++ bisonc++-4.13.01/INSTALL 2015-12-13 16:26:55.000000000 +0000 @@ -3,112 +3,103 @@ 0. Bisonc++ and its construction depends, in addition to the normally standard available system software on specific software and versions - which is documented in the file `required'. + which is documented in the file `required', in particular the Bobcat + library. (If you compile the bobcat library yourself, note that bisonc++ does not use the SSL, Milter and Xpointer classes; they may --as far as bisonc++ is concerned-- be left out of the library) - 1. It is expected you use icmake for the package construction. For this a - top-level script (build) and support scripts in the ./icmake/ - directory are available. Icmake is available on a great many - architectures. See also the file INSTALL.im for additional details. - - 2. Inspect the values of the variables in the file INSTALL.im Modify these - when necessary. The default skeleton filenames are compiled into - bisonc++ through the definitions in options/data.cc + 1. To install bobcat icmake should be used, for which a top-level script + (build) and support scripts in the ./icmake/ directory are + available. Icmake is available on many architectures. + + 2. Inspect the values of the variables in the file INSTALL.im, in + particular the #defines below COMPONENTS TO INSTALL. Modify + these #defines when necessary. + + 3. Inspect the path to icmake at the top of the `build' script. By default + it is /usr/bin/icmake, but some installations use + /usr/local/bin/icmake Adapt when necessary. - 3. Run + 4. Run ./build program [strip] to compile bisonc++. The argument `strip' is optional and strips symbolic information from the final executable. - 4. If you installed Yodl then you can create the documentation: + 5. If you installed Yodl then you can create the documentation: ./build man builds the man-pages, and ./build manual builds the manual. - 5. Installation of the software in the default locations probably requires - root permissions. + 6. Run (probably as root) - Before installing the components of Bisonc++, consider defining the - environment variable BISONCPP, defining its value as the (preferably - absolute) filename of a file on which installed files and directories - are logged. - Defining the BISONCPP environment variable as ~/.bisoncpp usually - works well. + ./build install 'LOG:path' 'what' 'base' - To install the program, run: + to install components of Bisonc++. - ./build install program [fullpath] - - This installs bisonc++ as fullpath. By default the BINARY specification - in INSTALL.im is used. - - To install the skeleton files. run : - - ./build install skel [base] - - This installs the skeleton files under the directory `base'. By - default the SKEL specification in INSTALL.im is used. - - 6. If you created the man-pages and manual you can also do: - - ./build man [base] - - This installs the man pages under the directory `base'. By - default the MAN specification in INSTALL.im is used. - - To install the manual, do: - - ./build manual [base] - - This installs the manual in the directory `base'. By - default the MANUAL specification in INSTALL.im is used. - - 7. Optionally you can install some additional documentation by running - - ./build install std [base] - - and - - ./build install extra [base] - - The additional documentation is installed in the `base' directories. - By default the STD and EXTRA specifications in INSTALL.im are used. - - - 8. Following the installation nothing in this directory tree is required - for the proper functioning of bisonc++, so consider removing it. If - you only want to remove left-over files from the build-process, just - run + Here, + 'LOG:path' is an optional item specifying the absolute or relative + path of a log file to contain a log of all installed files (see + also the next item). Using LOG:~/.bisoncpp usually works + well. Do not put any blanks between LOG: and the path + specification, or protect the LOG: specification by quotes. + + 'what' specifies what you want to install. + Specify: + x, to install all components, + or specify a combination of: + a (additional documentation), + b (binary program), + d (standard documentation), + m (man-pages) + s (skeleton files) + u (user guide) + E.g., use + ./build install bs 'base' + if you only want to be able to run bisonc++, and want it to be + installed below 'base'. + + When requesting non-existing elements (e.g., ./build install x + was requested, but the man-pages weren't constructed) then + these non-existing elements are silently ignored by the + installation process. + + 'base' is optional and specifies the base directory below which + the requested files are installed. This base directory is + prepended to the paths #defined in the INSTALL.im file. If + 'base' is not specified, then INSTALL.im's #defined paths are + used as-is. + + 7. Uninstalling previously installed components of Bisonc++ is easy if a + log path (LOG:...) was specified at the `./build install ...' + command. In that case, run the command + + ./build uninstall logpath + + where 'logpath' specifies the location of the logfile that was + written by ./build install. Modified files and non-empty directories + are not removed, but the logfile itself is removed following the + uninstallation. + + 8. Following the installation nothing in the directory tree which contains + this file (i.e., INSTALL) is required for the proper functioning of + bisonc++, so consider removing it. If you only want to remove + left-over files from the build-process, just run ./build distclean - 9. Uninstalling previously installed components of Bisonc++ (using - ./build install ...) is easy if the environment variable BISONCPP was - defined when issuing the `./build install ...' commands. In that case, - run the command - - ./build uninstall - - This command only works if the environment variable BISONCPP has the - same value as used with the `./build install' commands, and the file - to which it refers still exists. In that case `./build install' - removes all installed files (unless they were modified) and removes - all empty directories created by the various `./build install ...' - commands. - Defining the BISONCPP environment variable as ~/.bisoncpp usually - works well. - -NOTE that parser-class header files generated by bisonc++ before version - 4.02.00 should modify the prototypes of some of their private - members. Simply replacing the `support functions for parse()' section - shown at the end of the header file by the following lines should make - your header file up-to-date again. Note that bisonc++ does not by itself - rewrite the parser class headers to prevent undoing any modifications you - may have implemented in parser-class header files: +----------------------------------------------------------------------------- +NOTE: the parser-class header file generated by bisonc++ before version + 4.02.00 should have the prototypes of some of their private members + modified. + + Simply replacing the `support functions for parse()' section shown at the + end of the header file by the following lines should make your header + file up-to-date again. Bisonc++ will not by itself rewrite the + parser class headers to prevent undoing any modifications you may have + implemented in parser-class header files: // support functions for parse(): void executeAction(int ruleNr); @@ -127,8 +118,3 @@ throw; // optionally re-implement to handle exceptions thrown // by actions } - - - - - diff -Nru bisonc++-4.11.00/INSTALL.im bisonc++-4.13.01/INSTALL.im --- bisonc++-4.11.00/INSTALL.im 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/INSTALL.im 2015-12-17 19:42:45.000000000 +0000 @@ -1,42 +1,68 @@ + // The name of the program and the support directories as installed by + // the 'build install' command. Normally there is no reason for changing + // this #define #define PROGRAM "bisonc++" - // When defined, these overrule COMPILER and COMPILER_OPTIONS - // COMPILER and COMPILER_OPTIONS are now obsolete - // Instead of CXX and CXXFLAGS, CC and CFLAGS can be used. - // Their #define values are overruled by identically named environment - // variables. + // The following /bin/cp option is used to keep, rather than follow + // symbolic references. If your installation doesn't support these flags, + // then change them into available ones. + // -P, --no-dereference + // never follow symbolic links in SOURCE + // --preserve[=ATTR_LIST] + // preserve the specified attributes (default: + // mode,ownership,timestamps), if possible additional + // attributes: context, links, all + // -d same as --no-dereference --preserve=links +#define CPOPTS "-d" + + + // The CXX, CXXFLAGS, and LDFLAGS #defines are overruled by identically + // named environment variables: -#define CXX "g++" // the compiler to use. +#define CXX "g++" -#define CXXFLAGS "--std=c++14 -Wall -O2" // the compiler options to use. +#define CXXFLAGS "--std=c++14 -Wall -O2 -fdiagnostics-color=never" #define LDFLAGS "" // flags passed to the linker -#define SKEL "/usr/share/bisonc++" - // the directory where the skeleton files are installed - // Recompile options/data.cc if the skeleton location changes +// COMPONENTS TO INSTALL +// ===================== -// ========================================================================= -// The following locations are overruled by `build' arguments + // For an operational non-Debian installation, you probably must be + // `root'. -#define BINARY "/usr/bin/"${PROGRAM} - // the full path of the final program + // If necessary, adapt the #defines below to your situation. + // The provided locations are used by Debian Linux. -#define MAN "/usr/share/man/man1" - // the directory whre the manual page is stored + // With 'build install' you can dynamically specify a location to prepend + // to the locations configured here, and select which components you want + // to install -#define MANUAL "/usr/share/doc/"${PROGRAM}"-doc/manual" - // the directory whre the manual page is stored +// ONLY USE ABSOLUTE DIRECTORY NAMES: + + // the directory where additional documentation is stored +#define ADD "/usr/share/doc/"${PROGRAM}"-doc" + + // the full pathname of the final program +#define BINARY "/usr/bin/"${PROGRAM} -#define STD "/usr/share/doc/"${PROGRAM} // the directory where the standard documentation is stored +#define DOC "/usr/share/doc/"${PROGRAM} + + // the directory whre the manual page is stored +#define MAN "/usr/share/man/man1" + + // the directory whre the user-guide is stored +#define UGUIDE "/usr/share/doc/"${PROGRAM}"-doc/manual" + + // the directory where the skeleton files are installed + // Recompile options/data.cc if the skeleton location changes +#define SKEL "/usr/share/bisonc++" -#define EXTRA "/usr/share/doc/"${PROGRAM}"-doc" - // the directory where the extra documentation is stored diff -Nru bisonc++-4.11.00/parseconstruction bisonc++-4.13.01/parseconstruction --- bisonc++-4.11.00/parseconstruction 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parseconstruction 2015-12-13 16:26:55.000000000 +0000 @@ -21,7 +21,7 @@ echo -bisonc++ grammar +bisonc++ -i parser.ih grammar mv parse.cc p.cc mv *base.h base.h diff -Nru bisonc++-4.11.00/parser/checkemptyblocktype.cc bisonc++-4.13.01/parser/checkemptyblocktype.cc --- bisonc++-4.11.00/parser/checkemptyblocktype.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/checkemptyblocktype.cc 2015-12-13 16:26:55.000000000 +0000 @@ -6,8 +6,8 @@ if (stype.size()) // return type is required wmsg << - "rule `" << d_rules.name() << - "': no return type for empty production rule of typed " - "nonterminal" << endl; + "rule `" << &d_rules.lastProduction() << + "': no " << d_rules.sType() << " value is returned from this " + "empty production rule" << endl; } diff -Nru bisonc++-4.11.00/parser/handleproductionelement.cc bisonc++-4.13.01/parser/handleproductionelement.cc --- bisonc++-4.11.00/parser/handleproductionelement.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/handleproductionelement.cc 2015-12-13 16:26:55.000000000 +0000 @@ -29,4 +29,17 @@ default: // can't occur, but used to keep the break; // compiler from generating a warning } + + if ( + d_rules.lastProduction().action().empty() and + d_arg.option('N') and + d_rules.sType() != "" + ) + wmsg << + "rule `" << &d_rules.lastProduction() << + "' lacks an action block assigning a(n) " << d_rules.sType() << + " value to $$" << endl; } + + + diff -Nru bisonc++-4.11.00/parser/inc/rules bisonc++-4.13.01/parser/inc/rules --- bisonc++-4.11.00/parser/inc/rules 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/inc/rules 2015-12-13 16:26:55.000000000 +0000 @@ -45,6 +45,9 @@ } | _productionElement + { + $$ = $1; + } ; _production: diff -Nru bisonc++-4.11.00/parser/parse.cc bisonc++-4.13.01/parser/parse.cc --- bisonc++-4.11.00/parser/parse.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/parse.cc 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -// Generated by Bisonc++ V4.10.00 on Sun, 17 May 2015 16:35:37 +0200 +// Generated by Bisonc++ V4.13.00 on Wed, 14 Oct 2015 13:59:55 +0200 // $insert class.ih #include "parser.ih" @@ -1700,9 +1700,6 @@ if (d_token__ != _UNDETERMINED_) pushToken__(d_token__); // save an already available token - // save default non-nested block $$ - if (int size = s_productionInfo[production].d_size) - d_val__ = d_vsp__[1 - size]; // $insert debug if (d_debug__) @@ -2198,6 +2195,12 @@ } break; + case 100: + { + d_val__ = d_vsp__[0]; + } + break; + case 101: { handleProductionElement(d_vsp__[0]); diff -Nru bisonc++-4.11.00/parser/parserbase.h bisonc++-4.13.01/parser/parserbase.h --- bisonc++-4.11.00/parser/parserbase.h 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/parserbase.h 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -// Generated by Bisonc++ V4.10.00 on Sun, 17 May 2015 16:35:37 +0200 +// Generated by Bisonc++ V4.13.00 on Wed, 14 Oct 2015 13:59:55 +0200 #ifndef ParserBase_h_included #define ParserBase_h_included @@ -28,10 +28,10 @@ { SYMBOL, TERMINAL, - BLOCK, + BOOL, TEXT, SIZE_T, - BOOL, + BLOCK, }; namespace Meta__ @@ -56,9 +56,9 @@ }; template <> - struct TagOf + struct TagOf { - static Tag__ const tag = Tag__::BLOCK; + static Tag__ const tag = Tag__::BOOL; }; template <> @@ -74,9 +74,9 @@ }; template <> - struct TagOf + struct TagOf { - static Tag__ const tag = Tag__::BOOL; + static Tag__ const tag = Tag__::BLOCK; }; template <> @@ -92,9 +92,9 @@ }; template <> - struct TypeOf + struct TypeOf { - typedef Block type; + typedef bool type; }; template <> @@ -110,9 +110,9 @@ }; template <> - struct TypeOf + struct TypeOf { - typedef bool type; + typedef Block type; }; @@ -135,8 +135,11 @@ template typename TypeOf::type &get(); + + template + typename TypeOf::type const &get() const; }; - + // The class Semantic is derived from Base. It stores a particular // semantic value type. template @@ -147,13 +150,33 @@ DataType d_data; public: - // The default constructor and constructors for - // defined data types are available - Semantic(); - Semantic(DataType const &data); - Semantic(DataType &&tmp); + // The constructor forwards arguments to d_data, allowing + // it to be initialized using whatever constructor is + // available for DataType + template + Semantic(Params &&...params); DataType &data(); + DataType const &data() const; + }; + + // If Type is default constructible, Initializer::value is + // initialized to new Type, otherwise it's initialized to 0, allowing + // struct SType: public std::shared_ptr to initialize its + // shared_ptr class whether or not Base is default + // constructible. + template + struct Initializer + { + static Type *value; + }; + template + Type *Initializer::value = new Type; + + template + struct Initializer + { + static constexpr Type *value = 0; }; // The class Stype wraps the shared_ptr holding a pointer to Base. @@ -166,6 +189,8 @@ // Semantic *. struct SType: public std::shared_ptr { + SType(); + template SType &operator=(Tp_ &&value); @@ -176,15 +201,24 @@ // to point to Meta::__Semantic() if not template typename TypeOf::type &get(); + template + typename TypeOf::type const &get() const; // the data()-member does not check, and may result in a // segfault if used incorrectly template typename TypeOf::type &data(); + template + typename TypeOf::type const &data() const; + + template + void emplace(Args &&...args); }; } // namespace Meta__ + + class ParserBase { public: @@ -342,28 +376,21 @@ } template -inline Semantic::Semantic() +template +inline Semantic::Semantic(Params &&...params) : Base(tg_), - d_data(typename TypeOf::type()) + d_data(std::forward(params) ...) {} template -inline Semantic::Semantic(typename TypeOf::type const &data) -: - Base(tg_), - d_data(data) -{} - -template -inline Semantic::Semantic(typename TypeOf::type &&tmp) -: - Base(tg_), - d_data(std::move(tmp)) -{} +inline typename TypeOf::type &Semantic::data() +{ + return d_data; +} template -inline typename TypeOf::type &Semantic::data() +inline typename TypeOf::type const &Semantic::data() const { return d_data; } @@ -374,6 +401,21 @@ return static_cast *>(this)->data(); } +template +inline typename TypeOf::type const &Base::get() const +{ + return static_cast *>(this)->data(); +} + +inline SType::SType() +: + std::shared_ptr{ + Initializer< + std::is_default_constructible::value, Base + >::value + } +{} + inline Tag__ SType::tag() const { return std::shared_ptr::get()->tag(); @@ -385,7 +427,18 @@ // if we're not yet holding a (tg_) value, initialize to // a Semantic holding a default value if (std::shared_ptr::get() == 0 || tag() != tg_) - reset(new Semantic()); + { + typedef Semantic SemType; + + if (not std::is_default_constructible< + typename TypeOf::type + >::value + ) + throw std::runtime_error( + "STYPE::get: no default constructor available"); + + reset(new SemType); + } return std::shared_ptr::get()->get(); } @@ -396,6 +449,18 @@ return std::shared_ptr::get()->get(); } +template +inline typename TypeOf::type const &SType::data() const +{ + return std::shared_ptr::get()->get(); +} + +template +inline void SType::emplace(Params &&...params) +{ + reset(new Semantic(std::forward(params) ...)); +} + template struct Assign; diff -Nru bisonc++-4.11.00/parser/substituteblock.cc bisonc++-4.13.01/parser/substituteblock.cc --- bisonc++-4.11.00/parser/substituteblock.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/parser/substituteblock.cc 2015-12-13 16:26:55.000000000 +0000 @@ -33,6 +33,11 @@ if (nElements < 0) // action block saveDollar1(block, indexToOffset(1, nElements)); + if (not explicitReturn and d_arg.option('N') and d_rules.sType() != "") + wmsg << "rule " << &d_rules.lastProduction() << + ": action block does not assign a(n) " << d_rules.sType() << + " value to $$." << endl; + return explicitReturn; } diff -Nru bisonc++-4.11.00/rebis bisonc++-4.13.01/rebis --- bisonc++-4.11.00/rebis 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/rebis 2015-12-13 16:26:55.000000000 +0000 @@ -24,7 +24,7 @@ cp -r parser/grammar parser/inc self prompt " 2. Run (in ./self) ../tmp/bin/binary on the grammar" -cd self && ../tmp/bin/binary -S ../skeletons grammar +cd self && ../tmp/bin/binary -N -S ../skeletons grammar cd .. prompt " 3. Copy the generated parserbase.h and parse.cc to ./parser" @@ -37,7 +37,7 @@ echo prompt " 5. Again: run '../tmp/bin/binary' on grammar" -cd self && ../tmp/bin/binary -S ../skeletons grammar +cd self && ../tmp/bin/binary -N -S ../skeletons grammar cd .. echo " 6. Diffs should show differences in timestamps only:" diff -Nru bisonc++-4.11.00/required bisonc++-4.13.01/required --- bisonc++-4.11.00/required 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/required 2015-12-13 16:26:55.000000000 +0000 @@ -2,18 +2,18 @@ mv, sed, etc, etc, are not explicitly mentioned. Neither is the g++ compiler explicitly mentioned, but a fairly recent one is assumed. -Required software for building Bisonc++ 4.10.00 +Required software for building Bisonc++ 4.13.00 ----------------------------------------------- -libbobcat-dev (>= 3.25.01), +libbobcat-dev (>= 4.01.03), To use the provided build-script: - icmake (>= 7.22.01) + icmake (>= 8.00.04) To construct the manual and map-page: - yodl (>= 3.05.0) + yodl (>= 3.06.0) diff -Nru bisonc++-4.11.00/scanner/lex.cc bisonc++-4.13.01/scanner/lex.cc --- bisonc++-4.11.00/scanner/lex.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/scanner/lex.cc 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -// Generated by Flexc++ V2.02.00 on Sun, 17 May 2015 16:35:38 +0200 +// Generated by Flexc++ V2.03.00 on Wed, 14 Oct 2015 13:59:57 +0200 #include #include diff -Nru bisonc++-4.11.00/scanner/scannerbase.h bisonc++-4.13.01/scanner/scannerbase.h --- bisonc++-4.11.00/scanner/scannerbase.h 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/scanner/scannerbase.h 2015-12-13 16:26:55.000000000 +0000 @@ -1,4 +1,4 @@ -// Generated by Flexc++ V2.02.00 on Sun, 17 May 2015 16:35:38 +0200 +// Generated by Flexc++ V2.03.00 on Wed, 14 Oct 2015 13:59:57 +0200 #ifndef ScannerBASE_H_INCLUDED #define ScannerBASE_H_INCLUDED diff -Nru bisonc++-4.11.00/skeletons/bisonc++.cc bisonc++-4.13.01/skeletons/bisonc++.cc --- bisonc++-4.11.00/skeletons/bisonc++.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/skeletons/bisonc++.cc 2015-12-13 16:26:55.000000000 +0000 @@ -201,9 +201,7 @@ if (d_token__ != _UNDETERMINED_) pushToken__(d_token__); // save an already available token - // save default non-nested block $$ - if (int size = s_productionInfo[production].d_size) - d_val__ = d_vsp__[1 - size]; +$insert defaultactionreturn $insert 4 debug "executeAction(): of rule " << production + $insert 4 debug stype__(", semantic [TOS]: ", d_val__) << " ..." diff -Nru bisonc++-4.11.00/skeletons/bisonc++polymorphic bisonc++-4.13.01/skeletons/bisonc++polymorphic --- bisonc++-4.11.00/skeletons/bisonc++polymorphic 2015-08-28 19:46:14.000000000 +0000 +++ bisonc++-4.13.01/skeletons/bisonc++polymorphic 2015-12-13 16:26:55.000000000 +0000 @@ -31,7 +31,7 @@ template typename TypeOf::type const &get() const; }; - + // The class Semantic is derived from Base. It stores a particular // semantic value type. template @@ -42,16 +42,35 @@ DataType d_data; public: - // The default constructor and constructors for - // defined data types are available - Semantic(); - Semantic(DataType const &data); - Semantic(DataType &&tmp); + // The constructor forwards arguments to d_data, allowing + // it to be initialized using whatever constructor is + // available for DataType + template + Semantic(Params &&...params); DataType &data(); DataType const &data() const; }; + // If Type is default constructible, Initializer::value is + // initialized to new Type, otherwise it's initialized to 0, allowing + // struct SType: public std::shared_ptr to initialize its + // shared_ptr class whether or not Base is default + // constructible. + template + struct Initializer + { + static Type *value; + }; + template + Type *Initializer::value = new Type; + + template + struct Initializer + { + static constexpr Type *value = 0; + }; + // The class Stype wraps the shared_ptr holding a pointer to Base. // It becomes the polymorphic STYPE__ // It also wraps Base's get members, allowing constructions like @@ -62,6 +81,8 @@ // Semantic *. struct SType: public std::shared_ptr { + SType(); + template SType &operator=(Tp_ &&value); @@ -81,6 +102,9 @@ typename TypeOf::type &data(); template typename TypeOf::type const &data() const; + + template + void emplace(Args &&...args); }; } // namespace Meta__ diff -Nru bisonc++-4.11.00/skeletons/bisonc++polymorphic.inline bisonc++-4.13.01/skeletons/bisonc++polymorphic.inline --- bisonc++-4.11.00/skeletons/bisonc++polymorphic.inline 2015-08-28 19:50:22.000000000 +0000 +++ bisonc++-4.13.01/skeletons/bisonc++polymorphic.inline 2015-12-13 16:26:55.000000000 +0000 @@ -12,24 +12,11 @@ } template -inline Semantic::Semantic() +template +inline Semantic::Semantic(Params &&...params) : Base(tg_), - d_data{} -{} - -template -inline Semantic::Semantic(typename TypeOf::type const &data) -: - Base(tg_), - d_data(data) -{} - -template -inline Semantic::Semantic(DataType &&tmp) -: - Base(tg_), - d_data(std::move(tmp)) + d_data(std::forward(params) ...) {} template @@ -56,6 +43,15 @@ return static_cast *>(this)->data(); } +inline SType::SType() +: + std::shared_ptr{ + Initializer< + std::is_default_constructible::value, Base + >::value + } +{} + inline Tag__ SType::tag() const { return std::shared_ptr::get()->tag(); @@ -67,7 +63,18 @@ // if we're not yet holding a (tg_) value, initialize to // a Semantic holding a default value if (std::shared_ptr::get() == 0 || tag() != tg_) - reset(new Semantic()); + { + typedef Semantic SemType; + + if (not std::is_default_constructible< + typename TypeOf::type + >::value + ) + throw std::runtime_error( + "STYPE::get: no default constructor available"); + + reset(new SemType); + } return std::shared_ptr::get()->get(); } @@ -84,6 +91,12 @@ return std::shared_ptr::get()->get(); } +template +inline void SType::emplace(Params &&...params) +{ + reset(new Semantic(std::forward(params) ...)); +} + template struct Assign; diff -Nru bisonc++-4.11.00/skeletons/debugfunctions3.in bisonc++-4.13.01/skeletons/debugfunctions3.in --- bisonc++-4.11.00/skeletons/debugfunctions3.in 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/skeletons/debugfunctions3.in 2015-12-13 16:26:55.000000000 +0000 @@ -3,9 +3,9 @@ std::cout << "Parser State stack containing " << (d_stackIdx__ + 1) << "elements:\n" "Each line shows a stack index followed " - by the value of that stack element\n"; + "by the value of that stack element\n"; for (size_t idx = d_stackIdx__ + 1; idx--; ) - std::cout << std::setw(2) << idx << ": " + std::cout << std::setw(2) << idx << ": " << std::setw(3) << d_stateStack__[idx] << '\n'; } diff -Nru bisonc++-4.11.00/usage.cc bisonc++-4.13.01/usage.cc --- bisonc++-4.11.00/usage.cc 2015-08-25 14:18:57.000000000 +0000 +++ bisonc++-4.13.01/usage.cc 2015-12-13 16:26:55.000000000 +0000 @@ -74,6 +74,10 @@ " --no-decoration (-D): do not include the user-defined actions when\n" " generating the parser's tt(parse) member.\n" + " --no-default-action-return (-N): do not use the default $$ = $1\n" + " assignment of semantic values when returning from an action\n" + " block\n" + " --no-lines: don't put #line directives in generated output,\n" " overruling the %lines directive.\n" diff -Nru bisonc++-4.11.00/VERSION bisonc++-4.13.01/VERSION --- bisonc++-4.11.00/VERSION 2015-08-30 08:31:13.000000000 +0000 +++ bisonc++-4.13.01/VERSION 2015-12-18 12:39:27.000000000 +0000 @@ -1,2 +1,2 @@ -#define VERSION "4.11.00" +#define VERSION "4.13.01" #define YEARS "2005-2015"