Class GrammarUtil


  • public class GrammarUtil
    extends java.lang.Object
    • Field Detail

      • EMPTY_EXPRESSIONS_ARRAY

        public static final BnfExpression[] EMPTY_EXPRESSIONS_ARRAY
    • Constructor Detail

      • GrammarUtil

        public GrammarUtil()
    • Method Detail

      • getDummyAwarePrevSibling

        public static com.intellij.psi.PsiElement getDummyAwarePrevSibling​(com.intellij.psi.PsiElement child)
      • 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 java.util.List<BnfExpression> getExternalRuleExpressions​(@NotNull
                                                                               @NotNull BnfRule subRule)
      • collectMetaParameters

        public static java.util.List<java.lang.String> collectMetaParameters​(BnfRule rule,
                                                                             BnfExpression expression)
      • unquote

        @NotNull
        public static @NotNull java.lang.String unquote​(@NotNull
                                                        @NotNull java.lang.String str)
      • isDoubleAngles

        public static boolean isDoubleAngles​(@Nullable
                                             @Nullable java.lang.String str)
      • processExpressionNames

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

        public static boolean processPinnedExpressions​(BnfRule rule,
                                                       com.intellij.util.Processor<BnfExpression> 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 java.lang.String getMethodName​(BnfRule rule,
                                                     com.intellij.psi.PsiElement element)
      • getIdText

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

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

        public static boolean isIdQuoted​(@Nullable
                                         @Nullable java.lang.String text)