[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Reply to: [list | sender only]
Another suggestion for the BNF
- Subject: Another suggestion for the BNF
- From: James Hester <jrh@xxxxxxxxxxxx>
- Date: Mon, 1 Jul 2002 05:00:17 +0100 (BST)
Hello again,
Ralf and I have detected what appears to be another problem with the
BNF, this time in regard to embedded quotes. Consider the following
bit of text:
data_1A4U
#
_site.id _site.details
'ND'' 'NAD/NADP SELECTIVITY AMINO ACID.'
#
Now consider the BNF definitions:
<data_value_2> ::= <S_quote> <S_quote_string> <S_quote>
<S_quote_string> ::= { <S_quote> <non_blank_char> | <not_a_S_quote>} *
a S_quote_string is thus
<S_quote> { <S_quote> <non_blank_char> | <not_a_S_quote> } * <S_quote>
Now, the problem is that, because <non_blank_char> includes a <S_quote>
(as it must for double single quotes inside the string), a double final
S_quote as in the above example is matched by the
<S_quote><non_blank_char> sequence, leaving nothing for the final
<S_quote> and meaning that the two data items above are parsed as a
single data item.
One idea for a fix:
<S_quote_string> ::=
{ <S_quote> <non_blank_char> | <not_a_S_quote>} * <S_quote> *
making the specification for the whole S_squote delimited text
<S_quote> { <S_quote> <non_blank_char> | <not_a_S_quote>} * <S_quote>+
James Hester.
--
_______________________________________________________________________
James Hester, ANBF KEK
e-mail: [email protected] Oho 1-1
Phone: +81 298 64 7959 Tsukuba, Ibaraki 305
Fax: +81 298 64 7967 Japan
________________________________________________________________________
Reply to: [list | sender only]
- Prev by Date: Re: Modification to BNF needed for <line_of_text>?
- Next by Date: Re: Modification to BNF needed for <line_of_text>?
- Prev by thread: Re: CIF parser / dialects (was Re: Another suggestion for the BNF)
- Next by thread: Re: Another suggestion for the BNF
- Index(es):

