On Wed, Dec 2, 2020 at 6:29 PM Andrew Makhorin <m...@gnu.org> wrote:

> On Wed, 2020-12-02 at 11:27 -0300, Germán Ferrari wrote:
> > Hi.
> >
> > I couldn't find the MathProg grammar in EBNF
>
> You can find all the grammar productions actually used by parsing
> routines in comments to these routines;
>
> see glpk/src/mpl/mpl1.c and mpl2.c.
>
> For example:
>
> /*----------------------------------------------------------------------
> -- object_reference - parse reference to named object.
> --
> -- This routine parses primary expression using the syntax:
> --
> -- <primary expression> ::= <dummy index>
> -- <primary expression> ::= <set name>
> -- <primary expression> ::= <set name> [ <subscript list> ]
> -- <primary expression> ::= <parameter name>
> -- <primary expression> ::= <parameter name> [ <subscript list> ]
> -- <primary expression> ::= <variable name> <suffix>
> -- <primary expression> ::= <variable name> [ <subscript list> ]
> --                          <suffix>
> -- <primary expression> ::= <constraint name> <suffix>
> -- <primary expression> ::= <constraint name> [ <subscript list> ]
> --                          <suffix>
> -- <dummy index> ::= <symbolic name>
> -- <set name> ::= <symbolic name>
> -- <parameter name> ::= <symbolic name>
> -- <variable name> ::= <symbolic name>
> -- <constraint name> ::= <symbolic name>
> -- <suffix> ::= <empty> | .lb | .ub | .status | .val | .dual */
>

It did not occur to me to look there. Thank you for the pointers.


> > so I created one. It only covers the declaration statements. Maybe
> > it's useful to somebody else.
>
> Thank you.
>
> >
> > Any comments welcome.
>
> I'd like to note that if you enclose non-terminals in < and >, then
> terminal symbols are not needed to be enclosed in quotes.
>

Noted! Thank you


>
> >
> > Thank you.
> >
> > Regards,
> > Germán.
>

Reply via email to