i. Introduction

  1. ii. Prerequisites
  2. iii. Who Should Read This Document?

sid is an LL(1) parser. It reads a grammar specification (documented in the sid users' guide) then outputs a parser.

In this documentation, we explain sid's internal representation of grammars. It was reverse engineered from the code itself and the accompanying comments. Most of the reverse engineering was done reading sid's own grammar file and most notably the actions in the parser.act file. This document does not explain in detail how sid parses the .sid and the .act files.

[TODO this guide has been gutted; what remains gives a skeletal outline which will serve as a tour of the use and contents of the internal structures, without concerning itself with the implementation minuate. (Comments by the structures and API routines serve more accurately there, and will not fall out of sync with the code so easily). Here we can state how they all fit together, and what one might do with the data. dumping implementation to graphviz would be great, too.]

ii. Prerequisites

Before reading this guide, you should have read the sid users' guide and be able to use sid to output a simple parser.

iii. Who Should Read This Document?

Anyone interested in the post-processing steps sid does to a grammar after having parsed the .sid and the .act files. In particular, if you want to work on the grammar transforms and improve them you need to know sid's internal representations of grammars or at least know the interface to the internal representation. You may not want to reverse engineer this representation yourself.