Changeset 92 in default


Ignore:
Timestamp:
10/12/16 14:33:24 (8 years ago)
Author:
phdmakk
Message:

+ added support for range repetition modifier in generator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend

    r87 r92  
    2323import de.ugoe.cs.swe.bnftools.ebnf.SectionHeading 
    2424import org.eclipse.core.resources.ResourcesPlugin 
     25import de.ugoe.cs.swe.bnftools.ebnf.RepeatRange 
    2526 
    2627/** 
     
    132133        def compile(GroupedSequence gSequ) '''( «FOR d : gSequ.definitionList»«d.compile+" "»«ENDFOR» )''' 
    133134 
    134         def compile(RepeatedSequence rSequ) '''{ «FOR d : rSequ.definitions»«d.compile+" "»«ENDFOR» }«IF rSequ.morethanonce»+«ENDIF»''' 
     135        def compile(RepeatedSequence rSequ) '''{ «FOR d : rSequ.definitions»«d.compile+" "»«ENDFOR» }«IF rSequ.morethanonce»+«ENDIF»«IF rSequ.range!=null»«rSequ.range.compile»«ENDIF»''' 
     136 
     137        def compile(RepeatRange rRange) '''#(«rRange.from»,«rRange.to»)''' 
    135138 
    136139        def compile(OptionalSequence oSequ) '''[ «FOR d : oSequ.definitionList»«d.compile+" "»«ENDFOR» ]''' 
Note: See TracChangeset for help on using the changeset viewer.