Changes between Version 6 and Version 7 of Developer


Ignore:
Timestamp:
07/02/14 13:27:31 (10 years ago)
Author:
hkaulbersch
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Developer

    v6 v7  
    5757 
    5858{{{ 
    59 @CheckdefvoidcheckUnusedRule(Rule rule) {      var      List<RuleReference      > references = EbnfAnalysisUtils      .      findReferences      (rule);      var      List<Rule> references1 =        EbnfAnalysisUtils      .      findReferences      (rule,resourceDescriptions);      if      ((references.size+references1.size ==0) && (rule.getRulenumber() !=1)) warning(   unusedRuleDescription   , EbnfPackage   $Literals::   RULE__   NAME   ,   unusedRuleDescription   , rule.name);}For this the@Checkannotation defines that the next function is a Validationcheck. 
     59        @Check 
     60        def void checkUnusedRule(Rule rule) { 
     61 
     62                var List<RuleReference> references = EbnfAnalysisUtils.findReferences(rule); 
     63                var List<Rule> references1 = EbnfAnalysisUtils.findReferences(rule,resourceDescriptions); 
     64                if ((references.size+references1.size == 0) && (rule.getRulenumber() != 1)) 
     65                        warning(unusedRuleDescription, EbnfPackage$Literals::RULE__NAME, unusedRuleDescription, rule.name); 
     66        } 
    6067}}} 
    6168The parameter can be any Entity from the previously defined Grammar and every Entity of this Type will be checked this way. 
     
    208215def text(ImportSection sec){'Imports'} 
    209216}}} 
    210 ==  File import allows to reference Rules from one BNF-Document in another: == 
     217== File import allows to reference Rules from one BNF-Document in another: == 
    211218There are 2 ways for imports, via URI and VIA Namespaces: 
    212219