| 
| Re: SMI (ASN1) grammar [message #1007977 is a reply to message #1007711] | 
Fri, 08 February 2013 02:24    | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hi Christophe, 
 
those token definitions can be translates as plain keywords. 
 
 >> I will be facing more of these issues, and need help. 
 
See the footer ;-) 
 
Best regards, 
Sebastian 
--  
Looking for professional support for Xtext, Xtend or Eclipse Modeling? 
Go visit: http://xtext.itemis.com 
 
Am 07.02.13 09:48, schrieb Christophe Bouhier: 
> Hello There, 
> I am creating an editor for the SMI format. See: 
> http://en.wikipedia.org/wiki/Structure_of_Management_Information 
> 
> It's used to define so called MIB's used by the SNMP protocol. The SMI 
> format is based on ASN1. There is a antlr version of the grammar as a 
> starting point, but that is horrifically intimidating :) 
> http://www.antlr3.org/grammar/1105770765162/parsesmi-v1-15jan05.zip 
> 
> Does anyone has a base ASN1 Xtext grammar or even better SMI? If not, 
> would anyone like to cooperate on this? Or help translate the antlr 
> grammar? 
> For example in ANTLR, this grammar as a bunch of tokens as : 
> tokens { 
> 
> ABSENT_KW = "ABSENT" ; 
> ABSTRACT_SYNTAX_KW = "ABSTRACT-SYNTAX" ; 
> ALL_KW= "ALL" ; 
> ANY_KW = "ANY" ; 
> ARGUMENT_KW = "ARGUMENT" ; 
> APPLICATION_KW = "APPLICATION" ; 
> AUTOMATIC_KW = "AUTOMATIC" ; 
> BASED_NUM_KW = "BASEDNUM" ; 
> BEGIN_KW = "BEGIN" ; 
> BIT_KW = "BIT" ; 
> BMP_STRING_KW = "BMPString" ; 
> .. 
> } 
> 
> How do I convert this to Xtext? Are these literals which can be put in 
> an enum? I will be facing more of these issues, and need help. 
> Thank You. Christophe Bouhier
 |  
 |  
  | 
 | 
Powered by 
FUDForum. Page generated in 0.04096 seconds