org.eclipse.xtext.xtext
Class GrammarWithoutLeftRecursionInspector

java.lang.Object
  extended by org.eclipse.xtext.util.XtextSwitch<java.lang.Boolean>
      extended by org.eclipse.xtext.xtext.GrammarWithoutLeftRecursionInspector
All Implemented Interfaces:
ValidationMessageAcceptor

public class GrammarWithoutLeftRecursionInspector
extends XtextSwitch<java.lang.Boolean>
implements ValidationMessageAcceptor

Author:
Sebastian Zarnekow - Initial contribution and API

Field Summary
 
Fields inherited from class org.eclipse.xtext.util.XtextSwitch
modelPackage
 
Fields inherited from interface org.eclipse.xtext.validation.ValidationMessageAcceptor
INSIGNIFICANT_INDEX
 
Constructor Summary
GrammarWithoutLeftRecursionInspector(ValidationMessageAcceptor validationMessageAcceptor)
           
 
Method Summary
 void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with an error.
 void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
           
 void acceptError(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with an error.
 void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with an info message.
 void acceptInfo(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with an info message..
 void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, int index, java.lang.String code, java.lang.String... issueData)
          Annotate an instance, a feature value, or all feature values with a warning.
 void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, org.eclipse.emf.ecore.EStructuralFeature feature, java.lang.String code, java.lang.String... issueData)
           
 void acceptWarning(java.lang.String message, org.eclipse.emf.ecore.EObject object, int offset, int length, java.lang.String code, java.lang.String... issueData)
          Annotate a range of the resource with a warning.
 java.lang.Boolean caseAbstractElement(AbstractElement object)
          Returns the result of interpreting the object as an instance of 'Abstract Element'
 java.lang.Boolean caseAbstractRule(AbstractRule object)
          Returns the result of interpreting the object as an instance of 'Abstract Rule'
 java.lang.Boolean caseAction(Action object)
          Returns the result of interpreting the object as an instance of 'Action'
 java.lang.Boolean caseAlternatives(Alternatives object)
          Returns the result of interpreting the object as an instance of 'Alternatives'
 java.lang.Boolean caseAssignment(Assignment object)
          Returns the result of interpreting the object as an instance of 'Assignment'
 java.lang.Boolean caseCrossReference(CrossReference object)
          Returns the result of interpreting the object as an instance of 'Cross Reference'
 java.lang.Boolean caseEnumLiteralDeclaration(EnumLiteralDeclaration object)
          Returns the result of interpreting the object as an instance of 'Enum Literal Declaration'
 java.lang.Boolean caseGrammar(Grammar grammar)
          Returns the result of interpreting the object as an instance of 'Grammar'
 java.lang.Boolean caseGroup(Group object)
          Returns the result of interpreting the object as an instance of 'Group'
 java.lang.Boolean caseRuleCall(RuleCall object)
          Returns the result of interpreting the object as an instance of 'Rule Call'
 java.lang.Boolean caseUnorderedGroup(UnorderedGroup object)
          Returns the result of interpreting the object as an instance of 'Unordered Group'
 void createErrorMessages(RuleCall object)
           
 void inspect(Grammar grammar)
           
 
Methods inherited from class org.eclipse.xtext.util.XtextSwitch
caseAbstractMetamodelDeclaration, caseAbstractNegatedToken, caseCharacterRange, caseCompoundElement, caseEnumRule, caseEOF, caseGeneratedMetamodel, caseKeyword, caseNegatedToken, caseParserRule, caseReferencedMetamodel, caseTerminalRule, caseTypeRef, caseUntilToken, caseWildcard, defaultCase, doSwitch, doSwitch, doSwitch
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrammarWithoutLeftRecursionInspector

public GrammarWithoutLeftRecursionInspector(ValidationMessageAcceptor validationMessageAcceptor)
Method Detail

inspect

public void inspect(Grammar grammar)

caseGrammar

public java.lang.Boolean caseGrammar(Grammar grammar)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Grammar'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseGrammar in class XtextSwitch<java.lang.Boolean>
Parameters:
grammar - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Grammar'.
See Also:
doSwitch(EObject)

caseAbstractRule

public java.lang.Boolean caseAbstractRule(AbstractRule object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Abstract Rule'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAbstractRule in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Abstract Rule'.
See Also:
doSwitch(EObject)

caseEnumLiteralDeclaration

public java.lang.Boolean caseEnumLiteralDeclaration(EnumLiteralDeclaration object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Enum Literal Declaration'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseEnumLiteralDeclaration in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Enum Literal Declaration'.
See Also:
doSwitch(EObject)

caseRuleCall

public java.lang.Boolean caseRuleCall(RuleCall object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Rule Call'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseRuleCall in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Rule Call'.
See Also:
doSwitch(EObject)

caseAbstractElement

public java.lang.Boolean caseAbstractElement(AbstractElement object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Abstract Element'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAbstractElement in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Abstract Element'.
See Also:
doSwitch(EObject)

caseAction

public java.lang.Boolean caseAction(Action object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Action'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAction in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Action'.
See Also:
doSwitch(EObject)

caseGroup

public java.lang.Boolean caseGroup(Group object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Group'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseGroup in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Group'.
See Also:
doSwitch(EObject)

caseAlternatives

public java.lang.Boolean caseAlternatives(Alternatives object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Alternatives'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAlternatives in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Alternatives'.
See Also:
doSwitch(EObject)

caseUnorderedGroup

public java.lang.Boolean caseUnorderedGroup(UnorderedGroup object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Unordered Group'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseUnorderedGroup in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Unordered Group'.
See Also:
doSwitch(EObject)

caseAssignment

public java.lang.Boolean caseAssignment(Assignment object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Assignment'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseAssignment in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Assignment'.
See Also:
doSwitch(EObject)

caseCrossReference

public java.lang.Boolean caseCrossReference(CrossReference object)
Description copied from class: XtextSwitch
Returns the result of interpreting the object as an instance of 'Cross Reference'. This implementation returns null; returning a non-null result will terminate the switch.

Overrides:
caseCrossReference in class XtextSwitch<java.lang.Boolean>
Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Cross Reference'.
See Also:
doSwitch(EObject)

createErrorMessages

public void createErrorMessages(RuleCall object)

acceptError

public void acceptError(java.lang.String message,
                        org.eclipse.emf.ecore.EObject object,
                        org.eclipse.emf.ecore.EStructuralFeature feature,
                        java.lang.String code,
                        java.lang.String... issueData)

acceptWarning

public void acceptWarning(java.lang.String message,
                          org.eclipse.emf.ecore.EObject object,
                          org.eclipse.emf.ecore.EStructuralFeature feature,
                          java.lang.String code,
                          java.lang.String... issueData)

acceptError

public void acceptError(java.lang.String message,
                        org.eclipse.emf.ecore.EObject object,
                        org.eclipse.emf.ecore.EStructuralFeature feature,
                        int index,
                        java.lang.String code,
                        java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate an instance, a feature value, or all feature values with an error.

Specified by:
acceptError in interface ValidationMessageAcceptor
Parameters:
message - the error message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
code - the optional issue code.
issueData - the optional issue data.

acceptError

public void acceptError(java.lang.String message,
                        org.eclipse.emf.ecore.EObject object,
                        int offset,
                        int length,
                        java.lang.String code,
                        java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate a range of the resource with an error.

Specified by:
acceptError in interface ValidationMessageAcceptor
Parameters:
message - the error message. May not be null.
offset - the absolute offset in the resource.
length - the length of the erroneous range.
code - the optional issue code.
issueData - the optional issue data.

acceptWarning

public void acceptWarning(java.lang.String message,
                          org.eclipse.emf.ecore.EObject object,
                          org.eclipse.emf.ecore.EStructuralFeature feature,
                          int index,
                          java.lang.String code,
                          java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate an instance, a feature value, or all feature values with a warning.

Specified by:
acceptWarning in interface ValidationMessageAcceptor
Parameters:
message - the warning message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
code - the optional issue code.
issueData - the optional issue data.

acceptWarning

public void acceptWarning(java.lang.String message,
                          org.eclipse.emf.ecore.EObject object,
                          int offset,
                          int length,
                          java.lang.String code,
                          java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate a range of the resource with a warning.

Specified by:
acceptWarning in interface ValidationMessageAcceptor
Parameters:
message - the warning message. May not be null.
offset - the absolute offset in the resource.
length - the length of the invalid range.
code - the optional issue code.
issueData - the optional issue data.

acceptInfo

public void acceptInfo(java.lang.String message,
                       org.eclipse.emf.ecore.EObject object,
                       org.eclipse.emf.ecore.EStructuralFeature feature,
                       int index,
                       java.lang.String code,
                       java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate an instance, a feature value, or all feature values with an info message.

Specified by:
acceptInfo in interface ValidationMessageAcceptor
Parameters:
message - the info message. May not be null.
object - the object or the feature holder. May not be null.
feature - the feature or null if the complete instance should be annotated.
code - the optional issue code.
issueData - the optional issue data.

acceptInfo

public void acceptInfo(java.lang.String message,
                       org.eclipse.emf.ecore.EObject object,
                       int offset,
                       int length,
                       java.lang.String code,
                       java.lang.String... issueData)
Description copied from interface: ValidationMessageAcceptor
Annotate a range of the resource with an info message..

Specified by:
acceptInfo in interface ValidationMessageAcceptor
Parameters:
message - the info message. May not be null.
offset - the absolute offset in the resource.
length - the length of the annotated range.
code - the optional issue code.
issueData - the optional issue data.