|Date:||Sat, 11 Jun 2022 14:35:16 -0700|
|User-agent:||Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0|
An example illustrates to use of concepts. The manual defines that usage. At the point of the example the are considerable other material to consider. .It might be best to put the examples in an Appendix. Following all of the manual descriptions allows the descriptions reference examples for clarification of use, and for the examples to reference descriptions for clarification of use.
It would be particularly instructive if your examples showed direct execution on input during, exhibiting the EBNF used as a vehicle to execute input, and to show how the input can be used to generate 'output', the same thing that compilers do. I think it important to mention in, for example, 1.4 Semantic Actions and 3.4.6 Actions.
The infix calculator is excellent to show the end-around result of these two stratagems. The polish post fix calculator can be used to generate a zero-address machine code (see Burroughs B5500, B6500, the HP 3000, and HP Calculatorsand the Algol 60 textbook), and the infix calculator can be used to illustrate direct execution.
The 'code' generated by the polish post fix calculator is small and attractive. It would consist of a push command plus commands for add, subtract, divide, and multiply. Further, the resultant 'code' can be easily used to illustrate the process.
The manual contains infix and a polish post fix examples. Both examples show direct execution of the grammar. Partitioning them into two different examples shows a range of opportunities available in Bison.
|[Prev in Thread]||Current Thread||[Next in Thread]|