help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Octave grammar


From: David Grundberg
Subject: Re: Octave grammar
Date: Tue, 13 Jul 2010 09:09:45 +0200
User-agent: Thunderbird 2.0.0.24 (X11/20100411)

Jordi Gutiérrez Hermoso skrev:

> Just to be clear, bison source is just src/oct-parse.yy am I correct?
> I suppose I can't avoid learning how bison and flex work for much
> longer...

oct-parse.yy, that's the parser.  Notice that Octave is a tricky
language (did you say FORTRAN? :) and does have several modes for the
lexer.  It's not as bad as the-other-piece-of-software, because there
are reserved words.  You can't declare "for" as a variable.

There are some hacks for reading matrices, for example.  So you have to
watch for when the parser (oct-parse.yy) tells the lexer (lex.ll) to
change how it detects tokens.  Full list of such variables in lex.h.

Grundberg


reply via email to

[Prev in Thread] Current Thread [Next in Thread]