Changeset 63 in default for v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src
- Timestamp:
- 04/27/14 16:04:29 (11 years ago)
- Location:
- v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/formatting/EbnfFormatter.xtend
r61 r63 33 33 c.setLinewrap.before(f.ruleRule); 34 34 c.setLinewrap.before(f.importRule); 35 c.setNoSpace.after(f.ruleAccess.rulenumberINTTerminalRuleCall_0_0_0) 35 36 // //c.setLinewrap.after(f.); 36 37 // for (Keyword bar : f.findKeywords("|")) { -
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/generator/EbnfGenerator.xtend
r62 r63 26 26 */ 27 27 class EbnfGenerator implements IGenerator { 28 //generation of the file blaaa28 //generation of the xsl-file 29 29 override void doGenerate(Resource resource, IFileSystemAccess fsa) { 30 30 for (e : resource.allContents.toIterable.filter(EtsiBnf)) { … … 39 39 ''' 40 40 <?xml version="1.0"?> 41 <!-- fop hello.xml -rtf hello.rtf -->41 <!-- fop «bnf.name».xml -rtf «bnf.name».rtf --> 42 42 <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> 43 43 … … 63 63 ''' 64 64 65 def compile(Rule rule)'''<fo:block><fo:inline id="«rule.name»" color="purple">« rule.name»</fo:inline> ::= «rule.definitionList.compile»</block>'''65 def compile(Rule rule)'''<fo:block><fo:inline id="«rule.name»" color="purple">«IF rule.rulenumber!=0»«rule.rulenumber».\t«ENDIF»«rule.name»</fo:inline> ::= «rule.definitionList.compile»</block>''' 66 66 67 67 def compile(DefinitionList dList)'''«FOR sDef:dList.singleDefinition»«sDef.compile»«IF !sDef.equals(dList.singleDefinition.last)» | «ENDIF»«ENDFOR»''' -
v2/trunk/de.ugoe.cs.swe.bnftools.ebnf/src/de/ugoe/cs/swe/bnftools/validation/EbnfValidator.xtend
r61 r63 26 26 class EbnfValidator extends AbstractEbnfValidator { 27 27 28 static final String ruleReferencedOneDescription = "The rule is only referenced by one other rule";29 static final String passthroughRuleDescription = "The rule is a passthrough rule";30 static final String unreferencedPassthroughRuleDescription = "The rule is an unreferenced passthrough rule";31 static final String unusedRuleDescription = "The rule is not referenced anywhere";32 static final String equalAlternativeDescription = "The rule contains equal alternatives";33 static final String duplicateRulesDescription = "The rule is a duplicate";34 // 35 static final String nonUniqueNameDescription = "The rule has the same Name as the Rule in Line ";28 public static final String ruleReferencedOneDescription = "The rule is only referenced by one other rule"; 29 public static final String passthroughRuleDescription = "The rule is a passthrough rule"; 30 public static final String unreferencedPassthroughRuleDescription = "The rule is an unreferenced passthrough rule"; 31 public static final String unusedRuleDescription = "The rule is not referenced anywhere"; 32 public static final String equalAlternativeDescription = "The rule contains equal alternatives"; 33 public static final String duplicateRulesDescription = "The rule is a duplicate"; 34 //public static final String duplicateSubRulesDescription = "A part the of rule is a duplicate"; 35 public static final String nonUniqueNameDescription = "The rule has the same Name as the Rule in Line "; 36 36 37 37 // ---------------------------------------------------------------------------------------------------- … … 49 49 50 50 if (references.size() == 1 && rule.rulenumber != 1) { 51 warning(ruleReferencedOneDescription, EbnfPackage$Literals::RULE__NAME );51 warning(ruleReferencedOneDescription, EbnfPackage$Literals::RULE__NAME,ruleReferencedOneDescription,rule.name); 52 52 } 53 53 } … … 122 122 123 123 if ((references.size() == 0) && (rule.getRulenumber() != 1)) 124 warning(unusedRuleDescription, EbnfPackage$Literals::RULE__NAME );124 warning(unusedRuleDescription, EbnfPackage$Literals::RULE__NAME,unusedRuleDescription,rule.name); 125 125 } 126 126
Note: See TracChangeset
for help on using the changeset viewer.