You misunderstand.
Similar to the way that different industries have developed XML structures
for their needs (e.g. VoiceXML, MathXML, etc.) I was wondering if the
software industry any standard way to represent BNF form in XML.
It is much easier to parse an XML file than it is to parse a text file.
For instance, I would like to have a system that reads something like the
following:
<statement name="x">
<statement name="inner">
<token value="somevalue"/>
...
which in BNF would look something like:
x ::= <inner>
inner ::= somevalue
....
I want to be able to express the computer language's grammar in XML format
rather than BNF. Before I attempted to define the XML structure that I
would use, I was hoping that there were already proposed standards for this.
"Christoph Schittko [MVP]" <christophdotnetINVALID@austin.rr.com> wrote in
message news:uv9JsMwhDHA.2408@TK2MSFTNGP12.phx.gbl...
[quoted text, click to view] > Any chance you can express the grammar as a schema? There are several
> competing schema standards, XML Schema (also referred to as XSD) seems to
be
> the more popular one, but maybe others (DTD, Schematron, Relax-NG) may
suit
> your needs better.
>
> --
> HTH
> Christoph Schittko [MVP]
> Software Architect, .NET Mentor
>
> "Peter Rilling" <peter@nospam.rilling.net> wrote in message
> news:OtkI96VhDHA.1672@TK2MSFTNGP12.phx.gbl...
> > I am written a program that will be used to parse the lexical syntax of
> code
> > files. I would like to generalize the grammar logic so that I don't
> > hardcode any specific grammar in my program. Basically I would like to
> use
> > XML to define a languages grammar the way that BNF does. Are there any
> > standard XML format for defining a languages grammar?
> >
> >
> >
> >
>
>