1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
|
If you're new to b(), you can safely skip this section. If you used b()
before, please note the following new and modified features:
itemization(
it()
includefile(underscores)
it() The generated code was redesigned. Large parts of the protected
interface of the parser's base class and names of tt(parse())-related
members in the generated parser class were modified. The names of all
accessible members in tt(parserbase.h) and tt(parser.h) now end in a
trailing underscore character. Predefined members in tt(parser.ih) no
longer have trailing underscores, and can be redefined (but must be
available). The traditional tt(error(char const *)) member in fact never
uses its argument (and bic() only passes the default "Syntax error"
argument). Its prototype now no longer defines a parameter. Here's an
overview of modified member names/signatures:
quote(
table(3)(lcl)(
rowline()
row(cell(bf(Before 6.00.00))cell( )cell(bf(Starting with 6.00.00)))
rowline()
row(cell(tt(void error(char const *))) cell() cell(tt(void error())))
row()
row(cell(tt(void exceptionHandler_(...))) cell()
cell(tt(void exceptionHandler(...))))
row()
row(cell(tt(void errorRecovery())) cell()
cell(tt(void errorRecovery_())))
row(cell(tt(void executeAction(int))) cell()
cell(tt(void executeAction_(int))))
row(cell(tt(void nextToken())) cell() cell(tt(void nextToken_())))
rowline()
row(cell()cell()cell(bf(added:)))
row(cell()cell()cell(tt(void nextCycle_())))
rowline()
row(cell()cell()cell(bf(remove:)))
row(cell()cell()cell(tt(int lookup(bool))))
rowline()
)
)
When re-generating parsers generated by bic() before version 6.00.00,
the signatures of the above functions in the file parser.h must be
hand-modified to reflect the above changes. In addition, the
implementations of error and exceptionHandler (default implementations
were provided in parser.ih) must be adapted to their new signatures.
it() Added a warning to tt(skeletons/binsonc++.h) that until the tt(#undef)
instruction the parser class name will be read as the parser's base class
name.
it() With Polymorphic semantic values a tag mismatch is not considered
fatal anymore if errors were already encountered. In that case the
semantic value showing a tag mismatch is replaced by the default value of
the semantic value of the expected polymorphic type.
Starting with version 6.03.00 assignment to polymorphic semantic values is
not anymore implemented through templates. The main reason is that
inferred types may not be defined as a polymorphic semantic value
type. Refer to section ref(POLYMORPHIC) for details.
it() Added option and directive tt(--prompt) (tt(%prompt)): when debug-code
is active, the generated parser shows a ?-prompt at each cycle when
processing its input (which should not be provided on the standard input
stream).
it() Option tt(--thread-safe) can now also be specified as a
directive (tt(%thread-safe)).
it() Members that should not be modified by the parser class were moved to
the parser's base class's private section. Accessor members are now
available in the parser's base class, allowing user code to read, e.g.,
the currently active token and parsing state.
)
|