help-octave
[Top][All Lists]
Advanced

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

Re: Is there a command that shows the C-code the interpreter creates?


From: Andrew Janke
Subject: Re: Is there a command that shows the C-code the interpreter creates?
Date: Tue, 16 Apr 2019 18:21:32 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.6.1


On 4/16/19 4:56 PM, GoSim wrote:
> Ok, I misunderstood, Bison doesn't parse the m-code but creates a parser. So
> Bison is a general interpreter. And the parser creates a parse tree. 

Pretty much. Bison generates a C program which is a parser, and the
execution of that parser procedurally processes the parse tree, though
the parse tree itself may not be represented explicitly in a data structure.

> And you run this parser on every line in the m-file. I thought the m-code
> was converted to C-code somewhere...

Nope.

> How does your parser know if it is a int or double?

All numerics in Octave are doubles unless you explicitly convert them to
ints using int32() or similar conversion functions. All numeric literals
in Octave produce doubles. So if you see a number in Octave code, it's a
double.

Cheers,
Andrew



reply via email to

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