forked from jcsalomon/hoc
toddhainsworth/hoc
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
hoc: Higher Order Calculator Originally described in Brian Kernighan & Rob Pike The UNIX Programming Environment Prentice Hall, Englewood Cliffs, NJ (1984) Transcribed and updated for ANSI C by Aaron Katz (2011) hoc is a simple language for computation. Its main utility is as a teaching tool, demonstrating the construction of a software project of nontrivial scale and the use of tools such as yacc, lex, and make (to this venerable list, I add git). In The UNIX Programming Environment, Kernighan & Pike develop hoc incrementally, beginning with a very basic implementation and gradually enhancing it with new features and a more flexible architecture. I have followed the steps in the book, including the few features taht are left as exercises for the reader. Each "version" of hoc is labeled with a git tag. I have stayed faithful to the code printed in the book, with a few exceptions: I have completed the exercises and from version 1 hoc has been able to read commands from a source file provided as a command line argument. Perhaps most importantly, I have adapted the code to conform to ANSI C (rather than the "K&R" style used in the book and have made the necessary changes to quiet warnings issued by gcc's highest warning level. I have prepared this git repository mostly as an exercise for myself to help in learning the use of yacc. It is my hope that the curious programmer can see the evolution of hoc as a series of patches.
About
higher order calculator
Resources
Stars
Watchers
Forks
Packages 0
No packages published