Class GrammarUtil

java.lang.Object
org.intellij.grammar.psi.impl.GrammarUtil

public class GrammarUtil extends Object
  • Field Details

    • EMPTY_EXPRESSIONS_ARRAY

      public static final BnfExpression[] EMPTY_EXPRESSIONS_ARRAY
  • Constructor Details

    • GrammarUtil

      public GrammarUtil()
  • Method Details

    • getDummyAwarePrevSibling

      public static com.intellij.psi.PsiElement getDummyAwarePrevSibling(com.intellij.psi.PsiElement child)
    • equalsElement

      public static boolean equalsElement(BnfExpression e1, BnfExpression e2)
    • isInAttributesReference

      public static boolean isInAttributesReference(@Nullable @Nullable com.intellij.psi.PsiElement element)
    • isOneTokenExpression

      public static boolean isOneTokenExpression(@Nullable @Nullable BnfExpression e1)
    • isExternalReference

      public static boolean isExternalReference(@Nullable @Nullable com.intellij.psi.PsiElement psiElement)
    • getExternalRuleExpressions

      public static List<BnfExpression> getExternalRuleExpressions(@NotNull @NotNull BnfRule subRule)
    • collectMetaParameters

      public static List<String> collectMetaParameters(BnfRule rule, BnfExpression expression)
    • unquote

      @NotNull public static @NotNull String unquote(@NotNull @NotNull String str)
    • isDoubleAngles

      public static boolean isDoubleAngles(@Nullable @Nullable String str)
    • processExpressionNames

      public static boolean processExpressionNames(BnfRule rule, String funcName, BnfExpression expression, com.intellij.util.PairProcessor<? super String,? super BnfExpression> processor)
    • processPinnedExpressions

      public static boolean processPinnedExpressions(BnfRule rule, com.intellij.util.Processor<? super BnfExpression> processor)
    • processPinnedExpressions

      public static boolean processPinnedExpressions(BnfRule rule, com.intellij.util.PairProcessor<? super BnfExpression,? super ParserGeneratorUtil.PinMatcher> processor)
    • isAtomicExpression

      public static boolean isAtomicExpression(BnfExpression tree)
    • bnfTraverser

      public static com.intellij.psi.SyntaxTraverser<com.intellij.psi.PsiElement> bnfTraverser(com.intellij.psi.PsiElement root)
    • bnfTraverserNoAttrs

      public static com.intellij.psi.SyntaxTraverser<com.intellij.psi.PsiElement> bnfTraverserNoAttrs(com.intellij.psi.PsiElement root)
    • getMethodName

      public static String getMethodName(BnfRule rule, com.intellij.psi.PsiElement element)
    • getIdText

      @NotNull public static @NotNull String getIdText(@Nullable @Nullable com.intellij.psi.PsiElement id)
    • stripQuotesAroundId

      @Contract("!null->!null") public static String stripQuotesAroundId(String text)
    • isIdQuoted

      public static boolean isIdQuoted(@Nullable @Nullable String text)