help-bison
[Top][All Lists]
Advanced

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

Re: interpreter with bison


From: Satya
Subject: Re: interpreter with bison
Date: Thu, 10 May 2007 08:21:16 -0500

It looks like you are reinventing XSLT here :) Your html like language
looks like XML to me, but it would not be valid XML since you do not
have closing tags for all the elements.

If you still prefer to write your custom parser you just have to make
use of Bison's semantic actions. Read the Bison manual about how to
use them.

satya.

On 5/9/07, Xaris <address@hidden> wrote:

I have made the parse tree with bison of a like html language which finds if
the input file is written correctly or not.

But i want to add code in order to make an interpreter which takes as input
the like html language and as output it gives the html code.

for example i want to give as input
<START>
<USER ID="1111" NAME="kkkkkk" address@hidden>
<ATTRIB COLOR="000000" FONT="00ff00" TITLE="gfdsa">

<TEXT FONT="ff0000">Hello</TEXT>
<TEXT>World</TEXT>
<END>

and the output will be like this



<html>
<head>
         <title>gfdsa</title>
</head>

<body bgcolor="#000000" text="#00ff00">

<table>
  <tr>
     <td style="color: #ff0000">Hello</td>
     <td>World</td>
  </tr>
</table>

</body>
</html>


--
View this message in context: 
http://www.nabble.com/interpreter-with-bison-tf3715814.html#a10394471
Sent from the Gnu - Bison - Help mailing list archive at Nabble.com.



_______________________________________________
address@hidden http://lists.gnu.org/mailman/listinfo/help-bison



--
...what's remarkable, is that atoms have assembled into entities which
are somehow able to ponder their origins.
--
http://cs.uic.edu/~spopuri




reply via email to

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