git @ Cat's Eye Technologies OpenZz / master testsuite / when_del_scope.zz
master

Tree @master (Download .tar.gz)

when_del_scope.zz @masterraw · history · blame

!!
!!  Zz Dynamic Parser Library
!!  Copyright (C) 1989 - I.N.F.N - S.Cabasino, P.S.Paolucci, G.M.Todesco
!!
!!  The Zz Library is free software; you can redistribute it and/or
!!  modify it under the terms of the GNU Lesser General Public
!!  License as published by the Free Software Foundation; either
!!  version 2.1 of the License, or (at your option) any later version.
!!
!!  The testsuite test scripts are distributed with Zz as part of it,
!!  also under the LGPL.
!!
!!  The Zz Library is distributed in the hope that it will be useful,
!!  but WITHOUT ANY WARRANTY; without even the implied warranty of
!!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
!!  Lesser General Public License for more details.
!!
!!  You should have received a copy of the GNU Lesser General Public
!!  License along with this library; if not, write to the Free Software
!!  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
!!

!!
!! basic test for numeric type in both lexer settings
!!
!! REFERENCE OUTPUT
!!registering tag tag_mmm 
!!defining variable  a 
!!de registering tag tag_mmm 
!! END OUTPUT

/stat-> "matrix" ident^miao {

/mat_type_name=miao
/mat_tag_name="tag_"&mat_type_name

/stat-> mat_type_name ident^var {
  /print "defining variable ", var
}

/stat-> "register_tag" {
  /print "registering tag", mat_tag_name
}
/when delete scope {
  /print "de registering tag", mat_tag_name
}
register_tag

}

/push scope aoooo
matrix mmm

mmm a
/delete scope aoooo