' Each grammar rule will be stored in an object of this class. ' Only the tokens of the rule body (and the length, the number of items in the rule body) ' Are actually stored. The head of the rule is implicitly known from the position of each ' RuleClass object in an array of such objects. Public Class RuleClass Public RuleBodyLength As Integer Public RuleBodyArray As TokenClass() Public Sub New(ByVal RuleBodyLengthValue As Integer) RuleBodyLength = RuleBodyLengthValue ' RuleBodyArray will be a NULL by default. End Sub Public Overrides Function ToString() As String Dim Temp As String Dim k As Integer Temp = RuleBodyLength.ToString For k = 0 To RuleBodyLength - 1 Temp = Temp & " " & RuleBodyArray(k).Item & "/" & RuleBodyArray(k).Category Next Return Temp End Function End Class