includefile(grammar/intro.yo)

lsect(OUTLINE)(Outline of a Bisonc++ Grammar File)
includefile(grammar/outline.yo)

lsect(SYMBOLS)(Symbols, Terminal and Nonterminal Symbols)
includefile(grammar/symbols.yo)

lsect(RULES)(Syntax of Grammar Rules)
includefile(grammar/syntax.yo)

lsect(RECURSIVE)(Writing recursive rules)
includefile(grammar/recursive.yo)

lsect(DIRECTIVES)(Bisonc++ Directives)
includefile(directives/intro.yo)

    subsect(%baseclass-preinclude: specifying a header included by the
            baseclass)    
    includefile(directives/preinclude.yo)

    lsubsect(PARSERCLASS)
            (%class-name: defining the name of the parser class)
    includefile(directives/parserclass.yo)

    subsect(%debug: adding debugging code to the `parse()' member)
    includefile(directives/debug.yo)

    lsubsect(DEFAULTACTION)
        (%default-actions: adding `$$ = $1' action blocks to production rules)
    includefile(directives/defaultactions.yo)

    subsect(%error-verbose: dumping the parser's state stack)
    includefile(directives/errorverbose.yo)

    lsubsect(EXPECT)(%expect: suppressing conflict warnings)
    includefile(directives/expect.yo)

    subsect(%flex: using the traditional `flex++'  interface)
    includefile(directives/flex.yo)

    lsubsect(INCLUDE)(%include: splitting the input file)
    includefile(directives/include.yo)

    lsubsect(PRECEDENCE)(%left, %right, %nonassoc: defining operator
        precedence)
    includefile(directives/precedence.yo)

    lsubsect(LOCSTRUCT)
            (%locationstruct: specifying a dedicated location struct)
    includefile(directives/locstruct.yo)

    lsubsect(LSPNEEDED)(%lsp-needed: using the default location type)
    includefile(directives/lneeded.yo)

    lsubsect(LTYPE)(%ltype: using an existing location type)
    includefile(directives/ltype.yo)

    subsect(%namespace: using a namespace)
    includefile(directives/namespace.yo)

    subsect(%negative-dollar-indices: using constructions like $-1)
    includefile(directives/negative.yo)

    subsect(%no-lines: suppressing `#line' directives)
    includefile(directives/lines.yo)

    subsect(%polymorphic: using polymorphism to define multiple semantic
            values) 
    includefile(directives/polymorphic.yo)

    subsect(%prec: overruling default precedences)
    includefile(directives/prec.yo)

    subsect(%print-tokens: displaying tokens and matched text) 
    includefile(directives/print.yo)

    subsect(%prompt: show prompts when using debug) 
    includefile(directives/prompt.yo)

    subsect(%required-tokens: defining the minimum number of tokens between
        error reports) 
    includefile(directives/required.yo)

    lsubsect(SCANNER)(%scanner: using a standard scanner interface)
    includefile(directives/scanner.yo)

    subsect(%scanner-matched-text-function: define the name of the scanner's
        member returning the matched texttoken) 
    includefile(directives/scannermatchedtextfunction.yo)

    subsect(%scanner-token-function: define the name of the scanner's token
            function) 
    includefile(directives/scannertokenfunction.yo)

    subsect(%stack-expansion: the number of elements added to the semantic
                                value stack)
    includefile(directives/stackexpansion.yo)

    subsect(%start: defining the start rule)
    includefile(directives/start.yo)

    lsubsect(STYPE)(%stype: defining a single semantic value type)
    includefile(directives/stype.yo)

    subsect(%tag-mismatches: check for tag-mismatches with polymorphic
        semantic values)
    includefile(directives/tagmismatches.yo)

    subsect(%thread-safe: use thread-local data with polymorphic semantic
            values) 
    includefile(directives/threadsafe.yo)

    lsubsect(TOKTYPENAMES)(%token: defining token names)
    includefile(directives/tokens.yo)

        lsubsubsect(IMPROPER)(Improper token names)
        includefile(directives/improper.yo)

    subsect(%token-class: defining the class name containing the semantic
            tokens)
    includefile(directives/tokenclass.yo)

    subsect(%token-namespace: defining the namespce of the Tokens class)
    includefile(directives/tokennamespace.yo)


    lsubsect(TYPE)(%type: associating semantic values with (non)terminals)
    includefile(directives/nonterms.yo)

    lsubsect(UNION)(%union: using a 'union' to define multiple semantic values) 
    includefile(directives/union.yo)

    subsect(%weak-tags: %polymorphic declaring 'enum Tag_')
    includefile(directives/weaktags.yo)

    subsect(Directives controlling the names of generated files)
    includefile(directives/output.yo)

        lsubsubsect(BCHEADER)
            (%baseclass-header: defining the parser's base class header)
        includefile(directives/baseclass.yo)

        lsubsubsect(CHEADER)
            (%class-header: defining the parser's class header)
        includefile(directives/classhdr.yo)

        lsubsubsect(FILES)
            (%filenames: specifying a generic filename)
        includefile(directives/filenames.yo)

        lsubsubsect(IHEADER)
            (%implementation-header: defining the implementation header)
        includefile(directives/imphdr.yo)

        lsubsubsect(PARSESOURCE)
               (%parsefun-source: defining the parse() function's sourcefile)
        includefile(directives/parse.yo)

        subsubsect(%target-directory: defining the directory where files must
                be written)
        includefile(directives/targetdir.yo)

        lsubsubsect(TOKENPATH)
               (%token-path: defining the path of the file containing the
                Tokens_ enumeration)
        includefile(directives/tokenpath.yo)

lsect(SEMANTICS)(The Meaning Of Things: Semantics)
includefile(grammar/semantics.yo)

    lsubsect(POLYMORPHIC)(Polymorphism and Multiple Semantic Values:
                        `%polymorphic') 
    includefile(grammar/polymorphic.yo)

        subsubsect(The %polymorphic directive)
        includefile(grammar/polymorphicdirective.yo)

        subsubsect(Code generated by %polymorphic)
        includefile(grammar/code.yo)

        subsubsect(A parser using a polymorphic semantic value type)
        includefile(grammar/parser.yo)

        subsubsect(A scanner using a polymorphic semantic value type)
        includefile(grammar/scanner.yo)

    lsubsect(ACTIONS)(Actions and shorthand ($) notations)
    includefile(grammar/actions.yo)

        subsubsect(%stype shorthand notations)
        includefile(grammar/stypeshorthand.yo)

        subsubsect(%union shorthand notations)
        includefile(grammar/unionshorthand.yo)

        subsubsect(%polymorphic shorthand notations)
        includefile(grammar/polymorphicshorthand.yo)

COMMENT(
  lsubsubsect(POLYTYPE)
      (The %polymorphic and %type: associating semantic values
          with (non-)terminals) 
  includefile(grammar/polymorphictype.yo)
END)

        lsubsubsect(MIDACTIONS)(Mid-Rule Action Blocks)
        includefile(grammar/midrule.yo)

sect(Basic Grammatical Constructions)
includefile(grammar/gramcons.yo)

    subsect(Plain Alternatives)
    includefile(grammar/alternatives.yo)

    subsect(One Or More Alternatives, No Separators)
    includefile(grammar/series.yo)

    lsubsect(OPTSERIES)(Zero Or More Alternatives, No Separators)
    includefile(grammar/optseries.yo)

    subsect(One Or More Alternatives, Using Separators)
    includefile(grammar/delimseries.yo)

    subsect(Zero Or More Alternatives, Using Separators)
    includefile(grammar/optdelim.yo)

    subsect(Nested Blocks)
    includefile(grammar/nested.yo)

sect(Multiple Parsers in the Same Program)
includefile(grammar/multiple.yo)

