« Return to Thread: about Octave's syntax

Re: about Octave's syntax

by David Grundberg-2 :: Rate this Message:

Reply to Author | View in Thread

Eduardo Alejandro Cuesta Llanes wrote:
> I need the formal Octave's syntax for make a parser...
>
> Thanks
>  
The syntax is not documented in a human-readable form (spare the
programmers). There is no BNF-like form for you to read.

If you are interested in a parser, you can just look at the parser
implemented by Octave. It's written using the GNU tools for parser
generation (i.e. compiler compilation). They are called flex and bison.

Lexical analyzer generation (flex input):
http://hg.savannah.gnu.org/hgweb/octave/file/79c4dd83d07f/src/lex.l

Parser generation (bison input):
http://hg.savannah.gnu.org/hgweb/octave/file/79c4dd83d07f/src/parse.y

David

 « Return to Thread: about Octave's syntax