help-bison
[Top][All Lists]
Advanced

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

Re: question


From: Kelly Leahy
Subject: Re: question
Date: Sun, 14 Aug 2005 09:50:22 -0700 (PDT)

I don't see you allocating memory for myoutput
anywhere.  Perhaps you could declare myoutput as
char[512] or something like that to begin with. 
Otherwise, in your myoutput == NULL branch of the IF
statement, you need to allocate memory, rather than
just doing strcpy.

Kelly

--- David Ja <address@hidden> wrote:

> Hi,
>  My name is David Ja, an undergraduate student at
> university of 
> pennsylvania. I am attempting to start a minor
> research project myself. I 
> been trying to adapted bison to my own purpose but
> after a month of trying I 
> can't seem to figure out a way to make it work. All
> I wanted to do was to 
> take advantage of bison's parser which generates the
> DFA, which in turn, 
> allows me to step through the DFA in sequence
> generating a sample string 
> that fits the grammar input. For example if the
> grammar is the grammar for 
> an web address. My program will be able to generate
> http://www.abc.org<http://www.abc.org>.
> I have attached my "attempt" code with this email.
> The problem I arrive at 
> is I don't seem to be able to compile it with bison
> code. For some reason, 
> even if I leave it in the same folder as bison src,
> I still arrive at a 
> deference to pointer error. I'm sorry if I made an
> elementary mistake or 
> something stupid. Thank you for any help/suggestions
> you can give me. It is 
> also possible I'm not taking advantage of bison data
> structure the right 
> way. If so I am sorry if I wasted any of your time.
> This is my first attempt 
> at understand the inner working of a program of this
> magnitude. If I am not 
> being clear about something or if I email the wrong
> place. I am extremely 
> sorry. Again thank you very much for any help you
> can give me. 
>  Best,
> David





reply via email to

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