Bug: Attempting to show BNF defs as code fails to render
If you try to use TWiki to specify data using a
BNF style definition, the := in the middle is eaten by TWiki's syntax. Given Wiki's are largely a programmer's tool at present - much more so that plain users this is a big deficiency. Working around by using <tt> tags instead is an unacceptable solution - the pattern should be changed to avoid turning accepted normal
BNF into gibberish.
Test case
You type:
* =sourceline := "? itemvalue "? (' ' attributedefinition)*= <br>
=attributedefinition := attribute = attributevalue= <br>
=attribute := [a-zA-Z0-9][a-zA-Z_0-9]*= <br>
=attributevalue := "[^"]+"= <br>
You get:
-
sourceline : "? itemvalue "? (' ' attributedefinition)*=
attributedefinition : attribute = attributevalue=
attribute : [a-zA-Z0-9][a-zA-Z_0-9]*=
attributevalue : "[^"]+"=
You should get:
- sourceline := "? itemvalue "? (' ' attributedefinition)*
attributedefinition := attribute = attributevalue
attribute := [a-zA-Z0-9][a-zA-Z_0-9]*
attributevalue := "[^"]+"
Environment
| TWiki version: |
TWikiRelease01Feb2003 |
| TWiki plugins: |
twiki.org |
| Server OS: |
twiki.org |
| Web server: |
twiki.org |
| Perl version: |
twiki.org |
| Client OS: |
Any |
| Web Browser: |
Any |
--
TWikiGuest - 28 Aug 2003
Follow up
This is an esoteric case. If fixed it could have other surprizing side effects. If you want to use
BNF you can put it in verbatim tags:
sourceline := "? itemvalue "? (' ' attributedefinition)*
attributedefinition := attribute = attributevalue
attribute := [a-zA-Z0-9][a-zA-Z_0-9]*
attributevalue := "[^"]+"
--
PeterThoeny - 28 Sep 2003
Fix record