XML Compiler
XML Parsing

The purpose of this program was to convert a document full of postal addresses into an XML version. The program used symbolic links which let it be called under scanner or parser. The scanner recognized symbols while the parser produced an XML file. The XML was created by tokenizing the input and following a Backus Naur Form (BNF), which also catches and flags improperly formatted lines.

BNF Rules

The rules of the BNF are pictured above.

BNF Conversion

Here we can see the BNF running on a proper postal file input, producing no skipped lines.

Scanner Mode

The program running in scanner mode, tokenizing the input.

Sample Input

Sample input with both valid and flagged entries.

Error Handling

The program catching improperly formatted inputs as errors.