Re: Ambiguous definition of auditReturnParameter in v2 ABNF
Christian Groves <Christian.Groves <at> ericsson.com.au>
2003-08-08 05:06:24 GMT
G'Day Micael,
Please see comments below.
Regards, Christian
Micael Karlberg wrote:
> Hi,
>
>
> Christian Groves writes:
> > G'Day Micael, all,
> >
> > Back from holiday and I'm the guy who concocted this syntax. I certainly
> > didn't mean to introduce this ambiguity into the ABNF (its why I dislike
> > ABNF) but it did slip past everyone else until now.
>
>
> I really which there was some tool to check ABNF easilly, then
> these kind of problems would occure with much less frequency.
> For ASN.1 you just feed it to your ASN.1 compiler and your done.
> Same goes for MIBs.
[CHG] Won't hear any complaints from me :).
>
>
> >
> > So as has been mentioned by Tom we need to fix this. So how about we delete
> > audititem from? It removes the ambiguity.
> > auditReturnParameter = (mediaDescriptor / modemDescriptor /
> > muxDescriptor / eventsDescriptor /
> > signalsDescriptor / digitMapDescriptor /
> > observedEventsDescriptor / eventBufferDescriptor /
> > statisticsDescriptor / packagesDescriptor /
> > errorDescriptor / auditItem)
> >
> > and restore this to v1.
>
>
> Delete auditItem from auditReturnParameter? But auditItem was part of
> auditReturnParameter even in v1.
[CHG] Yes, must have been looking at an old version of v1.
>
>
> > The individual auditing mechanism was only meant to change the request
> > mechanisn not what was returned as the "usual" audit reply
> > should have been enough to send the data back that you need. Does this
> > solve the problem. If not, Micael as you need unambiguous syntax can you
> > propose a simple ABNF fix that would solve your problem/s?
>
>
> I really hope that I am not the only one who is writing a version 2
> parser, or else I am wasting my time (or are about to strike gold :)
>
> As for a solution, how about adding a token and changing the
> definition of indAudterminationAudit to:
>
> indAudterminationAudit = IndAudTerminationAuditToken
> indAudauditReturnParameter
> *(COMMA indAudauditReturnParameter)
>
> Not pretty, but it should do the trick. I have not tested it
> with real messages, but atleast my parser generator did not
> complain anymore.
[CHG] I think the point is that the MGC shouldn't be concerned whether the
audited parameter is from a descriptor audit or an individual audit. The syntax
provided for a descriptor audit is enough to return an individual audit. The
problem lies that AuditItem is used both in the command request and reply ABNF.
I was thinking about a token yesterday myself but when I had a look at the ASN1
and saw that it used existing AuditDescriptor reply syntax I thought we
shouldn't allow using the IndAudRep.
Would a rule that,
; For audit replys the indAudterminationAudit SHALL not be used.
auditItem = ( MuxToken / ModemToken / MediaToken /
SignalsToken / EventBufferToken /
DigitMapToken / StatsToken / EventsToken /
ObservedEventsToken / PackagesToken ) /
indAudterminationAudit)
Be a solution?
Regards, Christian
>
>
> >
> > Regards, Christian
>
>
> Regards,
> /BMK
>
> >
> >
> > Micael Karlberg wrote:
> > > So, now we have yet another parse conflict regarding 'EventBufferToken'?
> > >
> > > We have three rules:
> > >
> > > 1) auditItem -> 'EventBufferToken'
> > > 2) eventBufferDescriptor -> 'EventBufferToken'
> > > [ LBRKT eventSpec *(COMMA eventSpec) RBRKT ]
> > > 3) indAudeventBufferDescriptor -> 'EventBufferToken'
> > > LBRKT indAudeventSpec RBRKT
> > >
> > > One conflict between rule 1) and 2) and now another conflict
> > > between rule 2) and 3)
> > >
> > > So, depending on the number of tokens after the 'EventBufferToken', we get:
> > > - Zero -> auditItem
> > > - One -> indAudeventBufferDescriptor
> > > - Two or more -> eventBufferDescriptor
> > >
> > > Is this correct?
> > >
> > > Regards,
> > > /BMK
> > >
> > > Anil Jangam writes:
> > > > This particular question has been repeated for a number of times so far.
> > > > Even I had the same doubt for which Tom has replied as follows: (Marked with
> > > > ####>).
> > > > I think we need to fix this now.
> > > >
> > > > ####> STARTS
> > > > ----- Original Message -----
> > > > From: Tom-PT Taylor
> > > > To: 'Anil Jangam' ; Kevin Boyle
> > > > Sent: Wednesday, January 22, 2003 10:40 PM
> > > > Subject: RE: [Megaco] auditReturnParameter in AmmsReply
> > > >
> > > >
> > > > I suppose as the guy who concocted this syntax I should answer the question.
> > > > You return the auditItem. That was my shortcut for returning descriptor
> > > > name only.
> > > >
> > > > Apparently there is a parsing problem with this syntax, but we never seem to
> > > > have taken the step of resolving it.
> > > > ####> ENDS
> > > >
> > > > ----- Original Message -----
> > > > From: "Micael Karlberg" <micael.karlberg <at> ericsson.com>
> > > > To: <megaco <at> ietf.org>
> > > > Sent: Thursday, July 17, 2003 3:16 PM
> > > > Subject: [Megaco] Ambiguous definition of auditReturnParameter in v2 ABNF
> > > >
> > > >
> > > > > Hi,
> > > > >
> > > > > The 'auditReturnParameter' appears to be ambiguously defined in version 2
> > > > > of the ABNF.
> > > > >
> > > > > An example. If the 'auditReturnParameter' contains the following
> > > > > sequence of tokens:
> > > > >
> > > > > "EB { hobbes }"
> > > > >
> > > > > i.e.
> > > > >
> > > > > EventBufferToken LBRKT pkgdName RBRKT
> > > > >
> > > > > then it may be an 'auditItem' (see 'indAudeventBufferDescriptor') or an
> > > > > 'eventBufferDescriptor'
> > > > >
> > > > > What is the intention here? Should this sequence of tokens be
> > > > > interpreted as an 'auditItem' or an 'eventBufferDescriptor?
> > > > >
> > > > > As a parser implementor I need a well defined, unambiguous grammar to
> > > > > rely on.
> > > > >
> > > > > The grammar looks like this (a little bit simplified):
> > > > >
> > > > > auditReturnParameter = eventBufferDescriptor / auditItem
> > > > >
> > > > > eventBufferDescriptor = EventBufferToken
> > > > > [ LBRKT eventSpec *(COMMA eventSpec)
> > > > RBRKT]
> > > > >
> > > > > eventSpec = pkgdName
> > > > > [ LBRKT eventSpecParameter
> > > > > *(COMMA eventSpecParameter) RBRKT]
> > > > >
> > > > > auditItem = indAudterminationAudit
> > > > >
> > > > > indAudterminationAudit = indAudauditReturnParameter
> > > > > *(COMMA insAudauditReturnParameter)
> > > > >
> > > > > indAudauditReturnParameter = indAudeventBufferDescriptor
> > > > >
> > > > > indAudeventBufferDescriptor = EventBufferToken LBRKT indAudeventSpec
> > > > RBRKT
> > > > >
> > > > > indAudeventSpec = pkgdName
> > > > > [ LBRKT indAudeventSpecParameter RBRKT ]
> > > > >
> > > > >
> > > > > Regards,
> > > > > /BMK
> > > > >
> > > > > _______________________________________________
> > > > > Megaco mailing list
> > > > > Megaco <at> ietf.org
> > > > > https://www1.ietf.org/mailman/listinfo/megaco
> > > > >
> > >
>