Machine structures

philphix

philphix
philphix

Summary

philphix is a very simple silly replacement tool that accepts a single command line argument, the name of a replacement set to use. An example of such a set is shown below (the contents of the file):


This replacement set consists of pairs of “words” (separated by an arbitrary number of tabs and spaces), each pair on its own line. The first word only consists of alphanumeric characters, but the second word can include any non-whitespace printable character. The first word is the target word the input word is being matched against; the second word is what is to replace the input word with, if at all.

The text shown at the top of the page would be converted into this if the above replacement set was given:


This was my introduction to programming in C - here is what I learned in a nutshell:

  • Use the C file input/output library
  • Do memory allocation
  • Manipulate strings
  • Test and debug using gdb