[antlr-interest] Re: treeparser to copy input to output
Terence Parr
parrt at cs.usfca.edu
Tue Feb 3 11:21:05 PST 2004
On Feb 3, 2004, at 4:46 AM, SainTiss wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi,
>
> Ah, of course... sounds logical actually :-)
>
> Thanks...
>
> One more thing though: I don't really need the tree parser anymore
> now, so I
> thought I'd disable "buildAST" in java.g. However, antlr complains it
> doesn't
> know AST-specific variables such as #p, which are used inside actions.
> Is
> there a way to turn off AST building without having to remove all
> related
> actions?
> Or is there no overhead at all if the getAST() method isn't called?
Hmm...i'm not sure what would happen. YOu might wanna remove the
actions. Not that expensive if it doesn't crash ;)
Ter
>
> Thanks,
>
> Hans
>
> On Tuesday 03 February 2004 02:13, Terence Parr wrote:
>> Hi. You need to remove the SKIP part, but tell the rewrite engine to
>> discard (it actually just prevents the parser from seeing it).
>>
>> Ter
>>
>> On Feb 2, 2004, at 3:37 PM, SainTiss wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>>
>>> Hmm...
>>>
>>> I get the impression that changing the token from SKIP to something
>>> else isn't
>>> that straightforward...
>>> I added a token to the "tokens{}" section, and then changed
>>> setType(Token.SKIP) to setType(<new token>), but the parser doesn't
>>> seem to
>>> recognize java anymore...
>>> Is there something I'm missing here?
>>>
>>> Thanks,
>>>
>>> Hans
>>>
>>> On Monday 02 February 2004 23:29, Terence Parr wrote:
>>>> Ah. Yeah, the WS cannot be SKIP or else the rewrite engine won't
>>>> see
>>>> the token...
>>>>
>>>> Ter
>>>>
>>>> On Feb 2, 2004, at 1:16 PM, SainTiss wrote:
>>>>> -----BEGIN PGP SIGNED MESSAGE-----
>>>>> Hash: SHA1
>>>>>
>>>>> Hi,
>>>>>
>>>>> Thanks for that article... It's certainly going in the right
>>>>> direction, except
>>>>> I can't get the engine to remember whitespace.
>>>>> I did remove the rewriteEngine.discard(MyLexer.WS) call though...
>>>>> I'm using the java.g grammar. Could the problem be that the lexer
>>>>> assigns the
>>>>> token "SKIP" to whitespace?
>>>>>
>>>>> Thanks,
>>>>>
>>>>> Hans
>>>>>
>>>>> On Monday 02 February 2004 21:06, parrt2000 wrote:
>>>>>> Howdy...yahoooooooo again snarfed my earlier reply...ugh.
>>>>>>
>>>>>> Anyway, have you seen:
>>>>>>
>>>>>> http://www.antlr.org/article/rewrite.engine/index.tml
>>>>>>
>>>>>> ?
>>>>>>
>>>>>> Terence
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Yahoo! Groups Links
>>>>>>
>>>>>> To visit your group on the web, go to:
>>>>>> http://groups.yahoo.com/group/antlr-interest/
>>>>>>
>>>>>> To unsubscribe from this group, send an email to:
>>>>>> antlr-interest-unsubscribe at yahoogroups.com
>>>>>>
>>>>>> Your use of Yahoo! Groups is subject to:
>>>>>> http://docs.yahoo.com/info/terms/
>>>>>
>>>>> - --
>>>>> Ark Linux - Linux for the Masses (http://arklinux.org)
>>>>>
>>>>> Capitalism:
>>>>> You don't have any cows. The bank will not lend you money to buy
>>>>> cows,
>>>>> because you don't have any cows to put up as collateral.
>>>>>
>>>>> Representative Democracy:
>>>>> You have two cows. Your neighbors pick someone to tell you who gets
>>>>> the milk.
>>>>>
>>>>> In a world without walls and fences, who needs windows and gates?
>>>>>
>>>>> Hans Schippers
>>>>> 2LIC INF
>>>>> UA 2003-2004
>>>>> -----BEGIN PGP SIGNATURE-----
>>>>> Version: GnuPG v1.2.3 (GNU/Linux)
>>>>>
>>>>> iD8DBQFAHr5MXlnUYIbmLOQRAg66AJ48cxsoEkQET4E2SPBhrcIZnieTvQCdHi4/
>>>>> e12jVR7gw/JSy9+HJrB649Q=
>>>>> =pWBa
>>>>> -----END PGP SIGNATURE-----
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Yahoo! Groups Links
>>>>>
>>>>> To visit your group on the web, go to:
>>>>> http://groups.yahoo.com/group/antlr-interest/
>>>>>
>>>>> To unsubscribe from this group, send an email to:
>>>>> antlr-interest-unsubscribe at yahoogroups.com
>>>>>
>>>>> Your use of Yahoo! Groups is subject to:
>>>>> http://docs.yahoo.com/info/terms/
>>>>
>>>> --
>>>> Professor Comp. Sci., University of San Francisco
>>>> Creator, ANTLR Parser Generator, http://www.antlr.org
>>>> Co-founder, http://www.jguru.com
>>>> Co-founder, http://www.knowspam.net enjoy email again!
>>>> Co-founder, http://www.peerscope.com pure link sharing
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Yahoo! Groups Links
>>>>
>>>> To visit your group on the web, go to:
>>>> http://groups.yahoo.com/group/antlr-interest/
>>>>
>>>> To unsubscribe from this group, send an email to:
>>>> antlr-interest-unsubscribe at yahoogroups.com
>>>>
>>>> Your use of Yahoo! Groups is subject to:
>>>> http://docs.yahoo.com/info/terms/
>>>
>>> - --
>>> Ark Linux - Linux for the Masses (http://arklinux.org)
>>>
>>> Capitalism:
>>> You don't have any cows. The bank will not lend you money to buy
>>> cows,
>>> because you don't have any cows to put up as collateral.
>>>
>>> Representative Democracy:
>>> You have two cows. Your neighbors pick someone to tell you who gets
>>> the milk.
>>>
>>> In a world without walls and fences, who needs windows and gates?
>>>
>>> Hans Schippers
>>> 2LIC INF
>>> UA 2003-2004
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.2.3 (GNU/Linux)
>>>
>>> iD8DBQFAHt86XlnUYIbmLOQRAhOYAJ0a8vHxlnaA2PiiIC+/cGKBCeLJawCZARtN
>>> 5grFc2qXhfeoC/GjPtWjHIw=
>>> =h2vW
>>> -----END PGP SIGNATURE-----
>>>
>>>
>>>
>>>
>>> Yahoo! Groups Links
>>>
>>> To visit your group on the web, go to:
>>> http://groups.yahoo.com/group/antlr-interest/
>>>
>>> To unsubscribe from this group, send an email to:
>>> antlr-interest-unsubscribe at yahoogroups.com
>>>
>>> Your use of Yahoo! Groups is subject to:
>>> http://docs.yahoo.com/info/terms/
>>
>> --
>> Professor Comp. Sci., University of San Francisco
>> Creator, ANTLR Parser Generator, http://www.antlr.org
>> Co-founder, http://www.jguru.com
>> Co-founder, http://www.knowspam.net enjoy email again!
>> Co-founder, http://www.peerscope.com pure link sharing
>>
>>
>>
>>
>>
>>
>> Yahoo! Groups Links
>>
>> To visit your group on the web, go to:
>> http://groups.yahoo.com/group/antlr-interest/
>>
>> To unsubscribe from this group, send an email to:
>> antlr-interest-unsubscribe at yahoogroups.com
>>
>> Your use of Yahoo! Groups is subject to:
>> http://docs.yahoo.com/info/terms/
>
> - --
> Ark Linux - Linux for the Masses (http://arklinux.org)
>
> Capitalism:
> You don't have any cows. The bank will not lend you money to buy cows,
> because you don't have any cows to put up as collateral.
>
> Representative Democracy:
> You have two cows. Your neighbors pick someone to tell you who gets
> the milk.
>
> In a world without walls and fences, who needs windows and gates?
>
> Hans Schippers
> 2LIC INF
> UA 2003-2004
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.3 (GNU/Linux)
>
> iD8DBQFAH5gSXlnUYIbmLOQRAkvVAJ9l3mHVNg8zcAJN+x3uoCRz03ZBKQCfWVeL
> cApc4QywORJDxn+ITXJ2A+0=
> =kLT+
> -----END PGP SIGNATURE-----
>
>
>
>
> Yahoo! Groups Links
>
> To visit your group on the web, go to:
> http://groups.yahoo.com/group/antlr-interest/
>
> To unsubscribe from this group, send an email to:
> antlr-interest-unsubscribe at yahoogroups.com
>
> Your use of Yahoo! Groups is subject to:
> http://docs.yahoo.com/info/terms/
>
>
>
--
Professor Comp. Sci., University of San Francisco
Creator, ANTLR Parser Generator, http://www.antlr.org
Co-founder, http://www.jguru.com
Co-founder, http://www.knowspam.net enjoy email again!
Co-founder, http://www.peerscope.com pure link sharing
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/antlr-interest/
To unsubscribe from this group, send an email to:
antlr-interest-unsubscribe at yahoogroups.com
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the antlr-interest
mailing list