[antlr-interest] Re: Need help for grammar of TL1 (a language use d in North America in Telecom)

sanane lan ilkerpasa135 at yahoo.com
Thu Nov 6 03:03:55 PST 2003


Hello Monty,
 
First of all I apoligize for getting back so late (got side tracked with multiple releases).
 
Secondly, I have no doubt that your 10 hours will save me 2 weeks.
 
Third, what I'm trying to do is; come up with an alternative architecture prototype in our problem domain and then show this to management. If I can get a kick-start on TL1 (described at http://www.tl1.com/static/pdfs/gen/5556.pdf  or  http://www.tl1.com/library/TL1/TL1_Protocol/ ) parsing with antlr + java , then chances of getting management's (my direct management or another group that I know) interest is there. And when we proceed with antlr, I will definitely remember favors :)
 
Regards,
-- ilker


mzukowski at yci.com wrote:By the way, I'm available for small contracts like getting this to work. 10
of my hours will save you a week or two of your own if you are new to antlr,
plus I'll be teaching you exactly what you need to know. I mentor,
troubleshoot, design and educate.

Actually it's what I do on the mailing list except I go deeper and dedicate
more than 10 minutes per question :)

Anyhow, contact me via my website if you need my services. 

Monty

http://www.codetransform.com



-----Original Message-----
From: ilkerpasa135 [mailto:ilkerpasa135 at yahoo.com] 
Sent: Friday, October 03, 2003 9:01 AM
To: antlr-interest at yahoogroups.com
Subject: [antlr-interest] Re: Need help for grammar of TL1 (a language use d
in North America in Telecom)


Hello Monty,

I had missed your filter example, which I'm starting to read now.

I thought I read Ter's Lexer class notes, but I'll read it again too.

And will get back after that.

-- ilker


--- In antlr-interest at yahoogroups.com, mzukowski at y... wrote:
> You've got some serious ambiguities there. I would recommend maybe 
using
> lexer states or a parser filter as I've outlined at
> http://www.codetransform.com/filterexample.html
> 
> Also read Ter's lecture on lexers. Actually read them all, it's 
worth it.
> Should be prominently available from the antlr.org home page.
> 
> Monty
> 
> -----Original Message-----
> From: ilkerpasa135 [mailto:ilkerpasa135 at y...] 
> Sent: Thursday, October 02, 2003 4:17 PM
> To: antlr-interest at yahoogroups.com
> Subject: [antlr-interest] Need help for grammar of TL1 (a language 
used in
> North America in Telecom)
> 
> I'm new to antlr. And trying to learn antlr and prepare the grammar 
> for TL1, a language used in North America for all Telecom 
equipment. 
> Hence when I get it, it could be an interesting addition to antlr 
> grammars.
> 
> Of course since I'm a newbei, when I run the following grammar I 
get 
> many nondeterminism warnings, basically all over the place.
> 
> Past couple of days (not full time tough), I went through antlr 
> tutorials, documents, etc , but obviously I haven't gotten it and 
> need help. Hence any help is appreciated.
> 
> Here is what the TL1 command structure is like;
> VERB-modifier1-modifier2 : TID:AID:CTAG: : NAME=VALUE,NAME=VALUE ;
> VERB-modifier1-modifier2 : TID:AID:CTAG: : VALUE,VALUE ;
> Following are some TL1 command examples;
> ENT-EQPT-OC3:TID1:1-1-#-#-3:ctag123::attrib1=123,attrib2=456;
> ENT-EQPT-OC1:TID1:1-1-#-#-3:ctag123::123,456;
> 
> 
> Here is the grammar that I have;
> 
> class TL1Parser extends Parser;
> options { buildAST=true; }
> 
> // first just get TL1command grammar working
> //tl1Message : tl1Command | tl1Acknow | tl1Response | tl1Auto;
> tl1Message : tl1Command;
> 
> tl1Command : (command_code DOUBL^ staging_blocks (DOUBL^ 
> payload_blocks)?) SEMI!;
> 
> command_code : VERB (DASH^ modifier1 (DASH^ modifier2)?)?;
> modifier1 : NAME;
> modifier2 : NAME;
> 
> staging_blocks : TID DOUBL^ AID DOUBL^ CTAG (DOUBL^ 
general_block)?;
> // general_block could be improved
> general_block : NAME;
> 
> payload_blocks : data_block_list (DOUBL^ data_block_list)*;
> data_block_list : data_block (COMMA^ data_block)*;
> data_block : data_block_positional | data_block_named;
> data_block_positional : VALUE (COMMA^ VALUE)*;
> data_block_named : (NAME EQUAL^ VALUE) (COMMA^ (NAME EQUAL^ VALUE))
*;
> 
> 
> 
> class TL1Lexer extends Lexer;
> 
> AID : ('a'..'z'|'A'..'Z'|'0'..'9'|'.'|'-'|'_'|'/'|'#')+;
> CTAG : ('a'..'z'|'A'..'Z'|'0'..'9')+;
> NAME : ('a'..'z'|'A'..'Z'|'0'..'9')+;
> TID : ('a'..'z'|'A'..'Z'|'0'..'9'|'.'|'-'|'_'|'/')+;
> VALUE : ('a'..'z'|'A'..'Z'|'0'..'9')+;
> VERB : ('a'..'z'|'A'..'Z')+;
> 
> COMMA : ',';
> DASH : '-';
> DOUBL : ':';
> EQUAL : '=';
> SEMI : ';';
> 
> WS : (' ' | '\t'
> | '\r' '\n' { newline(); }
> | '\n' { newline(); }
> ) 
> { $setType(Token.SKIP); };
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to 
http://docs.yahoo.com/info/terms/




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




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




---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.antlr.org/pipermail/antlr-interest/attachments/20031106/fcd0f34c/attachment.html


More information about the antlr-interest mailing list