[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: accessing yyval outside lex and yacc
From: |
Akim Demaille |
Subject: |
Re: accessing yyval outside lex and yacc |
Date: |
20 Jul 2001 12:28:55 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Academic Rigor) |
| main()
| {
|
| int return_value = ::yyparse(); /* which works fine */
|
| Constraint* root = yyval.constraint; /* hoping to gain access to string1 -
| but i */
| /* actually get a
| null pointer instead*/
|
| }
Constraint *root;
int
main ()
{
int return_value = ::yyparse();
// Use root
exit (0);
}
and in the axiom of your grammar, write what I wrote (i.e., root = $$,
with some extern Constraint *root in the preamble).
- accessing yyval outside lex and yacc, Manju James, 2001/07/20
- Re: accessing yyval outside lex and yacc, Akim Demaille, 2001/07/20
- Re: accessing yyval outside lex and yacc, Manju James, 2001/07/20
- Re: accessing yyval outside lex and yacc,
Akim Demaille <=
- Re: accessing yyval outside lex and yacc, Hans Aberg, 2001/07/20
- Re: accessing yyval outside lex and yacc, Akim Demaille, 2001/07/20
- Re: accessing yyval outside lex and yacc, Akim Demaille, 2001/07/20
- Re: accessing yyval outside lex and yacc, Manju James, 2001/07/20
- Re: accessing yyval outside lex and yacc, Akim Demaille, 2001/07/20
- Re: accessing yyval outside lex and yacc, Manju James, 2001/07/20
- Re: accessing yyval outside lex and yacc, Hans Aberg, 2001/07/20
- Re: accessing yyval outside lex and yacc, Axel Kittenberger, 2001/07/21
- Re: accessing yyval outside lex and yacc, Hans Aberg, 2001/07/22