VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "VerbVarParse"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa VerbVarParse
Implements InterpChain
Private nextChain As InterpChain
Private stk As Stack
Private ichain As New InterpChain
Private has_chain As Boolean

Private Sub InterpChain_addArgsToVerb()
  ichain.addArgsToVerb
End Sub

Private Sub InterpChain_addToChain(c As InterpChain)
  Set nextChain = c
  has_chain = True
End Sub

Public Sub init(stk_ As Stack)
  Set stk = stk_
  ichain.init stk
End Sub

Private Function InterpChain_getChain() As InterpChain
  Set InterpChain_getChain = nextChain
End Function

Private Function InterpChain_hasChain() As Boolean
  InterpChain_hasChain = has_chain
End Function

Private Sub InterpChain_init(stk_ As Stack)
  init stk_
End Sub

Private Function InterpChain_interpret() As Boolean
  'Redukuj Verb Var do Verb zawierającego zmienne
  ichain.init stk
  If (stk.topStack(VAR_TYPE, VERB_TYPE)) Then
    InterpChain_addArgsToVerb
    InterpChain_interpret = True
  Else
    InterpChain_interpret = False
  End If
End Function

Private Sub InterpChain_sendToChain(stk_ As Stack)
  If Not InterpChain_interpret Then
    nextChain.sendToChain stk_
  End If
End Sub

Private Function InterpChain_topStack(ByVal c1 As Integer, ByVal c2 As Integer) As Boolean
  InterpChain_topStack = stk.topStack(c1, c2)
End Function
