[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Two pass scanning
From: |
Henrik Sorensen |
Subject: |
Two pass scanning |
Date: |
Sun, 23 Nov 2003 21:01:28 +0100 |
User-agent: |
KMail/1.5.1 |
Hi List,
For the gnu pl1 project, I am investigating various approaches to perform two
pass scanning and parsing.
Beside the obvious choice, of reading the source files twice, has other
approaches for two pass scanning been tried ?
This is what I had in mind:
First pass scans the source code and stores tokens and strings away, before
returning to the parser. The second pass reads the stored tokens instead of
the actual source code.
Would the YY_BREAK macro, be the right place to add code that saves the tokens
and strings during the first pass before returning to the parser ?
Any comments, references or other ideas are highly appreciated.
Thanks
Henrik
- Two pass scanning,
Henrik Sorensen <=