[antlr-interest] Informix 4GL scripts to Java conversion

Gangatharan, Senthil senthil.gangatharan at credit-suisse.com
Sun Jun 17 22:12:43 PDT 2007


Hi Friends,

I'm new to ANTLR.

I have a requirement to convert Informix 4gl scripts to java code.

I got fgl.g (4gl grammer) & tried to run it using eclipse pulgin. It works fine, I'm able to parse 4GL scripts.

My understanding is that I need to write java code translation logic to get equivalent java code.

Is there any code available already for informix 4gl to Java translation ?... Please help.

Regards
Senthil	


-----Original Message-----
From: antlr-interest-bounces at antlr.org [mailto:antlr-interest-bounces at antlr.org] On Behalf Of Robin Davies
Sent: 18 June 2007 13:00
To: Markus Kuhla; antlr-interest at antlr.org
Subject: Re: [antlr-interest] semantic predicate affects nothing

You're missing an '|' after the {false}? . That syntactic predict is always going to fail without it.

text_paragr : (OPEN ((NEWLINE)=>{false}?  |)) => text_line+;



----- Original Message -----
From: "Markus Kuhla" <bace.spam at gmx.net>
To: <antlr-interest at antlr.org>
Sent: Sunday, June 17, 2007 8:31 PM
Subject: [antlr-interest] semantic predicate affects nothing


> Hi guys,
>
> I try to use the semantic predicate "match alpha if not followed by beta" 
> from http://www.antlr.org/blog/antlr3/lookahead.tml (section May 11, 
> 2006).
>
> I want to distinguish between an inline element in a text paragraph and 
> block (an extra paragraph). The block is indicated by '(((\n', in inline 
> is no newline allowed. Before a block begins, the text paragraph has to 
> end (out of the +loop).
>
> The problem is, that the parser does not change its behavior, it always 
> matches the block as an inline element and throws an exception at the 
> newline.
>
> I wrote the v3 grammar as short as possible to show this:
>
> page : paragraph *;
> paragraph : text_parag  |  block;
> text_paragr : (OPEN ((NEWLINE)=>{false}? )) => text_line+;
> text_line : (TEXT | inline)+  NEWLINE;
> inline : OPEN  text  CLOSE;
> block : OPEN  NEWLINE  TEXT*  NEWLINE  CLOSE  NEWLINE;
> text : ANY *;
>
> OPEN : '(((';
> CLOSE : ')))';
> NEWLINE : '\r\n';
> ANY : .;
>
>
> Thanks for any assistance!
> Best,
> Markus
> -- 
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail 



==============================================================================
Please access the attached hyperlink for an important electronic communications disclaimer: 

http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
==============================================================================



More information about the antlr-interest mailing list