[antlr-interest] Is ANTLR suitable for this?

Markopoulos Avgerinos mento at egreta.gr
Sat Jul 27 21:01:37 PDT 2002


Hi

I have a 15 MB text file in a format similar to the one displayed below.
I need a parser & formattor/translator for it (no need for syntax checking).

I 'm reading the ANTLR FAQs and PDFs plus any Lex/Yacc info I find in the
internet.
Since I never used such a tool, I haven't figured out yet, if ANTLR could
help me for this job.
Or is the format too simple, so ANTLR is too much for it?

Thanks in advance
mento at iname.com


The format is as following
------------------------------------
PRG={
 HDR=    {
                DESC="t_Calendars",RSDNT=N,SQL=N,PRK=1,POS=P
                },
 RSRCE=  {
  DB=     {
                        FILE=11,
                        MOD=W,
                        OPN=W,
                        READ=N,
                        SIZ=Y},
  FLD=    {
                        DESC="p.Requested code",
                        PIC="2P0Z",
                        STRG=1,
                        ATTR=N,
                        SIZ=2,
                        WHLE=2,
                        TYP=140,
   RSRCE=  {
                                MDFY=Y,
                                TRNS=I,
                                DEF=N,
                                MOD=B,
                                CTRL=E,
                                CTRL_STP="         0.00000",
                                NUL_ALW=N,
                                DEF_VAL="0",
                                DEF_NULL=N,
                                STYLE=65536,
                                IDX_COLOR=1,
                                IDX_FONT=1
                                }
   },
  FLD=    {
                        DESC="p.Description",
                        PIC="50",
                        STRG=1,
                        ATTR=A,
                        SIZ=50,
                        TYP=87,
   RSRCE=  {
                                MDFY=Y,
                                TRNS=I,
                                DEF=N,
                                MOD=B,
                                CTRL=E,
                                CTRL_STP="    100000.00000",
                                NUL_ALW=N,
                                DEF_NULL=N,
                                STYLE=2,
                                IDX_COLOR=1,
                                IDX_FONT=1
                                }
   },
  FLD=    {
                        DESC="bClear",
                        PIC="100",
                        STRG=1,
                        ATTR=A,
                        SIZ=100,
                        TYP=134,
                        RSRCE=  {
                                MDFY=Y,
                                TRNS=I,
                                DEF=N,
                                MOD=B,
                                CTRL=E,
                                CTRL_STP="         0.00000",
                                NUL_ALW=N,
                                DEF_NULL=N,
                                STYLE=65536,
                                IDX_COLOR=1,
                                IDX_FONT=1
                                }
                        },
  },
        DTLS=   {
                KEY=    {
                        FLD=1,
                        MOD=N
                        },
                DB=     {
                        DB=11
                        },
                FLW=O,
                DEL=N,
                END=N,
                EMOD=B,
                MOD={MOD=E},
                },
        },
}
-------------------------------------------------------




 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 



More information about the antlr-interest mailing list