help-bison
[Top][All Lists]
Advanced

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

Bison and an one-parse interpreter


From: Jeppesen Hans Mejdahl
Subject: Bison and an one-parse interpreter
Date: Fri, 2 Aug 2002 11:38:38 +0200

Hi there...

I want to build a one-parse interpreter using flex/bison is this possible?

As I see it: simpel expresion and asignments works fine,
BUT: condition and loops :-(

Consider this test "gramma":

        if-stmt : IF if-bool THEN true-stmt; 
              {dont-do=0;};

            if-bool : bool:
                { don't-do=1;
                   $=$1; 
                };

        stmt: id '=' value
               {if (!dont-do) setvalue($1,$3) };

This might workbut look like h.... ! 
And what about a loops ?

Regards Hans M Jeppesen





reply via email to

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