parrotcode: implementation of a vtable, that is used by the parser for its semantic actions. | |
Contents | Compilers |
pirvtable.c - implementation of a vtable, that is used by the parser for its semantic actions.
Using a vtable makes changing the behaviour of the parser easy. The parser calls vtable methods at certain points, for instance at the start of a subroutine and at the end. Depending on the type of output that is expected, the appropiate function is invoked. Any output type should implement all vtable methods for correct behaviour.
|