Unix Programming - FLEX

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > May 2004 > FLEX





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author FLEX
vikshik@rediffmail.com

2004-05-13, 1:48 am

Hi Every1

please help me.
Actually i'm writing a convertor for SystemC to verilog. And i'm using
FLEX for the same. The problem i'm facing is:
to create disable block. how can i look back into source code if
FLEX find the TOKEN "break"[ \t]";" . And please suggest me how to
handle nested loops. As i have to convert first '{' to begin and last
'}' to end for every loop/switch case.

Hoping for soon reply/help.

thanx

REGARDS
VICKY
Måns Rullgård

2004-05-13, 2:36 am

vikshik@rediffmail.com (vikshik@rediffmail.com) writes:

> Hi Every1
>
> please help me.
> Actually i'm writing a convertor for SystemC to verilog. And i'm using
> FLEX for the same. The problem i'm facing is:
> to create disable block. how can i look back into source code if
> FLEX find the TOKEN "break"[ \t]";" . And please suggest me how to
> handle nested loops. As i have to convert first '{' to begin and last
> '}' to end for every loop/switch case.


Use a stack.

--
Måns Rullgård
mru@kth.se
Lorinczy Zsigmond / Domonyik Mariann

2004-05-15, 1:34 am



"vikshik@rediffmail.com" wrote:
>
> Hi Every1
>
> please help me.
> Actually i'm writing a convertor for SystemC to verilog. And i'm using
> FLEX for the same. The problem i'm facing is:
> to create disable block. how can i look back into source code if
> FLEX find the TOKEN "break"[ \t]";" . And please suggest me how to
> handle nested loops. As i have to convert first '{' to begin and last
> '}' to end for every loop/switch case.


this is what yacc (bison) good for
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com