|
From: | arief_mulya |
Subject: | A Beginner's (probably stupid) Question |
Date: | Tue, 08 Apr 2003 13:58:50 +0700 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 |
Dear all,Sorry to bother you all about this simple (stupid?) question of mine.
How do exactly one do interconnection between flex and bison? I mean, how do the two interconnect with each other?
I've been reading flex manual. And a little bit of bison's (I'm no CS student or professor, so terms like LALR/reduce/reduce automata etc, confuses me, and sleeps me :-( everytime I try to read bison info pages..), but I still haven't found a clear view on practice.
I know that flex provice yylex function, but suppose I want to return a string and a token to bison, how do I do that? and how do I connect the two source file? do I need to include a header in one or the other file(s)? which header should I use.
I have able to make some simple lexer using flex. But haven't make one parser using bison. I learn these two tools because I like to have an extensible parser using C, but I don't like to create a customized function everytime a new format appears. (Kind of tiresome, these days... )
Please accept my apology for this disturbance. Best Regards, arief_mulya --
[Prev in Thread] | Current Thread | [Next in Thread] |