SmaCC__SmaCCStartingSymbol.st
author vranyj1
Wed, 17 Nov 2010 21:57:55 +0000
changeset 20 4ea23addc2c4
parent 15 8b8cd1701c33
child 25 5a6921729520
permissions -rw-r--r--
Makefile updated

"{ Package: 'stx:goodies/smaCC' }"

"{ NameSpace: SmaCC }"

SmaCCNonTerminalSymbol subclass:#SmaCCStartingSymbol
	instanceVariableNames:''
	classVariableNames:''
	poolDictionaries:''
	category:'SmaCC-Parser Generator'
!

SmaCCStartingSymbol comment:'SmaCCStartingSymbol is the starting symbol in the grammar. A grammar can only have one starting symbol, but it can have may different starting item sets.'
!


!SmaCCStartingSymbol methodsFor:'accessing'!

asLRItemSet
	| itemSet |
	itemSet := SmaCCItemSet new.
	productions do: 
			[:each | 
			itemSet add: (SmaCCLR1Item 
						symbol: self
						rhs: each
						follow: ((SmaCCSymbolSet new)
								add: self class empty;
								yourself))].
	^itemSet
!

compileName
	^(productions first at: 1) name
! !

!SmaCCStartingSymbol methodsFor:'public'!

isStartingSymbol
	^true
! !

!SmaCCStartingSymbol class methodsFor:'documentation'!

version
    ^ '$Header: /opt/data/cvs/stx/goodies/smaCC/SmaCC__SmaCCStartingSymbol.st,v 1.1 2006-02-09 21:15:53 vranyj1 Exp $'
!

version_SVN
    ^ '$Id$'
! !