[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]

Strange bug in mp4h parsing


I've got a strange parsing bug in mp4h (wml 2.0.7, system details at
the end of the email...):

If I use a <subst-in-string> inside a <define-tag> to make recursive
tag definitions, <subst-in-string> seems to require a space after the
first parameter and doesn't work, if there immediately follows a
newline after the first parameter. Maybe there are some more pedantic
circumstances necessary to reproduce this bug, but at least I could
reduce the complexity to the following to examples work the difference

# Doesn't work
<define-tag add_foo whitespace=delete>
    "=LT=define-tag %0-only endtag=required>[%0:%%body:%0]=LT=/define-tag>"
    "=LT=" "<" />

<add_foo bar />


# Works fine
<define-tag add_foo whitespace=delete>
    "=LT=define-tag %0-only endtag=required>[%0:%%body:%0]=LT=/define-tag>" 
    "=LT=" "<" />

<add_foo bar />


Please note the blank behind the second '=LT=/define-tag>"'! The result
of this piece of WML code is:

=LT=define-tag bar-only endtag=required>[bar:%body:bar]=LT=/define-tag>=LT=

Here's the full debugging data:

Used WML System:
Built Environment:
    Host: sun4u-sun-solaris2.7
    Perl: 5.006 (/usr/local/bin/perl)
    User: axel@kathrin.dagstuhl.de
    Date: 11-Jul-2001
Built Location:
    Prefix: /usr/local
    BinDir: /usr/local/bin
    LibDir: /usr/local/lib/wml
    ManDir: /usr/local/man

Used Perl System:
Summary of my perl5 (revision 5.0 version 6 subversion 1) configuration:
    osname=solaris, osvers=2.7, archname=sun4-solaris
    uname='sunos kathrin 5.7 generic sun4u sparc '
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=undef d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    cc='gcc', ccflags ='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -I/opt/gnu/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
    cppflags='-fno-strict-aliasing -I/usr/local/include -I/opt/local/include -I/opt/gnu/include'
    ccversion='', gccversion='2.95.2 19991024 (release)', gccosandvers='solaris2.7'
    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=4321
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, usemymalloc=y, prototype=define
  Linker and Libraries:
    ld='gcc', ldflags =' -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib '
    libpth=/usr/local/lib /opt/local/lib /opt/gnu/lib /usr/lib /usr/ccs/lib
    libs=-lsocket -lnsl -ldl -lm -lc
    perllibs=-lsocket -lnsl -ldl -lm -lc
    libc=/lib/libc.so, so=so, useshrplib=true, libperl=libperl.so
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -Wl,-E -R /usr/local/lib/perl5/5.6.1/sun4-solaris/CORE'
    cccdlflags='-fPIC', lddlflags=' -W,l-E -G -L/usr/local/lib -L/opt/local/lib -L/opt/gnu/lib'

Characteristics of this binary (from libperl): 
  Compile-time options: USE_LARGE_FILES
  Built under solaris
  Compiled at Jul 11 2001 13:53:17

		Regards, Axel
Axel Beckert - abe@cs.uni-sb.de - http://abe.home.pages.de/
Student of Computer Science, University of Saarland (Germany)
Artificial Intelligence Laboratory (AI Lab), Prof. Dr. W. Wahlster;
WWW-/FTP-Administrator IBFI Schloß Dagstuhl; Students Representative CS
Website META Language (WML)                www.engelschall.com/sw/wml/
Official Support Mailing List                   sw-wml@engelschall.com
Automated List Manager                       majordomo@engelschall.com