haidubogdan commented on code in PR #7618: URL: https://github.com/apache/netbeans/pull/7618#discussion_r1796451136
########## php/php.blade/src/org/netbeans/modules/php/blade/syntax/antlr4/v10/BladeAntlrLexer.java: ########## @@ -0,0 +1,2607 @@ +// Generated from java-escape by ANTLR 4.11.1 + + /* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.netbeans.modules.php.blade.syntax.antlr4.v10; + +import org.antlr.v4.runtime.Lexer; +import org.antlr.v4.runtime.CharStream; +import org.antlr.v4.runtime.Token; +import org.antlr.v4.runtime.TokenStream; +import org.antlr.v4.runtime.*; +import org.antlr.v4.runtime.atn.*; +import org.antlr.v4.runtime.dfa.DFA; +import org.antlr.v4.runtime.misc.*; + +@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"}) +public class BladeAntlrLexer extends LexerAdaptor { + static { RuntimeMetaData.checkVersion("4.11.1", RuntimeMetaData.VERSION); } + + protected static final DFA[] _decisionToDFA; + protected static final PredictionContextCache _sharedContextCache = + new PredictionContextCache(); + public static final int + PHP_EXPRESSION=1, PHP_VARIABLE=2, PHP_KEYWORD=3, PHP_NEW=4, PHP_IDENTIFIER=5, + PHP_NAMESPACE_PATH=6, PHP_STATIC_ACCESS=7, PHP_CLASS_KEYWORD=8, PHP_INSTANCE_ACCESS=9, + BLADE_PARAM_EXTRA=10, BLADE_PARAM_LPAREN=11, BLADE_PARAM_RPAREN=12, BLADE_EXPR_LPAREN=13, + BLADE_EXPR_RPAREN=14, BL_SQ_LPAREN=15, BL_SQ_LRAREN=16, BL_PARAM_STRING=17, + BL_PARAM_ASSIGN=18, BL_COMMA=19, BL_PARAM_COMMA=20, PHP_EXPR_STRING=21, + ERROR=22, HTML=23, BLADE_COMMENT=24, D_IF=25, D_ELSEIF=26, D_ELSE=27, + D_ENDIF=28, D_SWITCH=29, D_CASE=30, D_DEFAULT=31, D_ENDSWITCH=32, D_EMPTY=33, + D_ENDEMPTY=34, D_COND_BLOCK_START=35, D_COND_BLOCK_END=36, D_FOREACH=37, + D_ENDFOREACH=38, D_FOR=39, D_ENDFOR=40, D_FORELSE=41, D_ENDFORELSE=42, + D_WHILE=43, D_ENDWHILE=44, D_BREAK=45, D_LOOP_ACTION=46, D_INCLUDE=47, + D_INCLUDE_IF=48, D_INCLUDE_WHEN=49, D_INCLUDE_FIRST=50, D_INCLUDE_UNLESS=51, + D_EACH=52, D_EXTENDS=53, D_JS=54, D_JSON=55, D_SECTION=56, D_HAS_SECTION=57, + D_SECTION_MISSING=58, D_ENDSECTION=59, D_YIELD=60, D_PARENT=61, D_SHOW=62, + D_OVERWRITE=63, D_STOP=64, D_APPEND=65, D_ONCE=66, D_ENDONCE=67, D_STACK=68, + D_PUSH=69, D_ENDPUSH=70, D_PUSH_IF=71, D_ENDPUSH_IF=72, D_PUSH_ONCE=73, + D_ENDPUSH_ONCE=74, D_PREPEND=75, D_ENDPREPEND=76, D_PROPS=77, D_FRAGMENT=78, + D_ENDFRAGMENT=79, D_CSRF=80, D_METHOD=81, D_ERROR=82, D_ENDERROR=83, D_PRODUCTION=84, + D_ENDPRODUCTION=85, D_ENV=86, D_ENDENV=87, D_AUTH_START=88, D_AUTH_END=89, + D_PERMISSION_START=90, D_PERMISSION_ELSE=91, D_PERMISSION_END=92, D_CLASS=93, + D_STYLE=94, D_HTML_ATTR_EXPR=95, D_AWARE=96, D_SESSION=97, D_ENDSESSION=98, + D_DD=99, D_LANG=100, D_USE=101, D_INJECT=102, D_PHP=103, D_VERBATIM=104, + D_ENDVERBATIM=105, D_LIVEWIRE=106, D_ASSET_BUNDLER=107, D_MISC=108, D_CUSTOM=109, + D_UNKNOWN_ATTR_ENC=110, D_UNKNOWN=111, CONTENT_TAG_OPEN=112, RAW_TAG_OPEN=113, + PHP_INLINE_START=114, HTML_COMPONENT_PREFIX=115, JS_SCRIPT=116, HTML_TAG_START=117, + HTML_CLOSE_TAG=118, STRING_PATH=119, HTML_PATH=120, HTML_TEXT=121, HTML_IDENTIFIER=122, + EQ=123, WS=124, OTHER=125, BLADE_COMMENT_START=126, CONTENT_TAG_CLOSE=127, + REGULAR_ECHO_EXPR_MORE=128, RAW_TAG_CLOSE=129, RAW_ECHO_EXPR_MORE=130, + WS_EXPR_ESCAPE=131, WS_EXPR=132, WS_COMPOSED_EXPR=133, EXPR_STRING=134, + COMPOSED_EXPR_RPAREN=135, PHP_COMPOSED_EXPRESSION=136, WS_BL_PARAM=137, + FOREACH_WS_EXPR=138, FOREACH_LOOP_LPAREN=139, FOREACH_LOOP_RPAREN=140, + FOREACH_AS=141, FOREACH_PARAM_ASSIGN=142, BL_PARAM_LINE_COMMENT=143, BL_SQ_RPAREN=144, + BL_PARAM_RPAREN=145, BL_PARAM_CONCAT_OPERATOR=146, BL_COMMA_EL=147, BL_PARAM_WS=148, + BL_NAME_STRING=149, PHP_D_BLADE_COMMENT=150, PHP_D_BLADE_ML_COMMENT=151, + D_ENDPHP=152, PHP_D_WS=153, PHP_D_PHP_COMPOSED_EXPRESSION=154, PHP_EXIT=155, + PHP_INLINE_COMMENT=156, PHP_INLINE_ML_COMMENT=157, VERBATIM_HTML=158, + BLADE_COMMENT_END=159, BLADE_COMMENT_PEEK=160, BLADE_COMMENT_MORE=161, + BLADE_COMMENT_EOF=162, AT=163, RAW_TAG_START=164, REGULAR_ECHO_STATIC_ACCESS=165, + REGULAR_ECHO_LPAREN=166, REGULAR_ECHO_RPAREN=167, REGULAR_ECHO_INSTANCE_ACCESS=168, + PHP_D_EXPR_CURLY_LPAREN=169, PHP_D_EXPR_CURLY_RPAREN=170, PHP_D_CLASS=171; + public static final int + COMMENT=2, PHP_CODE=3; + public static final int + INSIDE_REGULAR_ECHO=1, INSIDE_RAW_ECHO=2, LOOK_FOR_PHP_EXPRESSION=3, INSIDE_PHP_EXPRESSION=4, + LOOK_FOR_PHP_COMPOSED_EXPRESSION=5, INSIDE_PHP_COMPOSED_EXPRESSION=6, + LOOK_FOR_BLADE_PARAMETERS=7, FOREACH_LOOP_EXPRESSION=8, INSIDE_BLADE_PARAMETERS=9, + BLADE_INLINE_PHP=10, INSIDE_PHP_INLINE=11, VERBATIM_MODE=12, INSIDE_BLADE_COMMENT=13; + public static String[] channelNames = { + "DEFAULT_TOKEN_CHANNEL", "HIDDEN", "COMMENT", "PHP_CODE" + }; + + public static String[] modeNames = { + "DEFAULT_MODE", "INSIDE_REGULAR_ECHO", "INSIDE_RAW_ECHO", "LOOK_FOR_PHP_EXPRESSION", + "INSIDE_PHP_EXPRESSION", "LOOK_FOR_PHP_COMPOSED_EXPRESSION", "INSIDE_PHP_COMPOSED_EXPRESSION", + "LOOK_FOR_BLADE_PARAMETERS", "FOREACH_LOOP_EXPRESSION", "INSIDE_BLADE_PARAMETERS", + "BLADE_INLINE_PHP", "INSIDE_PHP_INLINE", "VERBATIM_MODE", "INSIDE_BLADE_COMMENT" + }; + + private static String[] makeRuleNames() { + return new String[] { + "CompomentIdentifier", "CssSelector", "JsFunctionStart", "StringParam", + "CssAttrSelector", "StringAttrValue", "D_IF", "D_ELSEIF", "D_ELSE", "D_ENDIF", + "D_SWITCH", "D_CASE", "D_DEFAULT", "D_ENDSWITCH", "D_EMPTY", "D_ENDEMPTY", + "D_COND_BLOCK_START", "D_COND_BLOCK_END", "D_FOREACH", "D_ENDFOREACH", + "D_FOR", "D_ENDFOR", "D_FORELSE", "D_ENDFORELSE", "D_WHILE", "D_ENDWHILE", + "D_BREAK", "D_LOOP_ACTION", "D_INCLUDE", "D_INCLUDE_IF", "D_INCLUDE_WHEN", + "D_INCLUDE_FIRST", "D_INCLUDE_UNLESS", "D_EACH", "D_EXTENDS", "D_JS", + "D_JSON", "D_SECTION", "D_HAS_SECTION", "D_SECTION_MISSING", "D_ENDSECTION", + "D_YIELD", "D_PARENT", "D_SHOW", "D_OVERWRITE", "D_STOP", "D_APPEND", + "D_ONCE", "D_ENDONCE", "D_STACK", "D_PUSH", "D_ENDPUSH", "D_PUSH_IF", + "D_ENDPUSH_IF", "D_PUSH_ONCE", "D_ENDPUSH_ONCE", "D_PREPEND", "D_ENDPREPEND", + "D_PROPS", "D_FRAGMENT", "D_ENDFRAGMENT", "D_CSRF", "D_METHOD", "D_ERROR", + "D_ENDERROR", "D_PRODUCTION", "D_ENDPRODUCTION", "D_ENV", "D_ENDENV", + "D_AUTH_START", "D_AUTH_END", "D_PERMISSION_START", "D_PERMISSION_ELSE", + "D_PERMISSION_END", "D_CLASS", "D_STYLE", "D_HTML_ATTR_EXPR", "D_AWARE", + "D_SESSION", "D_ENDSESSION", "D_DD", "D_LANG", "D_USE", "D_INJECT", "D_PHP_SHORT", + "D_PHP", "D_VERBATIM", "D_ENDVERBATIM", "D_LIVEWIRE", "D_ASSET_BUNDLER", + "D_MISC", "D_CUSTOM", "D_UNKNOWN_ATTR_ENC", "D_UNKNOWN", "CONTENT_TAG_OPEN", + "RAW_TAG_OPEN", "AT", "RAW_TAG_START", "PHP_INLINE_START", "HTML_COMPONENT_PREFIX", + "HTML_L_COMPONENT", "JS_SCRIPT", "HTML_TAG_START", "HTML_CLOSE_TAG", + "HTML_TAG_SELF_CLOSE", "HTML_CLOSE_SYMBOL", "STRING_PATH", "HTML_PATH", + "HTML_TEXT", "HTML_IDENTIFIER", "EQ", "WS", "OTHER", "NameString", "BladeLabel", + "FullIdentifier", "ESC_DOUBLE_QUOTED_STRING", "DOUBLE_QUOTED_STRING_FRAGMENT", + "SINGLE_QUOTED_STRING_FRAGMENT", "LineComment", "PhpVariable", "PhpKeyword", + "Digit", "BLADE_COMMENT_START", "EMAIL_SUBSTRING", "VERSION_WITH_AT", + "D_ESCAPES", "REGULAR_ECHO_PHP_VAR", "REGULAR_ECHO_KEYWORD", "REGULAR_PHP_NAMESPACE_PATH", + "REGULAR_ECHO_PHP_IDENTIFIER", "REGULAR_ECHO_STATIC_ACCESS", "CONTENT_TAG_CLOSE", + "REGULAR_ECHO_LPAREN", "REGULAR_ECHO_RPAREN", "REGULAR_ECHO_INSTANCE_ACCESS", + "REGULAR_ECHO_EXPR_MORE", "EXIT_REGULAR_ECHO_EOF", "RAW_ECHO_PHP_VAR", + "RAW_ECHO_KEYWORD", "RAW_ECHO_PHP_NAMESPACE_PATH", "RAW_ECHO_PHP_IDENTIFIER", + "RAW_ECHO_STATIC_ACCESS", "RAW_TAG_CLOSE", "RAW_ECHO_LPAREN", "RAW_ECHO_RPAREN", + "RAW_ECHO_INSTANCE_ACCESS", "RAW_ECHO_EXPR_MORE", "EXIT_RAW_ECHO_EOF", + "WS_EXPR_ESCAPE", "WS_EXPR", "OPEN_EXPR_PAREN_MORE", "L_OHTER_ESCAPE", + "L_OTHER", "OPEN_EXPR_PAREN", "CLOSE_EXPR_PAREN", "LPAREN", "RPAREN", + "EXIT_RPAREN", "PHP_EXPRESSION_MORE", "EXIT_EOF", "WS_COMPOSED_EXPR", + "BLADE_EXPR_LPAREN", "L_COMPOSED_EXPR_OTHER", "EXPR_SQ_LPAREN", "EXPR_SQ_RPAREN", + "EXPR_CURLY_LPAREN", "EXPR_CURLY_RPAREN", "EXPR_STRING", "COMPOSED_EXPR_PHP_VAR", + "COMPOSED_PHP_KEYWORD", "COMPOSED_PHP_NAMESPACE_PATH", "COMPOSED_EXPR_PHP_IDENTIFIER", + "COMPOSED_EXPR_STATIC_ACCESS", "COMPOSED_EXPR_LPAREN", "COMPOSED_EXPR_RPAREN", + "PHP_COMPOSED_EXPRESSION", "EXIT_COMPOSED_EXPRESSION_EOF", "WS_BL_PARAM", + "OPEN_BL_PARAM_PAREN_MORE", "L_BL_PARAM_OTHER", "FOREACH_WS_EXPR", "FOREACH_LOOP_LPAREN", + "FOREACH_LOOP_RPAREN", "FOREACH_AS", "FOREACH_PHP_VARIABLE", "FOREACH_PARAM_ASSIGN", + "LOOP_COMPOSED_PHP_KEYWORD", "LOOP_NAME_STRING", "LOOP_STATIC_ACCESS", + "LOOP_PHP_EXPRESSION", "FOREACH_EOF", "BL_PARAM_LINE_COMMENT", "BL_SQ_LPAREN", + "BL_SQ_RPAREN", "BL_CURLY_LPAREN", "BL_CURLY_RPAREN", "BL_PARAM_LPAREN", + "BL_PARAM_RPAREN", "BL_PARAM_STRING", "BL_PARAM_PHP_VARIABLE", "BL_PARAM_ASSIGN", + "BL_PARAM_PHP_KEYWORD", "BL_PARAM_CONCAT_OPERATOR", "BL_COMMA_EL", "BL_PARAM_WS", + "BL_NAME_STRING", "BL_PARAM_MORE", "BL_PARAM_EXIT_EOF", "PHP_D_BLADE_COMMENT", + "PHP_D_BLADE_ML_COMMENT", "D_ENDPHP", "PHP_D_UNKNOWN", "PHP_D_EXPR_SQ_LPAREN", + "PHP_D_EXPR_SQ_RPAREN", "PHP_D_EXPR_CURLY_LPAREN", "PHP_D_EXPR_CURLY_RPAREN", + "PHP_D_EXPR_STRING", "PHP_D_COMPOSED_EXPR_PHP_VAR", "PHP_D_NEW", "PHP_D_CLASS", + "PHP_D_COMPOSED_PHP_KEYWORD", "PHP_D_NAMESPACE_PATH", "PHP_D_COMPOSED_EXPR_PHP_CLASS_IDENTIFIER", + "PHP_D_COMPOSED_EXPR_PHP_IDENTIFIER", "PHP_D_COMPOSED_EXPR_STATIC_ACCESS", + "PHP_D_COMPOSED_EXPR_LPAREN", "PHP_D_COMPOSED_EXPR_RPAREN", "PHP_D_WS", + "PHP_D_EXIT_COMPOSED_EXPRESSION_EOF", "PHP_D_PHP_COMPOSED_EXPRESSION", + "PHP_EXIT", "PHP_INLINE_COMMENT", "PHP_INLINE_ML_COMMENT", "PHP_EXPR_SQ_LPAREN", + "PHP_EXPR_SQ_RPAREN", "PHP_EXPR_CURLY_LPAREN", "PHP_EXPR_CURLY_RPAREN", + "PHP_EXPR_STRING", "PHP_COMPOSED_EXPR_PHP_VAR", "PHP_COMPOSED_PHP_KEYWORD", + "PHP_COMPOSED_EXPR_PHP_IDENTIFIER", "PHP_COMPOSED_EXPR_STATIC_ACCESS", + "PHP_COMPOSED_EXPR_INSTANCE_ACCESS", "PHP_COMPOSED_EXPR_LPAREN", "PHP_COMPOSED_EXPR_RPAREN", + "PHP_EXIT_COMPOSED_EXPRESSION_EOF", "PHP_PHP_COMPOSED_EXPRESSION", "D_ENDVERBATIM_IN_MODE", + "VERBATIM_HTML", "EXIT_VERBATIM_MOD_EOF", "VERBATIM_HTML_MORE", "BLADE_COMMENT_END", + "BLADE_COMMENT_PEEK", "BLADE_COMMENT_MORE", "BLADE_COMMENT_EOF" + }; + } + public static final String[] ruleNames = makeRuleNames(); + + private static String[] makeLiteralNames() { + return new String[] { + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, null, null, null, null, null, null, null, null, null, null, + null, "'@if'", "'@elseif'", "'@else'", "'@endif'", "'@switch'", "'@case'", + "'@default'", "'@endswitch'", "'@empty'", "'@endempty'", null, null, + "'@foreach'", "'@endforeach'", "'@for'", "'@endfor'", "'@forelse'", "'@endforelse'", + "'@while'", "'@endwhile'", "'@break'", null, "'@include'", "'@includeIf'", + "'@includeWhen'", "'@includeFirst'", "'@includeUnless'", "'@each'", "'@extends'", + "'@js'", "'@json'", "'@section'", "'@hasSection'", "'@sectionMissing'", + "'@endsection'", "'@yield'", "'@parent'", "'@show'", "'@overwrite'", + "'@stop'", "'@append'", "'@once'", "'@endonce'", "'@stack'", "'@push'", + "'@endpush'", "'@pushIf'", "'@endPushIf'", "'@pushOnce'", "'@endPushOnce'", + "'@prepend'", "'@endprepend'", "'@props'", "'@fragment'", "'@endfragment'", + "'@csrf'", "'@method'", "'@error'", "'@enderror'", "'@production'", "'@endproduction'", + "'@env'", "'@endenv'", null, null, null, null, null, "'@class'", "'@style'", + null, "'@aware'", "'@session'", "'@endsession'", null, "'@lang'", "'@use'", + "'@inject'", null, "'@verbatim'", "'@endverbatim'", null, "'@vite'", + "'@viteReactRefresh'", null, null, null, "'{{'", "'{!!'", null, null, + null, null, null, null, null, null, null, "'='", null, null, "'{{--'", + null, null, null, null, null, null, null, null, null, null, null, null, + null, null, "'as'", null, null, null, null, "'.'", "','", null, null, + null, null, "'@endphp'", "' '", null, "'?>'", null, null, null, "'--}}'", + null, null, null, null, "'{!'", null, null, null, null, null, null, "'class'" + }; + } + private static final String[] _LITERAL_NAMES = makeLiteralNames(); + private static String[] makeSymbolicNames() { + return new String[] { + null, "PHP_EXPRESSION", "PHP_VARIABLE", "PHP_KEYWORD", "PHP_NEW", "PHP_IDENTIFIER", + "PHP_NAMESPACE_PATH", "PHP_STATIC_ACCESS", "PHP_CLASS_KEYWORD", "PHP_INSTANCE_ACCESS", + "BLADE_PARAM_EXTRA", "BLADE_PARAM_LPAREN", "BLADE_PARAM_RPAREN", "BLADE_EXPR_LPAREN", + "BLADE_EXPR_RPAREN", "BL_SQ_LPAREN", "BL_SQ_LRAREN", "BL_PARAM_STRING", + "BL_PARAM_ASSIGN", "BL_COMMA", "BL_PARAM_COMMA", "PHP_EXPR_STRING", "ERROR", + "HTML", "BLADE_COMMENT", "D_IF", "D_ELSEIF", "D_ELSE", "D_ENDIF", "D_SWITCH", + "D_CASE", "D_DEFAULT", "D_ENDSWITCH", "D_EMPTY", "D_ENDEMPTY", "D_COND_BLOCK_START", + "D_COND_BLOCK_END", "D_FOREACH", "D_ENDFOREACH", "D_FOR", "D_ENDFOR", + "D_FORELSE", "D_ENDFORELSE", "D_WHILE", "D_ENDWHILE", "D_BREAK", "D_LOOP_ACTION", + "D_INCLUDE", "D_INCLUDE_IF", "D_INCLUDE_WHEN", "D_INCLUDE_FIRST", "D_INCLUDE_UNLESS", + "D_EACH", "D_EXTENDS", "D_JS", "D_JSON", "D_SECTION", "D_HAS_SECTION", + "D_SECTION_MISSING", "D_ENDSECTION", "D_YIELD", "D_PARENT", "D_SHOW", + "D_OVERWRITE", "D_STOP", "D_APPEND", "D_ONCE", "D_ENDONCE", "D_STACK", + "D_PUSH", "D_ENDPUSH", "D_PUSH_IF", "D_ENDPUSH_IF", "D_PUSH_ONCE", "D_ENDPUSH_ONCE", + "D_PREPEND", "D_ENDPREPEND", "D_PROPS", "D_FRAGMENT", "D_ENDFRAGMENT", + "D_CSRF", "D_METHOD", "D_ERROR", "D_ENDERROR", "D_PRODUCTION", "D_ENDPRODUCTION", + "D_ENV", "D_ENDENV", "D_AUTH_START", "D_AUTH_END", "D_PERMISSION_START", + "D_PERMISSION_ELSE", "D_PERMISSION_END", "D_CLASS", "D_STYLE", "D_HTML_ATTR_EXPR", + "D_AWARE", "D_SESSION", "D_ENDSESSION", "D_DD", "D_LANG", "D_USE", "D_INJECT", + "D_PHP", "D_VERBATIM", "D_ENDVERBATIM", "D_LIVEWIRE", "D_ASSET_BUNDLER", + "D_MISC", "D_CUSTOM", "D_UNKNOWN_ATTR_ENC", "D_UNKNOWN", "CONTENT_TAG_OPEN", + "RAW_TAG_OPEN", "PHP_INLINE_START", "HTML_COMPONENT_PREFIX", "JS_SCRIPT", + "HTML_TAG_START", "HTML_CLOSE_TAG", "STRING_PATH", "HTML_PATH", "HTML_TEXT", + "HTML_IDENTIFIER", "EQ", "WS", "OTHER", "BLADE_COMMENT_START", "CONTENT_TAG_CLOSE", + "REGULAR_ECHO_EXPR_MORE", "RAW_TAG_CLOSE", "RAW_ECHO_EXPR_MORE", "WS_EXPR_ESCAPE", + "WS_EXPR", "WS_COMPOSED_EXPR", "EXPR_STRING", "COMPOSED_EXPR_RPAREN", + "PHP_COMPOSED_EXPRESSION", "WS_BL_PARAM", "FOREACH_WS_EXPR", "FOREACH_LOOP_LPAREN", + "FOREACH_LOOP_RPAREN", "FOREACH_AS", "FOREACH_PARAM_ASSIGN", "BL_PARAM_LINE_COMMENT", + "BL_SQ_RPAREN", "BL_PARAM_RPAREN", "BL_PARAM_CONCAT_OPERATOR", "BL_COMMA_EL", + "BL_PARAM_WS", "BL_NAME_STRING", "PHP_D_BLADE_COMMENT", "PHP_D_BLADE_ML_COMMENT", + "D_ENDPHP", "PHP_D_WS", "PHP_D_PHP_COMPOSED_EXPRESSION", "PHP_EXIT", + "PHP_INLINE_COMMENT", "PHP_INLINE_ML_COMMENT", "VERBATIM_HTML", "BLADE_COMMENT_END", + "BLADE_COMMENT_PEEK", "BLADE_COMMENT_MORE", "BLADE_COMMENT_EOF", "AT", + "RAW_TAG_START", "REGULAR_ECHO_STATIC_ACCESS", "REGULAR_ECHO_LPAREN", + "REGULAR_ECHO_RPAREN", "REGULAR_ECHO_INSTANCE_ACCESS", "PHP_D_EXPR_CURLY_LPAREN", + "PHP_D_EXPR_CURLY_RPAREN", "PHP_D_CLASS" + }; + } + private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames(); + public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES); + + /** + * @deprecated Use {@link #VOCABULARY} instead. + */ + @Deprecated + public static final String[] tokenNames; + static { + tokenNames = new String[_SYMBOLIC_NAMES.length]; + for (int i = 0; i < tokenNames.length; i++) { + tokenNames[i] = VOCABULARY.getLiteralName(i); + if (tokenNames[i] == null) { + tokenNames[i] = VOCABULARY.getSymbolicName(i); + } + + if (tokenNames[i] == null) { + tokenNames[i] = "<INVALID>"; + } + } + } + + @Override + @Deprecated + public String[] getTokenNames() { + return tokenNames; + } + + @Override + + public Vocabulary getVocabulary() { + return VOCABULARY; + } + + + public BladeAntlrLexer(CharStream input) { + super(input); + _interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache); + } + + @Override + public String getGrammarFileName() { return "BladeAntlrLexer.g4"; } + + @Override + public String[] getRuleNames() { return ruleNames; } + + @Override + public String getSerializedATN() { return _serializedATN; } + + @Override + public String[] getChannelNames() { return channelNames; } + + @Override + public String[] getModeNames() { return modeNames; } + + @Override + public ATN getATN() { return _ATN; } + + @Override + public void action(RuleContext _localctx, int ruleIndex, int actionIndex) { + switch (ruleIndex) { + case 99: + HTML_COMPONENT_PREFIX_action((RuleContext)_localctx, actionIndex); + break; + case 104: + HTML_TAG_SELF_CLOSE_action((RuleContext)_localctx, actionIndex); + break; + case 105: + HTML_CLOSE_SYMBOL_action((RuleContext)_localctx, actionIndex); + break; + case 109: + HTML_IDENTIFIER_action((RuleContext)_localctx, actionIndex); + break; + case 154: + OPEN_EXPR_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 155: + CLOSE_EXPR_PAREN_action((RuleContext)_localctx, actionIndex); + break; + case 156: + LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 157: + RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 162: + BLADE_EXPR_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 164: + EXPR_SQ_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 165: + EXPR_SQ_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 166: + EXPR_CURLY_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 167: + EXPR_CURLY_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 174: + COMPOSED_EXPR_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 175: + COMPOSED_EXPR_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 179: + OPEN_BL_PARAM_PAREN_MORE_action((RuleContext)_localctx, actionIndex); + break; + case 182: + FOREACH_LOOP_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 183: + FOREACH_LOOP_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 193: + BL_SQ_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 194: + BL_SQ_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 195: + BL_CURLY_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 196: + BL_CURLY_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 197: + BL_PARAM_LPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 198: + BL_PARAM_RPAREN_action((RuleContext)_localctx, actionIndex); + break; + case 204: + BL_COMMA_EL_action((RuleContext)_localctx, actionIndex); + break; + } + } + private void HTML_COMPONENT_PREFIX_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 0: + this.compomentTagOpen = true; + break; + } + } + private void HTML_TAG_SELF_CLOSE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 1: + this.compomentTagOpen = false; + break; + } + } + private void HTML_CLOSE_SYMBOL_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 2: + this.compomentTagOpen = false; + break; + } + } + private void HTML_IDENTIFIER_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 3: + this.consumeHtmlIdentifier(); + break; + } + } + private void OPEN_EXPR_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 4: + this.increaseRoundParenBalance(); + break; + } + } + private void CLOSE_EXPR_PAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 5: + this.decreaseRoundParenBalance(); + break; + } + } + private void LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 6: + this.increaseRoundParenBalance(); + break; + } + } + private void RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 7: + this.decreaseRoundParenBalance(); + break; + } + } + private void BLADE_EXPR_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 8: + this.roundParenBalance = 0; + break; + } + } + private void EXPR_SQ_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 9: + this.squareParenBalance++; + break; + } + } + private void EXPR_SQ_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 10: + this.squareParenBalance--; + break; + } + } + private void EXPR_CURLY_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 11: + this.curlyParenBalance++; + break; + } + } + private void EXPR_CURLY_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 12: + this.curlyParenBalance--; + break; + } + } + private void COMPOSED_EXPR_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 13: + this.increaseRoundParenBalance(); + break; + } + } + private void COMPOSED_EXPR_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 14: + consumeExprRParen(); + break; + } + } + private void OPEN_BL_PARAM_PAREN_MORE_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 15: + this.roundParenBalance = 0; + break; + } + } + private void FOREACH_LOOP_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 16: + this.increaseRoundParenBalance(); + break; + } + } + private void FOREACH_LOOP_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 17: + this.decreaseRoundParenBalance(); if (this.roundParenBalance == 0){this.popMode();} + break; + } + } + private void BL_SQ_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 18: + this.squareParenBalance++; + break; + } + } + private void BL_SQ_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 19: + this.squareParenBalance--; + break; + } + } + private void BL_CURLY_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 20: + this.curlyParenBalance++; + break; + } + } + private void BL_CURLY_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 21: + this.curlyParenBalance--; + break; + } + } + private void BL_PARAM_LPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 22: + this.increaseRoundParenBalance(); + break; + } + } + private void BL_PARAM_RPAREN_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 23: + consumeParamRParen(); + break; + } + } + private void BL_COMMA_EL_action(RuleContext _localctx, int actionIndex) { + switch (actionIndex) { + case 24: + this.consumeBladeParamComma(); + break; + } + } + @Override + public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) { + switch (ruleIndex) { + case 2: + return JsFunctionStart_sempred((RuleContext)_localctx, predIndex); + case 84: + return D_PHP_SHORT_sempred((RuleContext)_localctx, predIndex); + case 85: + return D_PHP_sempred((RuleContext)_localctx, predIndex); + case 91: + return D_CUSTOM_sempred((RuleContext)_localctx, predIndex); + case 92: + return D_UNKNOWN_ATTR_ENC_sempred((RuleContext)_localctx, predIndex); + case 93: + return D_UNKNOWN_sempred((RuleContext)_localctx, predIndex); + case 100: + return HTML_L_COMPONENT_sempred((RuleContext)_localctx, predIndex); + case 149: + return WS_EXPR_ESCAPE_sempred((RuleContext)_localctx, predIndex); + case 152: + return L_OHTER_ESCAPE_sempred((RuleContext)_localctx, predIndex); + case 154: + return OPEN_EXPR_PAREN_sempred((RuleContext)_localctx, predIndex); + case 155: + return CLOSE_EXPR_PAREN_sempred((RuleContext)_localctx, predIndex); + case 156: + return LPAREN_sempred((RuleContext)_localctx, predIndex); + case 157: + return RPAREN_sempred((RuleContext)_localctx, predIndex); + case 158: + return EXIT_RPAREN_sempred((RuleContext)_localctx, predIndex); + case 219: + return PHP_D_NEW_sempred((RuleContext)_localctx, predIndex); + case 249: + return VERBATIM_HTML_sempred((RuleContext)_localctx, predIndex); + case 253: + return BLADE_COMMENT_PEEK_sempred((RuleContext)_localctx, predIndex); + } + return true; + } + private boolean JsFunctionStart_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 0: + return this._input.LA(1) != '{'; + } + return true; + } + private boolean D_PHP_SHORT_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 1: + return this._input.LA(1) == '('; + } + return true; + } + private boolean D_PHP_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 2: + return this._input.LA(1) == ' ' || this._input.LA(1) == '\r' || this._input.LA(1) == '\n'; + } + return true; + } + private boolean D_CUSTOM_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 3: + return this._input.LA(1) == '(' || + (this._input.LA(1) == ' ' && this._input.LA(2) == '('); + } + return true; + } + private boolean D_UNKNOWN_ATTR_ENC_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 4: + return this._input.LA(1) == '"'; + } + return true; + } + private boolean D_UNKNOWN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 5: + return this._input.LA(1) != '"'; + } + return true; + } + private boolean HTML_L_COMPONENT_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 6: + return this._input.LA(1) == '>'; + } + return true; + } + private boolean WS_EXPR_ESCAPE_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 7: + return this._input.LA(1) == '@'; + } + return true; + } + private boolean L_OHTER_ESCAPE_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 8: + return this._input.LA(1) == '@'; + } + return true; + } + private boolean OPEN_EXPR_PAREN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 9: + return this.roundParenBalance == 0; + } + return true; + } + private boolean CLOSE_EXPR_PAREN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 10: + return this.roundParenBalance == 1; + } + return true; + } + private boolean LPAREN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 11: + return this.roundParenBalance > 0; + } + return true; + } + private boolean RPAREN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 12: + return this.roundParenBalance > 0; + } + return true; + } + private boolean EXIT_RPAREN_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 13: + return this.roundParenBalance == 0; + } + return true; + } + private boolean PHP_D_NEW_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 14: + return this._input.LA(1) == ' '; + } + return true; + } + private boolean VERBATIM_HTML_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 15: + return + this._input.LA(1) == '@' && + this._input.LA(2) == 'e' && + this._input.LA(3) == 'n' && + this._input.LA(4) == 'd' && + this._input.LA(5) == 'v' && + this._input.LA(6) == 'e' && + this._input.LA(7) == 'r' + ; + } + return true; + } + private boolean BLADE_COMMENT_PEEK_sempred(RuleContext _localctx, int predIndex) { + switch (predIndex) { + case 16: + return + this._input.LA(1) == '-' && + this._input.LA(2) == '-' && + this._input.LA(3) == '}' && + this._input.LA(4) == '}' + ; + } + return true; + } + + private static final String _serializedATNSegment0 = + "\u0004\u0000\u00ab\u0b4c\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ + "\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ + "\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff"+ + "\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0006\uffff\uffff\u0002\u0000"+ + "\u0007\u0000\u0002\u0001\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003"+ + "\u0007\u0003\u0002\u0004\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006"+ Review Comment: Hi @mbien I've removed the generated antlr *.java files from the repo and set the build task for antlr lexer & parser as a extension of `extensionOf="-pre-compile"` ``` <target name="generate-antlr-parser" description="Regenerate the ANTLRv4 parser" depends="init" extensionOf="-pre-compile"> ``` Seems to work fine. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
