Re: Code generation from AST



Lucas S. Silva wrote:

The algorithm I am using doesn't deal very well with recursive
expression such as:

a = f.g.h(a , x.y.o(1,2) )

You can transform this statement (i.e. the AST) into Reverse Polish
Notation (RPN), like

1 2 x y . o . () a f g . h . () a =

Now the sequence of the required actions (machine code) should be quite
obvious.

DoDi

.



Relevant Pages

  • Re: Cohens paper on byte order
    ... > A mapping is involved, and it plays a role in the ... has hex digits, but actually in the memory there ... mean in another notation ... 'transferring' a bit sequence of 128 bit of the key ...
    (sci.crypt)
  • Re: How Chapman-Kolmogorov implies Markov ??
    ... Perhaps the notation "f_i" is supposed to imply there is ... something equivalent about all of these random variables, ... concept, that we index the index set iself, or else write a finite ... sequence in it, explicitly using the integers as our indices. ...
    (sci.physics)
  • Re: [Collatz] was : Re: Status of Waring-problem - Collatz - Sorry
    ... >>From the notation there is no specific restriction on numbers x. ... all depends on the transform structure. ... >for a certain sequence of exponents only one solution for x is possible; ... The slope of the line up to the excursion is steep, ...
    (sci.math)
  • Re: Cohens paper on byte order
    ... > the 2-nybble byte notation specifically in the context of ... > AES internal bytes, ... > sequence, and which therefore does not provide guidance ... notation, obtaining a sequence of hex digits, again ...
    (sci.crypt)
  • Re: Cohens paper on byte order
    ... >> This simply means that Doug doesn't like your notation. ... > specific method of presenting the bit sequence as inducing ... I would not support an alternative external interface that bypassed the ... Brian Gladman ...
    (sci.crypt)