Re: YACC embedded actions

anton@mips.complang.tuwien.ac.at (Anton Ertl)
20 Sep 1999 19:12:13 -0400

          From comp.compilers

Related articles
YACC embedded actions mark_doherty@my-deja.com (1999-09-20)
Re: YACC embedded actions anton@mips.complang.tuwien.ac.at (1999-09-20)
Re: YACC embedded actions world!cfc@uunet.uu.net (Chris F Clark) (1999-09-24)
| List of all articles for this month |
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.ada,comp.compilers
Followup-To: comp.compilers
Date: 20 Sep 1999 19:12:13 -0400
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
References: 99-09-075
Keywords: yacc

  mark_doherty@my-deja.com writes:
> What I want to do is
> extract the expression string.


How about this:


Remember at which character the left end of the expression starts, and
when you come to the right end, you write the whole string to the
target. Note that this requires getting the start or end position of
the current lexeme from the scanner and thus the exact implementation
depends on the scanner.


- anton
--
M. Anton Ertl Some things have to be seen to be believed
anton@mips.complang.tuwien.ac.at Most things have to be believed to be seen
http://www.complang.tuwien.ac.at/anton/home.html





Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.