[antlr-interest] v3 - How to deal with include Files?

Alexandre Porcelli porcelli at uol.com.br
Mon Sep 4 11:08:35 PDT 2006


Now I understood your solution, but isn't it more complicate? Because
you will need to handle lexical instructions inside the input stream
(you can have several different kinds of "include" statements in
several languages - include, copy, -inc, ...) and we can have same
more sofisticates include statements (like an ASP file that is not
just a statement is a tag).
And the second problem that I can see with this solution is to control
file positions (line and column position) because you will need to add
one more internal thing : fileName (to get info about what is the
active file name).
I´d like to know your opinion about this.

Regards,
Alexandre Porcelli


> hi. for includes, I'd probably just make my input character stream
> look for and do the includes so the lexer sees a continuous stream of
> char ready to process.
>
> Ter
> On Sep 4, 2006, at 9:44 AM, Alexandre Porcelli wrote:
>
>> Terence, I couldn't understand how to do it... I already saw the
>> island grammar sample but I couldn't understand how to "translate" it
>> to solve the include problem.
>>
>> Alexandre Porcelli
>>
>> On 9/4/06, Alexandre Porcelli <alexandre.porcelli at gmail.com> wrote:
>>> Terence, I couldn't understand how to do it... I already saw the
>>> island grammar sample but I couldn't understand how to "translate" it
>>> to solve the include problem.
>>>
>>> Alexandre Porcelli
>>>
>>>
>>> On 8/23/06, Alexandre Porcelli <porcelli at uol.com.br> wrote:
>>> > Hi All,
>>> >
>>> >   Id like to know how to deal with include Files?
>>> >
>>> >    In v2 there is TokenStreamSelector, how can I solve a include
>>> file
>>> > problem using v3?
>>> >
>>> > Best Regards,
>>> > Alexandre Porcelli
>>> >
>>>


More information about the antlr-interest mailing list