mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
Merge branch 'itsaky:main' into main
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,363 @@
|
||||
package com.itsaky.androidide.language.cpp;
|
||||
|
||||
import static com.itsaky.androidide.lexers.cpp.CPP14Lexer.*;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.LITERAL;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.OPERATOR;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.TEXT_NORMAL;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.TYPE_NAME;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forComment;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forKeyword;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forString;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.get;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.withoutCompletion;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.itsaky.androidide.language.IAnalyzeManager;
|
||||
import com.itsaky.androidide.lexers.cpp.CPP14Lexer;
|
||||
import com.itsaky.androidide.lexers.cpp.CPP14Parser;
|
||||
import com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE;
|
||||
import com.itsaky.androidide.utils.CharSequenceReader;
|
||||
import com.itsaky.androidide.utils.ILogger;
|
||||
import com.itsaky.lsp.models.DiagnosticItem;
|
||||
import com.itsaky.lsp.models.DiagnosticSeverity;
|
||||
import com.itsaky.lsp.models.Position;
|
||||
import com.itsaky.lsp.models.Range;
|
||||
|
||||
import io.github.rosemoe.sora.lang.analysis.SimpleAnalyzeManager;
|
||||
import io.github.rosemoe.sora.lang.styling.CodeBlock;
|
||||
import io.github.rosemoe.sora.lang.styling.MappedSpans;
|
||||
import io.github.rosemoe.sora.lang.styling.Span;
|
||||
import io.github.rosemoe.sora.lang.styling.Styles;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CodePointCharStream;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
public class CppAnalyzer extends SimpleAnalyzeManager<Void> implements IAnalyzeManager {
|
||||
|
||||
private static final ILogger LOG = ILogger.newInstance("CppAnalyzer");
|
||||
private final List<DiagnosticItem> ideDiagnostics = new ArrayList<>();
|
||||
private List<DiagnosticItem> diagnostics = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void updateDiagnostics(@NonNull List<DiagnosticItem> diagnostics) {
|
||||
this.diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public List<DiagnosticItem> getDiagnostics() {
|
||||
final var result = new ArrayList<>(ideDiagnostics);
|
||||
if (diagnostics != null && !diagnostics.isEmpty()) {
|
||||
result.addAll(diagnostics);
|
||||
}
|
||||
result.sort(DiagnosticItem.START_COMPARATOR);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Styles analyze(StringBuilder text, Delegate<Void> delegate) {
|
||||
final var styles = new Styles();
|
||||
final var colors = new MappedSpans.Builder();
|
||||
final CodePointCharStream stream;
|
||||
try {
|
||||
stream = CharStreams.fromReader(new CharSequenceReader(text));
|
||||
} catch (IOException e) {
|
||||
LOG.error("Unable to read text to analyze", e);
|
||||
return styles;
|
||||
}
|
||||
|
||||
final var lexer = new CPP14Lexer(stream);
|
||||
// final var parser = new CPP14Parser(new CommonTokenStream(lexer));
|
||||
final var stack = new Stack<CodeBlock>();
|
||||
Token token;
|
||||
int line, column, lastLine = 1, currSwitch = 0, maxSwitch = 0, type, previous = 0;
|
||||
boolean isFirst = true;
|
||||
|
||||
ideDiagnostics.clear();
|
||||
|
||||
while (!delegate.isCancelled()) {
|
||||
token = lexer.nextToken();
|
||||
if (token == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
line = token.getLine() - 1;
|
||||
column = token.getCharPositionInLine();
|
||||
type = token.getType();
|
||||
|
||||
if (type == CPP14Lexer.EOF) {
|
||||
lastLine = line;
|
||||
break;
|
||||
}
|
||||
|
||||
final var tokenLength = token.getText().length();
|
||||
|
||||
switch (type) {
|
||||
case Whitespace:
|
||||
if (isFirst) {
|
||||
colors.addNormalIfNull();
|
||||
}
|
||||
break;
|
||||
case Alignas:
|
||||
case Alignof:
|
||||
case Asm:
|
||||
case Auto:
|
||||
case Break:
|
||||
case Class:
|
||||
case Const:
|
||||
case Catch:
|
||||
case Case:
|
||||
case Constexpr:
|
||||
case Const_cast:
|
||||
case Continue:
|
||||
case Decltype:
|
||||
case Default:
|
||||
case Delete:
|
||||
case Do:
|
||||
case Dynamic_cast:
|
||||
case Else:
|
||||
case Enum:
|
||||
case Explicit:
|
||||
case Export:
|
||||
case Extern:
|
||||
case Final:
|
||||
case For:
|
||||
case Friend:
|
||||
case Goto:
|
||||
case If:
|
||||
case Inline:
|
||||
case Mutable:
|
||||
case Namespace:
|
||||
case New:
|
||||
case Noexcept:
|
||||
case Operator:
|
||||
case Override:
|
||||
case Private:
|
||||
case Protected:
|
||||
case Public:
|
||||
case Register:
|
||||
case Reinterpret_cast:
|
||||
case Return:
|
||||
case Sizeof:
|
||||
case Signed:
|
||||
case Static:
|
||||
case Static_cast:
|
||||
case Static_assert:
|
||||
case Struct:
|
||||
case Switch:
|
||||
case Template:
|
||||
case This:
|
||||
case Throw:
|
||||
case Thread_local:
|
||||
case Try:
|
||||
case Typedef:
|
||||
case Typeid_:
|
||||
case Typename_:
|
||||
case Unsigned:
|
||||
case Union:
|
||||
case Using:
|
||||
case Virtual:
|
||||
case Volatile:
|
||||
case While:
|
||||
case Void:
|
||||
colors.addIfNeeded(line, column, forKeyword());
|
||||
break;
|
||||
case Bool:
|
||||
case Char:
|
||||
case Char16:
|
||||
case Char32:
|
||||
case Double:
|
||||
case Float:
|
||||
case Int:
|
||||
case Long:
|
||||
case Short:
|
||||
case Wchar:
|
||||
colors.addIfNeeded(line, column, get(TYPE_NAME));
|
||||
break;
|
||||
case LeftParen:
|
||||
case LeftBracket:
|
||||
case LeftBrace:
|
||||
case Dot:
|
||||
case RightParen:
|
||||
case RightBracket:
|
||||
case RightBrace:
|
||||
case Semi:
|
||||
case Comma:
|
||||
colors.addIfNeeded(line, column, get(OPERATOR));
|
||||
break;
|
||||
case Plus:
|
||||
case Minus:
|
||||
case Star:
|
||||
case Div:
|
||||
case Mod:
|
||||
case Caret:
|
||||
case And:
|
||||
case Or:
|
||||
case Tilde:
|
||||
case Not:
|
||||
case Assign:
|
||||
case Less:
|
||||
case Greater:
|
||||
case PlusAssign:
|
||||
case MinusAssign:
|
||||
case StarAssign:
|
||||
case DivAssign:
|
||||
case ModAssign:
|
||||
case XorAssign:
|
||||
case AndAssign:
|
||||
case OrAssign:
|
||||
case RightShiftAssign:
|
||||
case LeftShiftAssign:
|
||||
case Equal:
|
||||
case NotEqual:
|
||||
case LessEqual:
|
||||
case GreaterEqual:
|
||||
case AndAnd:
|
||||
case OrOr:
|
||||
case PlusPlus:
|
||||
case MinusMinus:
|
||||
case Arrow:
|
||||
case ArrowStar:
|
||||
case Question:
|
||||
case Colon:
|
||||
case Doublecolon:
|
||||
case DotStar:
|
||||
case Ellipsis:
|
||||
colors.addIfNeeded(line, column, get(OPERATOR));
|
||||
break;
|
||||
case IntegerLiteral:
|
||||
case DecimalLiteral:
|
||||
case OctalLiteral:
|
||||
case HexadecimalLiteral:
|
||||
case BinaryLiteral:
|
||||
case Integersuffix:
|
||||
case CharacterLiteral:
|
||||
case FloatingLiteral:
|
||||
case StringLiteral:
|
||||
case BooleanLiteral:
|
||||
case Nullptr:
|
||||
case True_:
|
||||
case False_:
|
||||
colors.addIfNeeded(line, column, get(LITERAL));
|
||||
break;
|
||||
case BlockComment:
|
||||
colors.addIfNeeded(line, column, forComment());
|
||||
break;
|
||||
case LineComment:
|
||||
var commentType = SchemeAndroidIDE.COMMENT;
|
||||
|
||||
// highlight special line comments
|
||||
var commentText = token.getText();
|
||||
if (commentText.length() > 2) {
|
||||
commentText = commentText.substring(2);
|
||||
commentText = commentText.trim();
|
||||
|
||||
var mark = true;
|
||||
if ("todo".equalsIgnoreCase(commentText.substring(0, 4))) {
|
||||
commentType = SchemeAndroidIDE.TODO_COMMENT;
|
||||
} else if ("fixme".equalsIgnoreCase(commentText.substring(0, 5))) {
|
||||
commentType = SchemeAndroidIDE.FIXME_COMMENT;
|
||||
} else {
|
||||
mark = false;
|
||||
}
|
||||
|
||||
if (mark) {
|
||||
if (diagnostics == null) {
|
||||
diagnostics = new ArrayList<>();
|
||||
}
|
||||
final var diagnostic = new DiagnosticItem();
|
||||
diagnostic.setSeverity(DiagnosticSeverity.WARNING);
|
||||
diagnostic.setMessage(commentText);
|
||||
diagnostic.setCode("special.comment");
|
||||
diagnostic.setRange(
|
||||
new Range(
|
||||
new Position(line, column),
|
||||
new Position(line, column + tokenLength)));
|
||||
diagnostic.setSource(commentText);
|
||||
ideDiagnostics.add(diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
colors.addIfNeeded(line, column, withoutCompletion(commentType));
|
||||
break;
|
||||
case MultiLineMacro:
|
||||
case Directive:
|
||||
colors.addIfNeeded(line, column, forString());
|
||||
break;
|
||||
|
||||
default:
|
||||
colors.addIfNeeded(line, column, get(TEXT_NORMAL));
|
||||
break;
|
||||
}
|
||||
|
||||
isFirst = false;
|
||||
if (type != Whitespace) {
|
||||
previous = type;
|
||||
}
|
||||
}
|
||||
|
||||
if (stack.isEmpty() && currSwitch > maxSwitch) {
|
||||
maxSwitch = currSwitch;
|
||||
}
|
||||
|
||||
colors.determine(lastLine);
|
||||
styles.setSuppressSwitch(maxSwitch + 10);
|
||||
if (diagnostics != null && !diagnostics.isEmpty()) {
|
||||
markDiagnostics(colors, diagnostics);
|
||||
}
|
||||
|
||||
if (!ideDiagnostics.isEmpty()) {
|
||||
markDiagnostics(colors, ideDiagnostics);
|
||||
}
|
||||
|
||||
styles.spans = colors.build();
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
private void markDiagnostics(MappedSpans.Builder colors, List<DiagnosticItem> diagnostics) {
|
||||
diagnostics.sort(DiagnosticItem.START_COMPARATOR);
|
||||
for (var d : diagnostics) {
|
||||
if (d == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var start = d.getRange().getStart();
|
||||
var end = d.getRange().getEnd();
|
||||
|
||||
try {
|
||||
colors.markProblemRegion(
|
||||
convertToSpanFlag(d.getSeverity()),
|
||||
start.getLine(),
|
||||
start.getColumn(),
|
||||
end.getLine(),
|
||||
end.getColumn());
|
||||
} catch (Throwable e) {
|
||||
// Might happen frequently if user types faster
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
private int convertToSpanFlag(@NonNull DiagnosticSeverity severity) {
|
||||
switch (severity) {
|
||||
case WARNING:
|
||||
return Span.FLAG_WARNING;
|
||||
case ERROR:
|
||||
return Span.FLAG_ERROR;
|
||||
case HINT:
|
||||
case INFO:
|
||||
default:
|
||||
return Span.FLAG_TYPO;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
/************************************************************************************
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AndroidIDE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
**************************************************************************************/
|
||||
package com.itsaky.androidide.language.cpp;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.itsaky.androidide.language.IDELanguage;
|
||||
|
||||
import com.itsaky.androidide.language.java.JavaLanguage;
|
||||
import com.itsaky.androidide.utils.CharSequenceReader;
|
||||
import com.itsaky.androidide.utils.ILogger;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import java.io.StringReader;
|
||||
import com.itsaky.androidide.lexers.cpp.CPP14Lexer;
|
||||
|
||||
import io.github.rosemoe.sora.lang.analysis.AnalyzeManager;
|
||||
import io.github.rosemoe.sora.lang.completion.CompletionCancelledException;
|
||||
import io.github.rosemoe.sora.lang.completion.CompletionPublisher;
|
||||
import io.github.rosemoe.sora.lang.smartEnter.NewlineHandleResult;
|
||||
import io.github.rosemoe.sora.lang.smartEnter.NewlineHandler;
|
||||
import io.github.rosemoe.sora.text.CharPosition;
|
||||
import io.github.rosemoe.sora.text.ContentReference;
|
||||
import io.github.rosemoe.sora.text.TextUtils;
|
||||
import io.github.rosemoe.sora.widget.SymbolPairMatch;
|
||||
|
||||
public class CppLanguage extends IDELanguage {
|
||||
|
||||
private static final ILogger LOG = ILogger.newInstance("CppLanguage");
|
||||
private CppAnalyzer analyzer;
|
||||
private final NewlineHandler[] newlineHandlers = new NewlineHandler[] {new BraceHandler()};
|
||||
|
||||
public CppLanguage() {
|
||||
analyzer = new CppAnalyzer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndentAdvance(@NonNull String line) {
|
||||
try {
|
||||
CPP14Lexer lexer = new CPP14Lexer(CharStreams.fromReader(new StringReader(line)));
|
||||
Token token;
|
||||
int advance = 0;
|
||||
while (((token = lexer.nextToken()) != null && token.getType() != token.EOF)) {
|
||||
switch (token.getType()) {
|
||||
case CPP14Lexer.LeftBrace:
|
||||
advance++;
|
||||
break;
|
||||
case CPP14Lexer.RightBrace:
|
||||
advance--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
advance = Math.max(0, advance);
|
||||
return advance * getTabSize();
|
||||
} catch (Throwable e) {
|
||||
LOG.error("Error calculating indent advance", e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SymbolPairMatch getSymbolPairs() {
|
||||
return new CppSymbolPairs();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public AnalyzeManager getAnalyzeManager() {
|
||||
return analyzer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterruptionLevel() {
|
||||
return INTERRUPTION_LEVEL_STRONG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requireAutoComplete(
|
||||
@NonNull ContentReference content,
|
||||
@NonNull CharPosition position,
|
||||
@NonNull CompletionPublisher publisher,
|
||||
@NonNull Bundle extraArguments)
|
||||
throws CompletionCancelledException {
|
||||
|
||||
// completer.complete(content, position, publisher, extraArguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndentAdvance(@NonNull ContentReference content, int line, int column) {
|
||||
return getIndentAdvance(content.getLine(line).substring(0, column));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence format(CharSequence content) {
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewlineHandler[] getNewlineHandlers() {
|
||||
return newlineHandlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
analyzer = null;
|
||||
}
|
||||
|
||||
private static class CppSymbolPairs extends SymbolPairMatch {
|
||||
public CppSymbolPairs() {
|
||||
super.putPair('{', new Replacement("{}", 1));
|
||||
super.putPair('(', new Replacement("()", 1));
|
||||
super.putPair('[', new Replacement("[]", 1));
|
||||
super.putPair('"', new Replacement("\"\"", 1));
|
||||
super.putPair('\'', new Replacement("''", 1));
|
||||
super.putPair('<', new Replacement("<>", 1));
|
||||
}
|
||||
}
|
||||
|
||||
class BraceHandler implements NewlineHandler {
|
||||
|
||||
@Override
|
||||
public boolean matchesRequirement(String beforeText, String afterText) {
|
||||
beforeText = beforeText.trim();
|
||||
afterText = afterText.trim();
|
||||
return beforeText.endsWith("{") && afterText.startsWith("}");
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewlineHandleResult handleNewline(String beforeText, String afterText, int tabSize) {
|
||||
int count = TextUtils.countLeadingSpaceCount(beforeText, tabSize);
|
||||
int advanceBefore = getIndentAdvance(beforeText);
|
||||
int advanceAfter = getIndentAdvance(afterText);
|
||||
String text;
|
||||
StringBuilder sb =
|
||||
new StringBuilder("\n")
|
||||
.append(
|
||||
TextUtils.createIndent(
|
||||
count + advanceBefore, tabSize, useTab()))
|
||||
.append('\n')
|
||||
.append(
|
||||
text =
|
||||
TextUtils.createIndent(
|
||||
count + advanceAfter, tabSize, useTab()));
|
||||
int shiftLeft = text.length() + 1;
|
||||
return new NewlineHandleResult(sb, shiftLeft);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,387 @@
|
||||
package com.itsaky.androidide.language.kotlin;
|
||||
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.ANNOTATION;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.LITERAL;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.OPERATOR;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.TEXT_NORMAL;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forComment;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forKeyword;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.forString;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.get;
|
||||
import static com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE.withoutCompletion;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.itsaky.androidide.language.IAnalyzeManager;
|
||||
import com.itsaky.androidide.lexers.kotlin.KotlinLexer;
|
||||
import com.itsaky.androidide.lexers.kotlin.KotlinParser;
|
||||
import com.itsaky.androidide.syntax.colorschemes.SchemeAndroidIDE;
|
||||
import com.itsaky.androidide.utils.CharSequenceReader;
|
||||
import com.itsaky.androidide.utils.ILogger;
|
||||
import com.itsaky.lsp.models.DiagnosticItem;
|
||||
import com.itsaky.lsp.models.DiagnosticSeverity;
|
||||
import com.itsaky.lsp.models.Position;
|
||||
import com.itsaky.lsp.models.Range;
|
||||
|
||||
import io.github.rosemoe.sora.lang.analysis.SimpleAnalyzeManager;
|
||||
import io.github.rosemoe.sora.lang.styling.CodeBlock;
|
||||
import io.github.rosemoe.sora.lang.styling.MappedSpans;
|
||||
import io.github.rosemoe.sora.lang.styling.Span;
|
||||
import io.github.rosemoe.sora.lang.styling.Styles;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.CodePointCharStream;
|
||||
import org.antlr.v4.runtime.CommonTokenStream;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
import org.jetbrains.annotations.Contract;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Stack;
|
||||
|
||||
public class KotlinAnalyzer extends SimpleAnalyzeManager<Void> implements IAnalyzeManager {
|
||||
|
||||
private static final ILogger LOG = ILogger.newInstance("KotlinAnalyzer");
|
||||
private final List<DiagnosticItem> ideDiagnostics = new ArrayList<>();
|
||||
private List<DiagnosticItem> diagnostics = new ArrayList<>();
|
||||
|
||||
@Override
|
||||
public void updateDiagnostics(@NonNull List<DiagnosticItem> diagnostics) {
|
||||
this.diagnostics = diagnostics;
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public List<DiagnosticItem> getDiagnostics() {
|
||||
final var result = new ArrayList<>(ideDiagnostics);
|
||||
if (diagnostics != null && !diagnostics.isEmpty()) {
|
||||
result.addAll(diagnostics);
|
||||
}
|
||||
result.sort(DiagnosticItem.START_COMPARATOR);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Styles analyze(StringBuilder text, Delegate<Void> delegate) {
|
||||
final var styles = new Styles();
|
||||
final var colors = new MappedSpans.Builder();
|
||||
final CodePointCharStream stream;
|
||||
try {
|
||||
stream = CharStreams.fromReader(new CharSequenceReader(text));
|
||||
} catch (IOException e) {
|
||||
LOG.error("Unable to read text to analyze", e);
|
||||
return styles;
|
||||
}
|
||||
|
||||
final var lexer = new KotlinLexer(stream);
|
||||
// final var parser = new KotlinParser(new CommonTokenStream(lexer));
|
||||
final var stack = new Stack<CodeBlock>();
|
||||
Token token;
|
||||
int line, column, lastLine = 1, currSwitch = 0, maxSwitch = 0, type, previous = 0;
|
||||
boolean isFirst = true;
|
||||
|
||||
ideDiagnostics.clear();
|
||||
|
||||
while (!delegate.isCancelled()) {
|
||||
token = lexer.nextToken();
|
||||
if (token == null) {
|
||||
break;
|
||||
}
|
||||
|
||||
line = token.getLine() - 1;
|
||||
column = token.getCharPositionInLine();
|
||||
type = token.getType();
|
||||
|
||||
if (type == KotlinLexer.EOF) {
|
||||
lastLine = line;
|
||||
break;
|
||||
}
|
||||
|
||||
final var tokenLength = token.getText().length();
|
||||
switch (type) {
|
||||
case KotlinLexer.WS:
|
||||
if (isFirst) {
|
||||
colors.addNormalIfNull();
|
||||
}
|
||||
break;
|
||||
// annotatoons
|
||||
case KotlinLexer.AT_NO_WS:
|
||||
case KotlinLexer.AT_POST_WS:
|
||||
case KotlinLexer.AT_PRE_WS:
|
||||
case KotlinLexer.AT_BOTH_WS:
|
||||
colors.addIfNeeded(line, column, get(ANNOTATION));
|
||||
break;
|
||||
// lexicalModifiers
|
||||
case KotlinLexer.ANNOTATION:
|
||||
case KotlinLexer.ABSTRACT:
|
||||
case KotlinLexer.BY:
|
||||
case KotlinLexer.CATCH:
|
||||
case KotlinLexer.COMPANION:
|
||||
case KotlinLexer.CONSTRUCTOR:
|
||||
case KotlinLexer.CROSSINLINE:
|
||||
case KotlinLexer.DATA:
|
||||
case KotlinLexer.DYNAMIC:
|
||||
case KotlinLexer.ENUM:
|
||||
case KotlinLexer.EXTERNAL:
|
||||
case KotlinLexer.FINAL:
|
||||
case KotlinLexer.FINALLY:
|
||||
case KotlinLexer.IMPORT:
|
||||
case KotlinLexer.INFIX:
|
||||
case KotlinLexer.INIT:
|
||||
case KotlinLexer.INLINE:
|
||||
case KotlinLexer.INNER:
|
||||
case KotlinLexer.INTERNAL:
|
||||
case KotlinLexer.LATEINIT:
|
||||
case KotlinLexer.NOINLINE:
|
||||
case KotlinLexer.OPEN:
|
||||
case KotlinLexer.OPERATOR:
|
||||
case KotlinLexer.OUT:
|
||||
case KotlinLexer.OVERRIDE:
|
||||
case KotlinLexer.PRIVATE:
|
||||
case KotlinLexer.PROTECTED:
|
||||
case KotlinLexer.PUBLIC:
|
||||
case KotlinLexer.REIFIED:
|
||||
case KotlinLexer.SEALED:
|
||||
case KotlinLexer.TAILREC:
|
||||
case KotlinLexer.VARARG:
|
||||
case KotlinLexer.WHERE:
|
||||
case KotlinLexer.GET:
|
||||
case KotlinLexer.SET:
|
||||
case KotlinLexer.FIELD:
|
||||
case KotlinLexer.PROPERTY:
|
||||
case KotlinLexer.RECEIVER:
|
||||
case KotlinLexer.PARAM:
|
||||
case KotlinLexer.SETPARAM:
|
||||
case KotlinLexer.DELEGATE:
|
||||
case KotlinLexer.FILE:
|
||||
case KotlinLexer.EXPECT:
|
||||
case KotlinLexer.ACTUAL:
|
||||
case KotlinLexer.VALUE:
|
||||
case KotlinLexer.CONST:
|
||||
case KotlinLexer.SUSPEND:
|
||||
colors.addIfNeeded(line, column, forKeyword());
|
||||
break;
|
||||
// SECTION: literals
|
||||
case KotlinLexer.RealLiteral:
|
||||
case KotlinLexer.FloatLiteral:
|
||||
case KotlinLexer.DoubleLiteral:
|
||||
case KotlinLexer.IntegerLiteral:
|
||||
case KotlinLexer.HexLiteral:
|
||||
case KotlinLexer.BinLiteral:
|
||||
case KotlinLexer.UnsignedLiteral:
|
||||
case KotlinLexer.LongLiteral:
|
||||
case KotlinLexer.BooleanLiteral:
|
||||
case KotlinLexer.NullLiteral:
|
||||
case KotlinLexer.CharacterLiteral:
|
||||
colors.addIfNeeded(line, column, get(LITERAL));
|
||||
break;
|
||||
// strings
|
||||
case KotlinLexer.QUOTE_OPEN:
|
||||
case KotlinLexer.TRIPLE_QUOTE_OPEN:
|
||||
case KotlinLexer.QUOTE_CLOSE:
|
||||
case KotlinLexer.LineStrRef:
|
||||
case KotlinLexer.LineStrText:
|
||||
case KotlinLexer.LineStrEscapedChar:
|
||||
case KotlinLexer.LineStrExprStart:
|
||||
case KotlinLexer.TRIPLE_QUOTE_CLOSE:
|
||||
case KotlinLexer.MultiLineStringQuote:
|
||||
case KotlinLexer.MultiLineStrRef:
|
||||
case KotlinLexer.MultiLineStrText:
|
||||
case KotlinLexer.MultiLineStrExprStart:
|
||||
colors.addIfNeeded(line, column, forString());
|
||||
break;
|
||||
// SECTION: separatorsAndOperations
|
||||
case KotlinLexer.RESERVED:
|
||||
case KotlinLexer.DOT:
|
||||
case KotlinLexer.COMMA:
|
||||
case KotlinLexer.LPAREN:
|
||||
case KotlinLexer.RPAREN:
|
||||
case KotlinLexer.LSQUARE:
|
||||
case KotlinLexer.RSQUARE:
|
||||
case KotlinLexer.LCURL:
|
||||
case KotlinLexer.RCURL:
|
||||
case KotlinLexer.MULT:
|
||||
case KotlinLexer.MOD:
|
||||
case KotlinLexer.DIV:
|
||||
case KotlinLexer.ADD:
|
||||
case KotlinLexer.SUB:
|
||||
case KotlinLexer.INCR:
|
||||
case KotlinLexer.DECR:
|
||||
case KotlinLexer.CONJ:
|
||||
case KotlinLexer.DISJ:
|
||||
case KotlinLexer.EXCL_WS:
|
||||
case KotlinLexer.EXCL_NO_WS:
|
||||
case KotlinLexer.COLON:
|
||||
case KotlinLexer.SEMICOLON:
|
||||
case KotlinLexer.ASSIGNMENT:
|
||||
case KotlinLexer.ADD_ASSIGNMENT:
|
||||
case KotlinLexer.SUB_ASSIGNMENT:
|
||||
case KotlinLexer.MULT_ASSIGNMENT:
|
||||
case KotlinLexer.DIV_ASSIGNMENT:
|
||||
case KotlinLexer.MOD_ASSIGNMENT:
|
||||
case KotlinLexer.ARROW:
|
||||
case KotlinLexer.DOUBLE_ARROW:
|
||||
case KotlinLexer.RANGE:
|
||||
case KotlinLexer.COLONCOLON:
|
||||
case KotlinLexer.DOUBLE_SEMICOLON:
|
||||
case KotlinLexer.QUEST_WS:
|
||||
case KotlinLexer.QUEST_NO_WS:
|
||||
case KotlinLexer.LANGLE:
|
||||
case KotlinLexer.RANGLE:
|
||||
case KotlinLexer.LE:
|
||||
case KotlinLexer.GE:
|
||||
case KotlinLexer.EXCL_EQ:
|
||||
case KotlinLexer.EXCL_EQEQ:
|
||||
case KotlinLexer.AS_SAFE:
|
||||
case KotlinLexer.EQEQ:
|
||||
case KotlinLexer.EQEQEQ:
|
||||
case KotlinLexer.SINGLE_QUOTE:
|
||||
colors.addIfNeeded(line, column, get(OPERATOR));
|
||||
break;
|
||||
// SECTION: keywords
|
||||
case KotlinLexer.RETURN_AT:
|
||||
case KotlinLexer.CONTINUE_AT:
|
||||
case KotlinLexer.BREAK_AT:
|
||||
case KotlinLexer.THIS_AT:
|
||||
case KotlinLexer.SUPER_AT:
|
||||
case KotlinLexer.PACKAGE:
|
||||
case KotlinLexer.CLASS:
|
||||
case KotlinLexer.INTERFACE:
|
||||
case KotlinLexer.FUN:
|
||||
case KotlinLexer.OBJECT:
|
||||
case KotlinLexer.VAL:
|
||||
case KotlinLexer.VAR:
|
||||
case KotlinLexer.TYPE_ALIAS:
|
||||
case KotlinLexer.THIS:
|
||||
case KotlinLexer.SUPER:
|
||||
case KotlinLexer.TYPEOF:
|
||||
case KotlinLexer.IF:
|
||||
case KotlinLexer.ELSE:
|
||||
case KotlinLexer.WHEN:
|
||||
case KotlinLexer.TRY:
|
||||
case KotlinLexer.FOR:
|
||||
case KotlinLexer.DO:
|
||||
case KotlinLexer.WHILE:
|
||||
case KotlinLexer.THROW:
|
||||
case KotlinLexer.RETURN:
|
||||
case KotlinLexer.CONTINUE:
|
||||
case KotlinLexer.BREAK:
|
||||
case KotlinLexer.AS:
|
||||
case KotlinLexer.IS:
|
||||
case KotlinLexer.IN:
|
||||
case KotlinLexer.NOT_IS:
|
||||
case KotlinLexer.NOT_IN:
|
||||
colors.addIfNeeded(line, column, forKeyword());
|
||||
break;
|
||||
// comments
|
||||
case KotlinLexer.LineComment:
|
||||
var commentType = SchemeAndroidIDE.COMMENT;
|
||||
|
||||
// highlight special line comments
|
||||
var commentText = token.getText();
|
||||
if (commentText.length() > 2) {
|
||||
commentText = commentText.substring(2);
|
||||
commentText = commentText.trim();
|
||||
|
||||
var mark = true;
|
||||
if ("todo".equalsIgnoreCase(commentText.substring(0, 4))) {
|
||||
commentType = SchemeAndroidIDE.TODO_COMMENT;
|
||||
} else if ("fixme".equalsIgnoreCase(commentText.substring(0, 5))) {
|
||||
commentType = SchemeAndroidIDE.FIXME_COMMENT;
|
||||
} else {
|
||||
mark = false;
|
||||
}
|
||||
|
||||
if (mark) {
|
||||
if (diagnostics == null) {
|
||||
diagnostics = new ArrayList<>();
|
||||
}
|
||||
final var diagnostic = new DiagnosticItem();
|
||||
diagnostic.setSeverity(DiagnosticSeverity.WARNING);
|
||||
diagnostic.setMessage(commentText);
|
||||
diagnostic.setCode("special.comment");
|
||||
diagnostic.setRange(
|
||||
new Range(
|
||||
new Position(line, column),
|
||||
new Position(line, column + tokenLength)));
|
||||
diagnostic.setSource(commentText);
|
||||
ideDiagnostics.add(diagnostic);
|
||||
}
|
||||
}
|
||||
|
||||
colors.addIfNeeded(line, column, withoutCompletion(commentType));
|
||||
break;
|
||||
case KotlinLexer.ShebangLine:
|
||||
case KotlinLexer.DelimitedComment:
|
||||
case KotlinLexer.Inside_Comment:
|
||||
colors.addIfNeeded(line, column, forComment());
|
||||
break;
|
||||
|
||||
default:
|
||||
colors.addIfNeeded(line, column, get(TEXT_NORMAL));
|
||||
break;
|
||||
}
|
||||
|
||||
isFirst = false;
|
||||
if (type != KotlinLexer.WS) {
|
||||
previous = type;
|
||||
}
|
||||
}
|
||||
|
||||
if (stack.isEmpty() && currSwitch > maxSwitch) {
|
||||
maxSwitch = currSwitch;
|
||||
}
|
||||
|
||||
colors.determine(lastLine);
|
||||
styles.setSuppressSwitch(maxSwitch + 10);
|
||||
if (diagnostics != null && !diagnostics.isEmpty()) {
|
||||
markDiagnostics(colors, diagnostics);
|
||||
}
|
||||
|
||||
if (!ideDiagnostics.isEmpty()) {
|
||||
markDiagnostics(colors, ideDiagnostics);
|
||||
}
|
||||
|
||||
styles.spans = colors.build();
|
||||
|
||||
return styles;
|
||||
}
|
||||
|
||||
private void markDiagnostics(MappedSpans.Builder colors, List<DiagnosticItem> diagnostics) {
|
||||
diagnostics.sort(DiagnosticItem.START_COMPARATOR);
|
||||
for (var d : diagnostics) {
|
||||
if (d == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
var start = d.getRange().getStart();
|
||||
var end = d.getRange().getEnd();
|
||||
|
||||
try {
|
||||
colors.markProblemRegion(
|
||||
convertToSpanFlag(d.getSeverity()),
|
||||
start.getLine(),
|
||||
start.getColumn(),
|
||||
end.getLine(),
|
||||
end.getColumn());
|
||||
} catch (Throwable e) {
|
||||
// Might happen frequently if user types faster
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Contract(pure = true)
|
||||
private int convertToSpanFlag(@NonNull DiagnosticSeverity severity) {
|
||||
switch (severity) {
|
||||
case WARNING:
|
||||
return Span.FLAG_WARNING;
|
||||
case ERROR:
|
||||
return Span.FLAG_ERROR;
|
||||
case HINT:
|
||||
case INFO:
|
||||
default:
|
||||
return Span.FLAG_TYPO;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,168 @@
|
||||
/************************************************************************************
|
||||
* This file is part of AndroidIDE.
|
||||
*
|
||||
* AndroidIDE is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* AndroidIDE is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with AndroidIDE. If not, see <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
**************************************************************************************/
|
||||
package com.itsaky.androidide.language.kotlin;
|
||||
|
||||
import android.os.Bundle;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
import com.itsaky.androidide.language.IDELanguage;
|
||||
|
||||
import com.itsaky.androidide.language.java.JavaLanguage;
|
||||
import com.itsaky.androidide.utils.CharSequenceReader;
|
||||
import com.itsaky.androidide.utils.ILogger;
|
||||
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
import java.io.StringReader;
|
||||
import com.itsaky.androidide.lexers.kotlin.KotlinLexer;
|
||||
import com.itsaky.androidide.lexers.kotlin.KotlinParser;
|
||||
|
||||
import io.github.rosemoe.sora.lang.analysis.AnalyzeManager;
|
||||
import io.github.rosemoe.sora.lang.completion.CompletionCancelledException;
|
||||
import io.github.rosemoe.sora.lang.completion.CompletionPublisher;
|
||||
import io.github.rosemoe.sora.lang.smartEnter.NewlineHandleResult;
|
||||
import io.github.rosemoe.sora.lang.smartEnter.NewlineHandler;
|
||||
import io.github.rosemoe.sora.text.CharPosition;
|
||||
import io.github.rosemoe.sora.text.ContentReference;
|
||||
import io.github.rosemoe.sora.text.TextUtils;
|
||||
import io.github.rosemoe.sora.widget.SymbolPairMatch;
|
||||
|
||||
public class KotlinLanguage extends IDELanguage {
|
||||
|
||||
private static final ILogger LOG = ILogger.newInstance("KotlinLanguage");
|
||||
private KotlinAnalyzer analyzer;
|
||||
private final NewlineHandler[] newlineHandlers = new NewlineHandler[] {new BraceHandler()};
|
||||
|
||||
public KotlinLanguage() {
|
||||
analyzer = new KotlinAnalyzer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndentAdvance(@NonNull String line) {
|
||||
try {
|
||||
KotlinLexer lexer = new KotlinLexer(CharStreams.fromReader(new StringReader(line)));
|
||||
Token token;
|
||||
int advance = 0;
|
||||
while (((token = lexer.nextToken()) != null && token.getType() != token.EOF)) {
|
||||
switch (token.getType()) {
|
||||
case KotlinParser.LCURL:
|
||||
advance++;
|
||||
break;
|
||||
case KotlinParser.RCURL:
|
||||
advance--;
|
||||
break;
|
||||
}
|
||||
}
|
||||
advance = Math.max(0, advance);
|
||||
return advance * getTabSize();
|
||||
} catch (Throwable e) {
|
||||
LOG.error("Error calculating indent advance", e);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public SymbolPairMatch getSymbolPairs() {
|
||||
return new KotlinSymbolPairs();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@Override
|
||||
public AnalyzeManager getAnalyzeManager() {
|
||||
return analyzer;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getInterruptionLevel() {
|
||||
return INTERRUPTION_LEVEL_STRONG;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void requireAutoComplete(
|
||||
@NonNull ContentReference content,
|
||||
@NonNull CharPosition position,
|
||||
@NonNull CompletionPublisher publisher,
|
||||
@NonNull Bundle extraArguments)
|
||||
throws CompletionCancelledException {
|
||||
|
||||
// completer.complete(content, position, publisher, extraArguments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIndentAdvance(@NonNull ContentReference content, int line, int column) {
|
||||
return getIndentAdvance(content.getLine(line).substring(0, column));
|
||||
}
|
||||
|
||||
@Override
|
||||
public CharSequence format(CharSequence content) {
|
||||
return content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewlineHandler[] getNewlineHandlers() {
|
||||
return newlineHandlers;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void destroy() {
|
||||
analyzer = null;
|
||||
}
|
||||
|
||||
private static class KotlinSymbolPairs extends SymbolPairMatch {
|
||||
public KotlinSymbolPairs() {
|
||||
super.putPair('{', new Replacement("{}", 1));
|
||||
super.putPair('(', new Replacement("()", 1));
|
||||
super.putPair('[', new Replacement("[]", 1));
|
||||
super.putPair('"', new Replacement("\"\"", 1));
|
||||
super.putPair('\'', new Replacement("''", 1));
|
||||
super.putPair('<', new Replacement("<>", 1));
|
||||
}
|
||||
}
|
||||
|
||||
class BraceHandler implements NewlineHandler {
|
||||
|
||||
@Override
|
||||
public boolean matchesRequirement(String beforeText, String afterText) {
|
||||
beforeText = beforeText.trim();
|
||||
afterText = afterText.trim();
|
||||
return beforeText.endsWith("{") && afterText.startsWith("}");
|
||||
}
|
||||
|
||||
@Override
|
||||
public NewlineHandleResult handleNewline(String beforeText, String afterText, int tabSize) {
|
||||
int count = TextUtils.countLeadingSpaceCount(beforeText, tabSize);
|
||||
int advanceBefore = getIndentAdvance(beforeText);
|
||||
int advanceAfter = getIndentAdvance(afterText);
|
||||
String text;
|
||||
StringBuilder sb =
|
||||
new StringBuilder("\n")
|
||||
.append(
|
||||
TextUtils.createIndent(
|
||||
count + advanceBefore, tabSize, useTab()))
|
||||
.append('\n')
|
||||
.append(
|
||||
text =
|
||||
TextUtils.createIndent(
|
||||
count + advanceAfter, tabSize, useTab()));
|
||||
int shiftLeft = text.length() + 1;
|
||||
return new NewlineHandleResult(sb, shiftLeft);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,190 +33,229 @@ import com.itsaky.androidide.interfaces.ProjectWriterCallback;
|
||||
import com.itsaky.androidide.models.NewProjectDetails;
|
||||
import com.itsaky.androidide.models.ProjectTemplate;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.BufferedOutputStream;
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
|
||||
public class ProjectWriter {
|
||||
|
||||
private static ProjectWriterCallback callback;
|
||||
private static ProjectWriterCallback callback;
|
||||
|
||||
private static final String XML_TEMPLATE_PATH = "templates/xml";
|
||||
private static final String XML_TEMPLATE_PATH = "templates/xml";
|
||||
private static final String SOURCE_PATH_REGEX = "/.*/src/.*/java|kt";
|
||||
private static final String FILE_EXT_REGEX = ".*/java|kt|gradle|xml";
|
||||
private static final String APP_NAME = "$app_name",
|
||||
PACKAGE_NAME = "$package_name",
|
||||
MIN_SDK = "$min_sdk",
|
||||
TARGET_SDK = "$target_sdk";
|
||||
|
||||
private static final String[] FILE_TO_CHANGE = {
|
||||
"build.gradle",
|
||||
"settings.gradle",
|
||||
"app/src/main/AndroidManifest.xml",
|
||||
"app/src/main/res/values/strings.xml",
|
||||
"app/src/main/java/$package_name/MainActivity.java",
|
||||
"app/src/main/java/$package_name/MainActivity.kt",
|
||||
"app/build.gradle",
|
||||
"app/src/main/java/$package_name/AndroidLauncher.java",
|
||||
"app/res/values/strings.xml",
|
||||
"core/build.gradle",
|
||||
"core/src/main/java/$package_name/GameSuperClass.java",
|
||||
"app/AndroidManifest.xml"
|
||||
};
|
||||
|
||||
private static final String JAVA_PATH_REGEX = "/.*/src/.*/java|kt";
|
||||
private static final String APP_NAME = "$app_name",
|
||||
PACKAGE_NAME = "$package_name",
|
||||
MIN_SDK = "$min_sdk",
|
||||
TARGET_SDK = "$target_sdk";
|
||||
|
||||
@NonNull
|
||||
public static String createMenu() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/menu.xml");
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String createDrawable() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/drawable.xml");
|
||||
}
|
||||
|
||||
@NonNull
|
||||
public static String createLayout() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/layout.xml");
|
||||
}
|
||||
|
||||
public static String getPackageName(File parentPath) {
|
||||
Matcher pkgMatcher = Pattern.compile(JAVA_PATH_REGEX).matcher(parentPath.getAbsolutePath());
|
||||
if (pkgMatcher.find()) {
|
||||
int end = pkgMatcher.end();
|
||||
if (end <= 0) return "";
|
||||
String name = parentPath.getAbsolutePath().substring(pkgMatcher.end());
|
||||
if (name.startsWith(File.separator)) name = name.substring(1);
|
||||
return name.replace(File.separator, ".");
|
||||
@NonNull
|
||||
public static String createMenu() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/menu.xml");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String createJavaClass(String packageName, String className) {
|
||||
return ClassBuilder.createClass(packageName, className);
|
||||
}
|
||||
|
||||
public static String createJavaInterface(String packageName, String className) {
|
||||
return ClassBuilder.createInterface(packageName, className);
|
||||
}
|
||||
|
||||
public static String createJavaEnum(String packageName, String className) {
|
||||
return ClassBuilder.createEnum(packageName, className);
|
||||
}
|
||||
|
||||
public static String createActivity(String packageName, String className) {
|
||||
return ClassBuilder.createActivity(packageName, className);
|
||||
}
|
||||
|
||||
public static void write(
|
||||
ProjectTemplate template, NewProjectDetails details, ProjectWriterCallback listener)
|
||||
throws Exception {
|
||||
write(template.getId(), details, listener);
|
||||
}
|
||||
|
||||
public static void write(int id, NewProjectDetails details, ProjectWriterCallback listener)
|
||||
throws Exception {
|
||||
callback = listener;
|
||||
notifyBegin();
|
||||
final StudioApp instance = StudioApp.getInstance();
|
||||
final File temp = instance.getTempProjectDir();
|
||||
final File projectDir = new File(instance.getProjectsDir(), details.name);
|
||||
if (projectDir.exists()) {
|
||||
notifyFailed(instance.getString(R.string.project_exists));
|
||||
return;
|
||||
@NonNull
|
||||
public static String createDrawable() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/drawable.xml");
|
||||
}
|
||||
if (temp == null) notifyFailed(instance.getString(R.string.cannot_create_temp));
|
||||
if (!FileUtils.delete(temp) || !Environment.mkdirIfNotExits(temp).exists())
|
||||
notifyFailed(instance.getString(R.string.cannot_create_temp));
|
||||
notifyTask(instance.getString(R.string.copying_assets));
|
||||
projectDir.mkdirs();
|
||||
File destZip = new File(Environment.TMP_DIR, "templates/" + id + ".zip");
|
||||
Environment.mkdirIfNotExits(destZip.getParentFile());
|
||||
if (ResourceUtils.copyFileFromAssets(
|
||||
"templates/" + destZip.getName(), destZip.getAbsolutePath())) {
|
||||
ZipUtils.unzipFile(destZip, temp);
|
||||
notifyTask(instance.getString(R.string.writing_files));
|
||||
for (String s : FILE_TO_CHANGE) {
|
||||
File file = new File(temp, s);
|
||||
if (file.exists() && s.contains(PACKAGE_NAME)) {
|
||||
s = s.replace(PACKAGE_NAME, details.packageName.replace(".", "/"));
|
||||
File f = new File(temp, s);
|
||||
FileUtils.move(file, f);
|
||||
|
||||
try {
|
||||
File f2 = file.getParentFile();
|
||||
while (f2 != null && !f2.getName().contains(PACKAGE_NAME)) {
|
||||
f2 = f2.getParentFile();
|
||||
@NonNull
|
||||
public static String createLayout() {
|
||||
return ResourceUtils.readAssets2String(XML_TEMPLATE_PATH + "/layout.xml");
|
||||
}
|
||||
|
||||
public static String getPackageName(File parentPath) {
|
||||
Matcher pkgMatcher =
|
||||
Pattern.compile(SOURCE_PATH_REGEX).matcher(parentPath.getAbsolutePath());
|
||||
if (pkgMatcher.find()) {
|
||||
int end = pkgMatcher.end();
|
||||
if (end <= 0) return "";
|
||||
String name = parentPath.getAbsolutePath().substring(pkgMatcher.end());
|
||||
if (name.startsWith(File.separator)) name = name.substring(1);
|
||||
return name.replace(File.separator, ".");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static String createJavaClass(String packageName, String className) {
|
||||
return ClassBuilder.createClass(packageName, className);
|
||||
}
|
||||
|
||||
public static String createJavaInterface(String packageName, String className) {
|
||||
return ClassBuilder.createInterface(packageName, className);
|
||||
}
|
||||
|
||||
public static String createJavaEnum(String packageName, String className) {
|
||||
return ClassBuilder.createEnum(packageName, className);
|
||||
}
|
||||
|
||||
public static String createActivity(String packageName, String className) {
|
||||
return ClassBuilder.createActivity(packageName, className);
|
||||
}
|
||||
|
||||
public static void write(
|
||||
ProjectTemplate template, NewProjectDetails details, ProjectWriterCallback listener)
|
||||
throws Exception {
|
||||
write(template.getId(), details, listener);
|
||||
}
|
||||
|
||||
public static void write(int id, NewProjectDetails details, ProjectWriterCallback listener)
|
||||
throws Exception {
|
||||
callback = listener;
|
||||
notifyBegin();
|
||||
final StudioApp instance = StudioApp.getInstance();
|
||||
final File tempDir = instance.getTempProjectDir();
|
||||
final File projectDir = new File(instance.getProjectsDir(), details.name);
|
||||
if (projectDir.exists()) {
|
||||
notifyFailed(instance.getString(R.string.project_exists));
|
||||
return;
|
||||
}
|
||||
if (tempDir == null) {
|
||||
notifyFailed(instance.getString(R.string.cannot_create_temp));
|
||||
}
|
||||
if (!FileUtils.delete(tempDir) || !Environment.mkdirIfNotExits(tempDir).exists()) {
|
||||
notifyFailed(instance.getString(R.string.cannot_create_temp));
|
||||
}
|
||||
notifyTask(instance.getString(R.string.copying_assets));
|
||||
projectDir.mkdirs();
|
||||
File destZip = new File(Environment.TMP_DIR, "templates/" + id + ".zip");
|
||||
Environment.mkdirIfNotExits(destZip.getParentFile());
|
||||
if (ResourceUtils.copyFileFromAssets(
|
||||
"templates/" + destZip.getName(), destZip.getAbsolutePath())) {
|
||||
unzipTemplate(destZip, tempDir, details);
|
||||
notifyTask(instance.getString(R.string.writing_files));
|
||||
notifyTask(instance.getString(R.string.copying_files));
|
||||
if (FileUtils.createOrExistsDir(projectDir)) {
|
||||
boolean success = true;
|
||||
final var files = tempDir == null ? null : tempDir.listFiles();
|
||||
if (files == null) {
|
||||
success = false;
|
||||
} else {
|
||||
for (File f : files) {
|
||||
if (!(success &= FileUtils.copy(f, new File(projectDir, f.getName())))) {
|
||||
notifyFailed(
|
||||
instance.getString(R.string.failed_write_file, f.getName()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (success) {
|
||||
notifySuccess(projectDir);
|
||||
}
|
||||
} else {
|
||||
notifyFailed(instance.getString(R.string.failed_create_project_dir));
|
||||
}
|
||||
|
||||
FileUtils.delete(f2);
|
||||
} catch (Throwable t) {
|
||||
// ignored
|
||||
}
|
||||
file = f;
|
||||
}
|
||||
if (file.exists()) {
|
||||
String read = FileIOUtils.readFile2String(file);
|
||||
read =
|
||||
read.replace(APP_NAME, details.name)
|
||||
.replace(PACKAGE_NAME, details.packageName)
|
||||
.replace(MIN_SDK, String.valueOf(details.minSdk))
|
||||
.replace(TARGET_SDK, String.valueOf(details.targetSdk));
|
||||
if (!FileIOUtils.writeFileFromString(file, read, false)) {
|
||||
notifyFailed(instance.getString(R.string.failed_write_file, file.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
notifyTask(instance.getString(R.string.copying_files));
|
||||
if (FileUtils.createOrExistsDir(projectDir)) {
|
||||
boolean success = true;
|
||||
final var files = temp == null ? null : temp.listFiles();
|
||||
if (files == null) {
|
||||
success = false;
|
||||
} else {
|
||||
for (File f : files) {
|
||||
if (!(success &= FileUtils.copy(f, new File(projectDir, f.getName())))) {
|
||||
notifyFailed(instance.getString(R.string.failed_write_file, f.getName()));
|
||||
break;
|
||||
}
|
||||
}
|
||||
notifyFailed(instance.getString(R.string.asset_copy_failed));
|
||||
}
|
||||
|
||||
if (success) {
|
||||
notifySuccess(projectDir);
|
||||
}
|
||||
} else {
|
||||
notifyFailed(instance.getString(R.string.failed_create_project_dir));
|
||||
}
|
||||
} else {
|
||||
notifyFailed(instance.getString(R.string.asset_copy_failed));
|
||||
}
|
||||
}
|
||||
|
||||
private static void notifyBegin() {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.beforeBegin();
|
||||
});
|
||||
}
|
||||
private static void unzipTemplate(File zipFile, File location, NewProjectDetails details)
|
||||
throws IOException {
|
||||
final StudioApp instance = StudioApp.getInstance();
|
||||
int size;
|
||||
final int BUFFER_SIZE = 2048;
|
||||
byte[] buffer = new byte[BUFFER_SIZE];
|
||||
|
||||
private static void notifyTask(String name) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onProcessTask(name);
|
||||
});
|
||||
}
|
||||
File f = location;
|
||||
if (!f.isDirectory()) {
|
||||
f.mkdirs();
|
||||
}
|
||||
ZipInputStream zin =
|
||||
new ZipInputStream(
|
||||
new BufferedInputStream(new FileInputStream(zipFile), BUFFER_SIZE));
|
||||
try {
|
||||
ZipEntry ze = null;
|
||||
while ((ze = zin.getNextEntry()) != null) {
|
||||
String name = ze.getName();
|
||||
if (name.contains(PACKAGE_NAME)) {
|
||||
name = name.replace(PACKAGE_NAME, details.packageName.replace(".", "/"));
|
||||
}
|
||||
String path = location.getAbsolutePath() + "/" + name;
|
||||
File unzipFile = new File(path);
|
||||
|
||||
private static void notifySuccess(File root) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onSuccess(root);
|
||||
});
|
||||
}
|
||||
if (ze.isDirectory()) {
|
||||
if (!unzipFile.isDirectory()) {
|
||||
unzipFile.mkdirs();
|
||||
}
|
||||
} else {
|
||||
// check for and create parent directories if they don't exist
|
||||
File parentDir = unzipFile.getParentFile();
|
||||
if (null != parentDir) {
|
||||
if (!parentDir.isDirectory()) {
|
||||
parentDir.mkdirs();
|
||||
}
|
||||
}
|
||||
|
||||
private static void notifyFailed(String reason) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onFailed(reason);
|
||||
});
|
||||
}
|
||||
// unzip the file
|
||||
FileOutputStream out = new FileOutputStream(unzipFile, false);
|
||||
BufferedOutputStream fout = new BufferedOutputStream(out, BUFFER_SIZE);
|
||||
try {
|
||||
while ((size = zin.read(buffer, 0, BUFFER_SIZE)) != -1) {
|
||||
fout.write(buffer, 0, size);
|
||||
}
|
||||
zin.closeEntry();
|
||||
} finally {
|
||||
fout.flush();
|
||||
fout.close();
|
||||
}
|
||||
|
||||
// replace temp variables to real
|
||||
Matcher extMatcher = Pattern.compile(FILE_EXT_REGEX).matcher(name);
|
||||
if (extMatcher.find()) {
|
||||
String fileContent = FileIOUtils.readFile2String(unzipFile);
|
||||
fileContent =
|
||||
fileContent
|
||||
.replace(APP_NAME, details.name)
|
||||
.replace(PACKAGE_NAME, details.packageName)
|
||||
.replace(MIN_SDK, String.valueOf(details.minSdk))
|
||||
.replace(TARGET_SDK, String.valueOf(details.targetSdk));
|
||||
if (!FileIOUtils.writeFileFromString(unzipFile, fileContent, false)) {
|
||||
notifyFailed(
|
||||
instance.getString(
|
||||
R.string.failed_write_file, unzipFile.getName()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
zin.close();
|
||||
}
|
||||
}
|
||||
|
||||
private static void notifyBegin() {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.beforeBegin();
|
||||
});
|
||||
}
|
||||
|
||||
private static void notifyTask(String name) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onProcessTask(name);
|
||||
});
|
||||
}
|
||||
|
||||
private static void notifySuccess(File root) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onSuccess(root);
|
||||
});
|
||||
}
|
||||
|
||||
private static void notifyFailed(String reason) {
|
||||
ThreadUtils.runOnUiThread(
|
||||
() -> {
|
||||
if (callback != null) callback.onFailed(reason);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,13 +44,16 @@ import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.blankj.utilcode.util.FileIOUtils;
|
||||
import com.blankj.utilcode.util.FileUtils;
|
||||
import com.blankj.utilcode.util.SizeUtils;
|
||||
import com.itsaky.androidide.adapters.CompletionListAdapter;
|
||||
import com.itsaky.androidide.app.StudioApp;
|
||||
import com.itsaky.androidide.databinding.LayoutCodeEditorBinding;
|
||||
import com.itsaky.androidide.language.cpp.CppLanguage;
|
||||
import com.itsaky.androidide.language.groovy.GroovyLanguage;
|
||||
import com.itsaky.androidide.language.java.JavaLanguage;
|
||||
import com.itsaky.androidide.language.xml.XMLLanguage;
|
||||
import com.itsaky.androidide.language.kotlin.KotlinLanguage;
|
||||
import com.itsaky.androidide.lexers.xml.XMLLexer;
|
||||
import com.itsaky.androidide.managers.PreferenceManager;
|
||||
import com.itsaky.androidide.models.ConstantsBridge;
|
||||
@@ -60,8 +63,10 @@ import com.itsaky.androidide.utils.ILogger;
|
||||
import com.itsaky.androidide.utils.LSPUtils;
|
||||
import com.itsaky.androidide.utils.TypefaceUtils;
|
||||
import com.itsaky.inflater.values.ValuesTableFactory;
|
||||
import com.itsaky.lsp.api.ILanguageServer;
|
||||
import com.itsaky.lsp.models.Range;
|
||||
|
||||
import io.github.rosemoe.sora.lang.Language;
|
||||
import org.antlr.v4.runtime.CharStreams;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
|
||||
@@ -86,354 +91,386 @@ import io.github.rosemoe.sora.widget.component.Magnifier;
|
||||
@SuppressLint("ViewConstructor") // This view is always dynamically created.
|
||||
public class CodeEditorView extends FrameLayout {
|
||||
|
||||
private static final ILogger LOG = ILogger.newInstance("CodeEditorView");
|
||||
private final File file;
|
||||
private final LayoutCodeEditorBinding binding;
|
||||
private boolean isModified;
|
||||
private boolean isFirstCreate;
|
||||
private static final ILogger LOG = ILogger.newInstance("CodeEditorView");
|
||||
private final File file;
|
||||
private final LayoutCodeEditorBinding binding;
|
||||
private boolean isModified;
|
||||
private boolean isFirstCreate;
|
||||
|
||||
public CodeEditorView(
|
||||
@NonNull Context context, @NonNull File file, final @NonNull Range selection) {
|
||||
super(context);
|
||||
this.file = file;
|
||||
this.isModified = false;
|
||||
this.isFirstCreate = true;
|
||||
public CodeEditorView(
|
||||
@NonNull Context context, @NonNull File file, final @NonNull Range selection) {
|
||||
super(context);
|
||||
this.file = file;
|
||||
this.isModified = false;
|
||||
this.isFirstCreate = true;
|
||||
|
||||
this.binding = LayoutCodeEditorBinding.inflate(LayoutInflater.from(context));
|
||||
this.binding.editor.setTypefaceText(TypefaceUtils.jetbrainsMono());
|
||||
this.binding.editor.setHighlightCurrentBlock(true);
|
||||
this.binding.editor.getProps().autoCompletionOnComposing = true;
|
||||
this.binding.editor.setAutoCompletionItemAdapter(new CompletionListAdapter());
|
||||
this.binding.editor.setDividerWidth(SizeUtils.dp2px(1));
|
||||
this.binding.editor.setColorScheme(new SchemeAndroidIDE());
|
||||
this.binding.editor.subscribeEvent(
|
||||
ContentChangeEvent.class, ((event, unsubscribe) -> handleContentChange(event)));
|
||||
this.binding = LayoutCodeEditorBinding.inflate(LayoutInflater.from(context));
|
||||
this.binding.editor.setTypefaceText(TypefaceUtils.jetbrainsMono());
|
||||
this.binding.editor.setHighlightCurrentBlock(true);
|
||||
this.binding.editor.getProps().autoCompletionOnComposing = true;
|
||||
this.binding.editor.setAutoCompletionItemAdapter(new CompletionListAdapter());
|
||||
this.binding.editor.setDividerWidth(SizeUtils.dp2px(1));
|
||||
this.binding.editor.setColorScheme(new SchemeAndroidIDE());
|
||||
this.binding.editor.subscribeEvent(
|
||||
ContentChangeEvent.class, ((event, unsubscribe) -> handleContentChange(event)));
|
||||
|
||||
this.binding.diagnosticTextContainer.setVisibility(GONE);
|
||||
this.binding.diagnosticTextContainer.setVisibility(GONE);
|
||||
|
||||
removeAllViews();
|
||||
addView(this.binding.getRoot());
|
||||
removeAllViews();
|
||||
addView(this.binding.getRoot());
|
||||
|
||||
selection.validate();
|
||||
CompletableFuture.runAsync(
|
||||
() -> {
|
||||
final var contents = FileIOUtils.readFile2String(file);
|
||||
binding.editor.post(
|
||||
() -> {
|
||||
binding.editor.setText(contents, createEditorArgs());
|
||||
postRead();
|
||||
if (LSPUtils.isEqual(selection.getStart(), selection.getEnd())) {
|
||||
getEditor()
|
||||
.setSelection(
|
||||
selection.getStart().getLine(), selection.getStart().getColumn());
|
||||
} else {
|
||||
getEditor().setSelection(selection);
|
||||
selection.validate();
|
||||
CompletableFuture.runAsync(
|
||||
() -> {
|
||||
final var contents = FileIOUtils.readFile2String(file);
|
||||
binding.editor.post(
|
||||
() -> {
|
||||
binding.editor.setText(contents, createEditorArgs());
|
||||
postRead();
|
||||
if (LSPUtils.isEqual(selection.getStart(), selection.getEnd())) {
|
||||
getEditor()
|
||||
.setSelection(
|
||||
selection.getStart().getLine(),
|
||||
selection.getStart().getColumn());
|
||||
} else {
|
||||
getEditor().setSelection(selection);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
configureEditorIfNeeded();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private Bundle createEditorArgs() {
|
||||
var bundle = new Bundle();
|
||||
if (getFile() == null) {
|
||||
return bundle;
|
||||
}
|
||||
|
||||
bundle.putString(IDEEditor.KEY_FILE, getFile().getAbsolutePath());
|
||||
return bundle;
|
||||
}
|
||||
|
||||
private void handleContentChange(@NonNull ContentChangeEvent event) {
|
||||
isModified = true;
|
||||
|
||||
if (event.getAction() == ContentChangeEvent.ACTION_INSERT) {
|
||||
final var editor = event.getEditor();
|
||||
final var content = event.getChangedText();
|
||||
final var endLine = event.getChangeEnd().line;
|
||||
final var endColumn = event.getChangeEnd().column;
|
||||
if (file.getName().endsWith(".xml")) {
|
||||
boolean isOpen = false;
|
||||
try {
|
||||
isOpen = editor.getText().charAt(editor.getCursor().getLeft() - 2) == '<';
|
||||
} catch (Throwable th) {
|
||||
LOG.error(th);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
configureEditorIfNeeded();
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private Bundle createEditorArgs() {
|
||||
var bundle = new Bundle();
|
||||
if (getFile() == null) {
|
||||
return bundle;
|
||||
if (isOpen && "/".contentEquals(content)) {
|
||||
closeCurrentTag(editor.getText().toString(), endLine, endColumn);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bundle.putString(IDEEditor.KEY_FILE, getFile().getAbsolutePath());
|
||||
return bundle;
|
||||
}
|
||||
public boolean save() {
|
||||
final var file = getFile();
|
||||
if (file == null) {
|
||||
LOG.error("Cannot save file. File instance is null.");
|
||||
return false;
|
||||
}
|
||||
|
||||
private void handleContentChange(@NonNull ContentChangeEvent event) {
|
||||
isModified = true;
|
||||
if (!isModified() && file.exists()) {
|
||||
LOG.info(file.getName());
|
||||
LOG.info("File was not modified. Skipping save operation.");
|
||||
return false;
|
||||
}
|
||||
|
||||
final var text = getEditor().getText().toString();
|
||||
|
||||
if (event.getAction() == ContentChangeEvent.ACTION_INSERT) {
|
||||
final var editor = event.getEditor();
|
||||
final var content = event.getChangedText();
|
||||
final var endLine = event.getChangeEnd().line;
|
||||
final var endColumn = event.getChangeEnd().column;
|
||||
if (file.getName().endsWith(".xml")) {
|
||||
boolean isOpen = false;
|
||||
try {
|
||||
isOpen = editor.getText().charAt(editor.getCursor().getLeft() - 2) == '<';
|
||||
FileUtil.writeFile(file, text);
|
||||
notifySaved();
|
||||
isModified = false;
|
||||
return true;
|
||||
} catch (IOException io) {
|
||||
LOG.error("Failed to save file", file, io);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private List<CharSequence> getLines(Content text) {
|
||||
final var count = text.getLineCount();
|
||||
final var result = new ArrayList<CharSequence>();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
result.add(text.getLine(i));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IDEEditor getEditor() {
|
||||
return binding.editor;
|
||||
}
|
||||
|
||||
public LayoutCodeEditorBinding getBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public File getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return binding.editor.getText().toString();
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return isModified;
|
||||
}
|
||||
|
||||
public void onPause() {
|
||||
// unimplemented
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
configureEditorIfNeeded();
|
||||
}
|
||||
|
||||
public void onEditorSelected() {
|
||||
final var editor = getEditor();
|
||||
if (editor != null) {
|
||||
editor.onEditorSelected();
|
||||
}
|
||||
}
|
||||
|
||||
public void undo() {
|
||||
if (binding.editor.canUndo()) {
|
||||
binding.editor.undo();
|
||||
}
|
||||
}
|
||||
|
||||
public void redo() {
|
||||
if (binding.editor.canRedo()) {
|
||||
binding.editor.redo();
|
||||
}
|
||||
}
|
||||
|
||||
public void findDefinition() {
|
||||
binding.editor.findDefinition();
|
||||
}
|
||||
|
||||
public void findReferences() {
|
||||
binding.editor.findReferences();
|
||||
}
|
||||
|
||||
public void commentLine() {
|
||||
binding.editor.commentLine();
|
||||
}
|
||||
|
||||
public void uncommentLine() {
|
||||
binding.editor.uncommentLine();
|
||||
}
|
||||
|
||||
public void beginSearch() {
|
||||
binding.editor.beginSearchMode();
|
||||
}
|
||||
|
||||
protected void postRead() {
|
||||
binding.editor.setEditorLanguage(createLanguage(file));
|
||||
binding.editor.setLanguageServer(createLanguageServer(file));
|
||||
// File must be set only after setting the language server
|
||||
// This will make sure that textDocument/didOpen is sent
|
||||
binding.editor.setFile(getFile());
|
||||
|
||||
if (getContext() instanceof Activity) {
|
||||
((Activity) getContext()).invalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
private ILanguageServer createLanguageServer(File file) {
|
||||
if (file.isFile()) {
|
||||
String ext = FileUtils.getFileExtension(file);
|
||||
switch (ext) {
|
||||
case "java":
|
||||
return StudioApp.getInstance().getJavaLanguageServer();
|
||||
case "xml":
|
||||
return StudioApp.getInstance().getXMLLanguageServer();
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Language createLanguage(File file) {
|
||||
if (file.isFile()) {
|
||||
String ext = FileUtils.getFileExtension(file);
|
||||
switch (ext) {
|
||||
case "java":
|
||||
return new JavaLanguage();
|
||||
case "xml":
|
||||
return new XMLLanguage();
|
||||
case "gradle":
|
||||
return new GroovyLanguage();
|
||||
case "kt":
|
||||
return new KotlinLanguage();
|
||||
case "c":
|
||||
case "h":
|
||||
case "cc":
|
||||
case "cpp":
|
||||
case "cxx":
|
||||
return new CppLanguage();
|
||||
default:
|
||||
return new EmptyLanguage();
|
||||
}
|
||||
}
|
||||
return new EmptyLanguage();
|
||||
}
|
||||
|
||||
private void configureEditorIfNeeded() {
|
||||
boolean sizeChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_SIZE_CHANGED;
|
||||
boolean ligaturesChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_LIGATURES_CHANGED;
|
||||
boolean flagsChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_FLAGS_CHANGED;
|
||||
boolean drawHexChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_DRAW_HEX_CHANGED;
|
||||
boolean inputFlagsChanged =
|
||||
isFirstCreate || ConstantsBridge.EDITOR_PREF_VISIBLE_PASSWORD_CHANGED;
|
||||
boolean wordWrapChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_WORD_WRAP_CHANGED;
|
||||
boolean magnifierChanged =
|
||||
isFirstCreate || ConstantsBridge.EDITOR_PREF_USE_MAGNIFIER_CHANGED;
|
||||
|
||||
final PreferenceManager prefs = StudioApp.getInstance().getPrefManager();
|
||||
|
||||
if (sizeChanged) {
|
||||
float textSize = prefs.getFloat(PreferenceManager.KEY_EDITOR_FONT_SIZE);
|
||||
if (textSize < 6 || textSize > 32) {
|
||||
textSize = 14;
|
||||
}
|
||||
|
||||
binding.editor.setTextSize(textSize);
|
||||
ConstantsBridge.EDITOR_PREF_SIZE_CHANGED = false;
|
||||
}
|
||||
|
||||
if (ligaturesChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_FONT_LIGATURES, true);
|
||||
binding.editor.setLigatureEnabled(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_LIGATURES_CHANGED = false;
|
||||
}
|
||||
|
||||
if (flagsChanged) {
|
||||
int flags = 0;
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_LEADING, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_LEADING;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_TRAILING, false)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_TRAILING;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_INNER, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_INNER;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_EMPTY_LINE, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_FOR_EMPTY_LINE;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_LINE_BREAK, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_LINE_SEPARATOR;
|
||||
}
|
||||
|
||||
binding.editor.setNonPrintablePaintingFlags(flags);
|
||||
ConstantsBridge.EDITOR_PREF_FLAGS_CHANGED = false;
|
||||
}
|
||||
|
||||
if (inputFlagsChanged) {
|
||||
binding.editor.setInputType(IDEEditor.createInputFlags());
|
||||
ConstantsBridge.EDITOR_PREF_VISIBLE_PASSWORD_CHANGED = false;
|
||||
}
|
||||
|
||||
if (drawHexChanged) {
|
||||
// TODO Do something about this
|
||||
// Maybe use spans...
|
||||
// binding.editor.setLineColorsEnabled (prefs.getBoolean
|
||||
// (PreferenceManager.KEY_EDITOR_DRAW_HEX, true));
|
||||
ConstantsBridge.EDITOR_PREF_DRAW_HEX_CHANGED = false;
|
||||
}
|
||||
|
||||
if (wordWrapChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_WORD_WRAP, false);
|
||||
binding.editor.setWordwrap(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_WORD_WRAP_CHANGED = false;
|
||||
}
|
||||
|
||||
if (magnifierChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_USE_MAGNIFER, true);
|
||||
binding.editor.getComponent(Magnifier.class).setEnabled(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_USE_MAGNIFIER_CHANGED = false;
|
||||
}
|
||||
|
||||
isFirstCreate = false;
|
||||
}
|
||||
|
||||
private void closeCurrentTag(String text, int line, int col) {
|
||||
try {
|
||||
XMLLexer lexer = new XMLLexer(CharStreams.fromReader(new StringReader(text)));
|
||||
Token token;
|
||||
boolean wasSlash = false, wasOpen = false;
|
||||
ArrayList<String> currentNames = new ArrayList<>();
|
||||
while (((token = lexer.nextToken()) != null && token.getType() != token.EOF)) {
|
||||
final int type = token.getType();
|
||||
if (type == XMLLexer.OPEN) {
|
||||
wasOpen = true;
|
||||
} else if (type == XMLLexer.Name) {
|
||||
if (wasOpen && wasSlash && currentNames.size() > 0) {
|
||||
currentNames.remove(0);
|
||||
} else if (wasOpen) {
|
||||
currentNames.add(0, token.getText());
|
||||
wasOpen = false;
|
||||
}
|
||||
} else if (type == XMLLexer.OPEN_SLASH) {
|
||||
int l = token.getLine() - 1;
|
||||
int c = token.getCharPositionInLine();
|
||||
if (l == line && c == col) {
|
||||
break;
|
||||
} else if (currentNames.size() > 0) {
|
||||
currentNames.remove(0);
|
||||
}
|
||||
} else if (type == XMLLexer.SLASH_CLOSE || type == XMLLexer.SPECIAL_CLOSE) {
|
||||
if (currentNames.size() > 0 && token.getText().trim().endsWith("/>")) {
|
||||
currentNames.remove(0);
|
||||
}
|
||||
} else if (type == XMLLexer.SLASH) {
|
||||
wasSlash = true;
|
||||
} else {
|
||||
wasOpen = wasSlash = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentNames.size() > 0) {
|
||||
binding.editor.getText().insert(line, col + 2, currentNames.get(0));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
LOG.error(th);
|
||||
LOG.error("Unable to close current tag", th);
|
||||
}
|
||||
}
|
||||
|
||||
if (isOpen && "/".contentEquals(content)) {
|
||||
closeCurrentTag(editor.getText().toString(), endLine, endColumn);
|
||||
private void notifySaved() {
|
||||
binding.editor.didSave();
|
||||
|
||||
if (Objects.requireNonNull(getFile()).getName().endsWith(".xml")) {
|
||||
ValuesTableFactory.syncWithFile(getFile());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean save() {
|
||||
final var file = getFile();
|
||||
if (file == null) {
|
||||
LOG.error("Cannot save file. File instance is null.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!isModified() && file.exists()) {
|
||||
LOG.info(file.getName());
|
||||
LOG.info("File was not modified. Skipping save operation.");
|
||||
return false;
|
||||
/** Mark this files as saved. Even if it not saved. */
|
||||
public void markAsSaved() {
|
||||
isModified = false;
|
||||
notifySaved();
|
||||
}
|
||||
|
||||
final var text = getEditor().getText().toString();
|
||||
|
||||
try {
|
||||
FileUtil.writeFile(file, text);
|
||||
notifySaved();
|
||||
isModified = false;
|
||||
return true;
|
||||
} catch (IOException io) {
|
||||
LOG.error("Failed to save file", file, io);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@NonNull
|
||||
private List<CharSequence> getLines(Content text) {
|
||||
final var count = text.getLineCount();
|
||||
final var result = new ArrayList<CharSequence>();
|
||||
|
||||
for (int i = 0; i < count; i++) {
|
||||
result.add(text.getLine(i));
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
public IDEEditor getEditor() {
|
||||
return binding.editor;
|
||||
}
|
||||
|
||||
public LayoutCodeEditorBinding getBinding() {
|
||||
return binding;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public File getFile() {
|
||||
return file;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return binding.editor.getText().toString();
|
||||
}
|
||||
|
||||
public boolean isModified() {
|
||||
return isModified;
|
||||
}
|
||||
|
||||
public void onPause() {
|
||||
// unimplemented
|
||||
}
|
||||
|
||||
public void onResume() {
|
||||
configureEditorIfNeeded();
|
||||
}
|
||||
|
||||
public void onEditorSelected() {
|
||||
final var editor = getEditor();
|
||||
if (editor != null) {
|
||||
editor.onEditorSelected();
|
||||
}
|
||||
}
|
||||
|
||||
public void undo() {
|
||||
if (binding.editor.canUndo()) {
|
||||
binding.editor.undo();
|
||||
}
|
||||
}
|
||||
|
||||
public void redo() {
|
||||
if (binding.editor.canRedo()) {
|
||||
binding.editor.redo();
|
||||
}
|
||||
}
|
||||
|
||||
public void findDefinition() {
|
||||
binding.editor.findDefinition();
|
||||
}
|
||||
|
||||
public void findReferences() {
|
||||
binding.editor.findReferences();
|
||||
}
|
||||
|
||||
public void commentLine() {
|
||||
binding.editor.commentLine();
|
||||
}
|
||||
|
||||
public void uncommentLine() {
|
||||
binding.editor.uncommentLine();
|
||||
}
|
||||
|
||||
public void beginSearch() {
|
||||
binding.editor.beginSearchMode();
|
||||
}
|
||||
|
||||
protected void postRead() {
|
||||
if (file.isFile() && file.getName().endsWith(".java")) {
|
||||
binding.editor.setEditorLanguage(new JavaLanguage());
|
||||
binding.editor.setLanguageServer(StudioApp.getInstance().getJavaLanguageServer());
|
||||
} else if (file.isFile() && file.getName().endsWith(".xml")) {
|
||||
binding.editor.setEditorLanguage(new XMLLanguage());
|
||||
binding.editor.setLanguageServer(StudioApp.getInstance().getXMLLanguageServer());
|
||||
} else if (file.isFile() && file.getName().endsWith(".gradle")) {
|
||||
binding.editor.setEditorLanguage(new GroovyLanguage());
|
||||
} else {
|
||||
binding.editor.setEditorLanguage(new EmptyLanguage());
|
||||
}
|
||||
|
||||
// File must be set only after setting the language server
|
||||
// This will make sure that textDocument/didOpen is sent
|
||||
binding.editor.setFile(getFile());
|
||||
|
||||
if (getContext() instanceof Activity) {
|
||||
((Activity) getContext()).invalidateOptionsMenu();
|
||||
}
|
||||
}
|
||||
|
||||
private void configureEditorIfNeeded() {
|
||||
boolean sizeChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_SIZE_CHANGED;
|
||||
boolean ligaturesChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_LIGATURES_CHANGED;
|
||||
boolean flagsChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_FLAGS_CHANGED;
|
||||
boolean drawHexChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_DRAW_HEX_CHANGED;
|
||||
boolean inputFlagsChanged =
|
||||
isFirstCreate || ConstantsBridge.EDITOR_PREF_VISIBLE_PASSWORD_CHANGED;
|
||||
boolean wordWrapChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_WORD_WRAP_CHANGED;
|
||||
boolean magnifierChanged = isFirstCreate || ConstantsBridge.EDITOR_PREF_USE_MAGNIFIER_CHANGED;
|
||||
|
||||
final PreferenceManager prefs = StudioApp.getInstance().getPrefManager();
|
||||
|
||||
if (sizeChanged) {
|
||||
float textSize = prefs.getFloat(PreferenceManager.KEY_EDITOR_FONT_SIZE);
|
||||
if (textSize < 6 || textSize > 32) {
|
||||
textSize = 14;
|
||||
}
|
||||
|
||||
binding.editor.setTextSize(textSize);
|
||||
ConstantsBridge.EDITOR_PREF_SIZE_CHANGED = false;
|
||||
}
|
||||
|
||||
if (ligaturesChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_FONT_LIGATURES, true);
|
||||
binding.editor.setLigatureEnabled(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_LIGATURES_CHANGED = false;
|
||||
}
|
||||
|
||||
if (flagsChanged) {
|
||||
int flags = 0;
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_LEADING, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_LEADING;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_TRAILING, false)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_TRAILING;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_INNER, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_INNER;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_WS_EMPTY_LINE, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_WHITESPACE_FOR_EMPTY_LINE;
|
||||
}
|
||||
|
||||
if (prefs.getBoolean(PreferenceManager.KEY_EDITOR_FLAG_LINE_BREAK, true)) {
|
||||
flags |= IDEEditor.FLAG_DRAW_LINE_SEPARATOR;
|
||||
}
|
||||
|
||||
binding.editor.setNonPrintablePaintingFlags(flags);
|
||||
ConstantsBridge.EDITOR_PREF_FLAGS_CHANGED = false;
|
||||
}
|
||||
|
||||
if (inputFlagsChanged) {
|
||||
binding.editor.setInputType(IDEEditor.createInputFlags());
|
||||
ConstantsBridge.EDITOR_PREF_VISIBLE_PASSWORD_CHANGED = false;
|
||||
}
|
||||
|
||||
if (drawHexChanged) {
|
||||
// TODO Do something about this
|
||||
// Maybe use spans...
|
||||
// binding.editor.setLineColorsEnabled (prefs.getBoolean
|
||||
// (PreferenceManager.KEY_EDITOR_DRAW_HEX, true));
|
||||
ConstantsBridge.EDITOR_PREF_DRAW_HEX_CHANGED = false;
|
||||
}
|
||||
|
||||
if (wordWrapChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_WORD_WRAP, false);
|
||||
binding.editor.setWordwrap(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_WORD_WRAP_CHANGED = false;
|
||||
}
|
||||
|
||||
if (magnifierChanged) {
|
||||
var enabled = prefs.getBoolean(PreferenceManager.KEY_EDITOR_USE_MAGNIFER, true);
|
||||
binding.editor.getComponent(Magnifier.class).setEnabled(enabled);
|
||||
ConstantsBridge.EDITOR_PREF_USE_MAGNIFIER_CHANGED = false;
|
||||
}
|
||||
|
||||
isFirstCreate = false;
|
||||
}
|
||||
|
||||
private void closeCurrentTag(String text, int line, int col) {
|
||||
try {
|
||||
XMLLexer lexer = new XMLLexer(CharStreams.fromReader(new StringReader(text)));
|
||||
Token token;
|
||||
boolean wasSlash = false, wasOpen = false;
|
||||
ArrayList<String> currentNames = new ArrayList<>();
|
||||
while (((token = lexer.nextToken()) != null && token.getType() != token.EOF)) {
|
||||
final int type = token.getType();
|
||||
if (type == XMLLexer.OPEN) {
|
||||
wasOpen = true;
|
||||
} else if (type == XMLLexer.Name) {
|
||||
if (wasOpen && wasSlash && currentNames.size() > 0) {
|
||||
currentNames.remove(0);
|
||||
} else if (wasOpen) {
|
||||
currentNames.add(0, token.getText());
|
||||
wasOpen = false;
|
||||
}
|
||||
} else if (type == XMLLexer.OPEN_SLASH) {
|
||||
int l = token.getLine() - 1;
|
||||
int c = token.getCharPositionInLine();
|
||||
if (l == line && c == col) {
|
||||
break;
|
||||
} else if (currentNames.size() > 0) {
|
||||
currentNames.remove(0);
|
||||
}
|
||||
} else if (type == XMLLexer.SLASH_CLOSE || type == XMLLexer.SPECIAL_CLOSE) {
|
||||
if (currentNames.size() > 0 && token.getText().trim().endsWith("/>")) {
|
||||
currentNames.remove(0);
|
||||
}
|
||||
} else if (type == XMLLexer.SLASH) {
|
||||
wasSlash = true;
|
||||
} else {
|
||||
wasOpen = wasSlash = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (currentNames.size() > 0) {
|
||||
binding.editor.getText().insert(line, col + 2, currentNames.get(0));
|
||||
}
|
||||
} catch (Throwable th) {
|
||||
LOG.error("Unable to close current tag", th);
|
||||
}
|
||||
}
|
||||
|
||||
private void notifySaved() {
|
||||
binding.editor.didSave();
|
||||
|
||||
if (Objects.requireNonNull(getFile()).getName().endsWith(".xml")) {
|
||||
ValuesTableFactory.syncWithFile(getFile());
|
||||
}
|
||||
}
|
||||
|
||||
/** Mark this files as saved. Even if it not saved. */
|
||||
public void markAsSaved() {
|
||||
isModified = false;
|
||||
notifySaved();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,409 @@
|
||||
lexer grammar CPP14Lexer;
|
||||
|
||||
IntegerLiteral:
|
||||
DecimalLiteral Integersuffix?
|
||||
| OctalLiteral Integersuffix?
|
||||
| HexadecimalLiteral Integersuffix?
|
||||
| BinaryLiteral Integersuffix?;
|
||||
|
||||
CharacterLiteral:
|
||||
('u' | 'U' | 'L')? '\'' Cchar+ '\'';
|
||||
|
||||
FloatingLiteral:
|
||||
Fractionalconstant Exponentpart? Floatingsuffix?
|
||||
| Digitsequence Exponentpart Floatingsuffix?;
|
||||
|
||||
StringLiteral:
|
||||
Encodingprefix?
|
||||
(Rawstring
|
||||
|'"' Schar* '"');
|
||||
|
||||
BooleanLiteral: False_ | True_;
|
||||
|
||||
PointerLiteral: Nullptr;
|
||||
|
||||
UserDefinedLiteral:
|
||||
UserDefinedIntegerLiteral
|
||||
| UserDefinedFloatingLiteral
|
||||
| UserDefinedStringLiteral
|
||||
| UserDefinedCharacterLiteral;
|
||||
|
||||
MultiLineMacro:
|
||||
'#' (~[\n]*? '\\' '\r'? '\n')+ ~ [\n]+ -> channel (HIDDEN);
|
||||
|
||||
Directive: '#' ~ [\n]* -> channel (HIDDEN);
|
||||
/*Keywords*/
|
||||
|
||||
Alignas: 'alignas';
|
||||
|
||||
Alignof: 'alignof';
|
||||
|
||||
Asm: 'asm';
|
||||
|
||||
Auto: 'auto';
|
||||
|
||||
Bool: 'bool';
|
||||
|
||||
Break: 'break';
|
||||
|
||||
Case: 'case';
|
||||
|
||||
Catch: 'catch';
|
||||
|
||||
Char: 'char';
|
||||
|
||||
Char16: 'char16_t';
|
||||
|
||||
Char32: 'char32_t';
|
||||
|
||||
Class: 'class';
|
||||
|
||||
Const: 'const';
|
||||
|
||||
Constexpr: 'constexpr';
|
||||
|
||||
Const_cast: 'const_cast';
|
||||
|
||||
Continue: 'continue';
|
||||
|
||||
Decltype: 'decltype';
|
||||
|
||||
Default: 'default';
|
||||
|
||||
Delete: 'delete';
|
||||
|
||||
Do: 'do';
|
||||
|
||||
Double: 'double';
|
||||
|
||||
Dynamic_cast: 'dynamic_cast';
|
||||
|
||||
Else: 'else';
|
||||
|
||||
Enum: 'enum';
|
||||
|
||||
Explicit: 'explicit';
|
||||
|
||||
Export: 'export';
|
||||
|
||||
Extern: 'extern';
|
||||
|
||||
//DO NOT RENAME - PYTHON NEEDS True and False
|
||||
False_: 'false';
|
||||
|
||||
Final: 'final';
|
||||
|
||||
Float: 'float';
|
||||
|
||||
For: 'for';
|
||||
|
||||
Friend: 'friend';
|
||||
|
||||
Goto: 'goto';
|
||||
|
||||
If: 'if';
|
||||
|
||||
Inline: 'inline';
|
||||
|
||||
Int: 'int';
|
||||
|
||||
Long: 'long';
|
||||
|
||||
Mutable: 'mutable';
|
||||
|
||||
Namespace: 'namespace';
|
||||
|
||||
New: 'new';
|
||||
|
||||
Noexcept: 'noexcept';
|
||||
|
||||
Nullptr: 'nullptr';
|
||||
|
||||
Operator: 'operator';
|
||||
|
||||
Override: 'override';
|
||||
|
||||
Private: 'private';
|
||||
|
||||
Protected: 'protected';
|
||||
|
||||
Public: 'public';
|
||||
|
||||
Register: 'register';
|
||||
|
||||
Reinterpret_cast: 'reinterpret_cast';
|
||||
|
||||
Return: 'return';
|
||||
|
||||
Short: 'short';
|
||||
|
||||
Signed: 'signed';
|
||||
|
||||
Sizeof: 'sizeof';
|
||||
|
||||
Static: 'static';
|
||||
|
||||
Static_assert: 'static_assert';
|
||||
|
||||
Static_cast: 'static_cast';
|
||||
|
||||
Struct: 'struct';
|
||||
|
||||
Switch: 'switch';
|
||||
|
||||
Template: 'template';
|
||||
|
||||
This: 'this';
|
||||
|
||||
Thread_local: 'thread_local';
|
||||
|
||||
Throw: 'throw';
|
||||
|
||||
//DO NOT RENAME - PYTHON NEEDS True and False
|
||||
True_: 'true';
|
||||
|
||||
Try: 'try';
|
||||
|
||||
Typedef: 'typedef';
|
||||
|
||||
Typeid_: 'typeid';
|
||||
|
||||
Typename_: 'typename';
|
||||
|
||||
Union: 'union';
|
||||
|
||||
Unsigned: 'unsigned';
|
||||
|
||||
Using: 'using';
|
||||
|
||||
Virtual: 'virtual';
|
||||
|
||||
Void: 'void';
|
||||
|
||||
Volatile: 'volatile';
|
||||
|
||||
Wchar: 'wchar_t';
|
||||
|
||||
While: 'while';
|
||||
/*Operators*/
|
||||
|
||||
LeftParen: '(';
|
||||
|
||||
RightParen: ')';
|
||||
|
||||
LeftBracket: '[';
|
||||
|
||||
RightBracket: ']';
|
||||
|
||||
LeftBrace: '{';
|
||||
|
||||
RightBrace: '}';
|
||||
|
||||
Plus: '+';
|
||||
|
||||
Minus: '-';
|
||||
|
||||
Star: '*';
|
||||
|
||||
Div: '/';
|
||||
|
||||
Mod: '%';
|
||||
|
||||
Caret: '^';
|
||||
|
||||
And: '&';
|
||||
|
||||
Or: '|';
|
||||
|
||||
Tilde: '~';
|
||||
|
||||
Not: '!' | 'not';
|
||||
|
||||
Assign: '=';
|
||||
|
||||
Less: '<';
|
||||
|
||||
Greater: '>';
|
||||
|
||||
PlusAssign: '+=';
|
||||
|
||||
MinusAssign: '-=';
|
||||
|
||||
StarAssign: '*=';
|
||||
|
||||
DivAssign: '/=';
|
||||
|
||||
ModAssign: '%=';
|
||||
|
||||
XorAssign: '^=';
|
||||
|
||||
AndAssign: '&=';
|
||||
|
||||
OrAssign: '|=';
|
||||
|
||||
LeftShiftAssign: '<<=';
|
||||
|
||||
RightShiftAssign: '>>=';
|
||||
|
||||
Equal: '==';
|
||||
|
||||
NotEqual: '!=';
|
||||
|
||||
LessEqual: '<=';
|
||||
|
||||
GreaterEqual: '>=';
|
||||
|
||||
AndAnd: '&&' | 'and';
|
||||
|
||||
OrOr: '||' | 'or';
|
||||
|
||||
PlusPlus: '++';
|
||||
|
||||
MinusMinus: '--';
|
||||
|
||||
Comma: ',';
|
||||
|
||||
ArrowStar: '->*';
|
||||
|
||||
Arrow: '->';
|
||||
|
||||
Question: '?';
|
||||
|
||||
Colon: ':';
|
||||
|
||||
Doublecolon: '::';
|
||||
|
||||
Semi: ';';
|
||||
|
||||
Dot: '.';
|
||||
|
||||
DotStar: '.*';
|
||||
|
||||
Ellipsis: '...';
|
||||
|
||||
fragment Hexquad:
|
||||
HEXADECIMALDIGIT HEXADECIMALDIGIT HEXADECIMALDIGIT HEXADECIMALDIGIT;
|
||||
|
||||
fragment Universalcharactername:
|
||||
'\\u' Hexquad
|
||||
| '\\U' Hexquad Hexquad;
|
||||
|
||||
Identifier:
|
||||
/*
|
||||
Identifiernondigit | Identifier Identifiernondigit | Identifier DIGIT
|
||||
*/
|
||||
Identifiernondigit (Identifiernondigit | DIGIT)*;
|
||||
|
||||
fragment Identifiernondigit: NONDIGIT | Universalcharactername;
|
||||
|
||||
fragment NONDIGIT: [a-zA-Z_];
|
||||
|
||||
fragment DIGIT: [0-9];
|
||||
|
||||
DecimalLiteral: NONZERODIGIT ('\''? DIGIT)*;
|
||||
|
||||
OctalLiteral: '0' ('\''? OCTALDIGIT)*;
|
||||
|
||||
HexadecimalLiteral: ('0x' | '0X') HEXADECIMALDIGIT (
|
||||
'\''? HEXADECIMALDIGIT
|
||||
)*;
|
||||
|
||||
BinaryLiteral: ('0b' | '0B') BINARYDIGIT ('\''? BINARYDIGIT)*;
|
||||
|
||||
fragment NONZERODIGIT: [1-9];
|
||||
|
||||
fragment OCTALDIGIT: [0-7];
|
||||
|
||||
fragment HEXADECIMALDIGIT: [0-9a-fA-F];
|
||||
|
||||
fragment BINARYDIGIT: [01];
|
||||
|
||||
Integersuffix:
|
||||
Unsignedsuffix Longsuffix?
|
||||
| Unsignedsuffix Longlongsuffix?
|
||||
| Longsuffix Unsignedsuffix?
|
||||
| Longlongsuffix Unsignedsuffix?;
|
||||
|
||||
fragment Unsignedsuffix: [uU];
|
||||
|
||||
fragment Longsuffix: [lL];
|
||||
|
||||
fragment Longlongsuffix: 'll' | 'LL';
|
||||
|
||||
fragment Cchar:
|
||||
~ ['\\\r\n]
|
||||
| Escapesequence
|
||||
| Universalcharactername;
|
||||
|
||||
fragment Escapesequence:
|
||||
Simpleescapesequence
|
||||
| Octalescapesequence
|
||||
| Hexadecimalescapesequence;
|
||||
|
||||
fragment Simpleescapesequence:
|
||||
'\\\''
|
||||
| '\\"'
|
||||
| '\\?'
|
||||
| '\\\\'
|
||||
| '\\a'
|
||||
| '\\b'
|
||||
| '\\f'
|
||||
| '\\n'
|
||||
| '\\r'
|
||||
| ('\\' ('\r' '\n'? | '\n'))
|
||||
| '\\t'
|
||||
| '\\v';
|
||||
|
||||
fragment Octalescapesequence:
|
||||
'\\' OCTALDIGIT
|
||||
| '\\' OCTALDIGIT OCTALDIGIT
|
||||
| '\\' OCTALDIGIT OCTALDIGIT OCTALDIGIT;
|
||||
|
||||
fragment Hexadecimalescapesequence: '\\x' HEXADECIMALDIGIT+;
|
||||
|
||||
fragment Fractionalconstant:
|
||||
Digitsequence? '.' Digitsequence
|
||||
| Digitsequence '.';
|
||||
|
||||
fragment Exponentpart:
|
||||
'e' SIGN? Digitsequence
|
||||
| 'E' SIGN? Digitsequence;
|
||||
|
||||
fragment SIGN: [+-];
|
||||
|
||||
fragment Digitsequence: DIGIT ('\''? DIGIT)*;
|
||||
|
||||
fragment Floatingsuffix: [flFL];
|
||||
|
||||
fragment Encodingprefix: 'u8' | 'u' | 'U' | 'L';
|
||||
|
||||
fragment Schar:
|
||||
~ ["\\\r\n]
|
||||
| Escapesequence
|
||||
| Universalcharactername;
|
||||
|
||||
fragment Rawstring: 'R"' (( '\\' ["()] )|~[\r\n (])*? '(' ~[)]*? ')' (( '\\' ["()]) | ~[\r\n "])*? '"';
|
||||
|
||||
UserDefinedIntegerLiteral:
|
||||
DecimalLiteral Udsuffix
|
||||
| OctalLiteral Udsuffix
|
||||
| HexadecimalLiteral Udsuffix
|
||||
| BinaryLiteral Udsuffix;
|
||||
|
||||
UserDefinedFloatingLiteral:
|
||||
Fractionalconstant Exponentpart? Udsuffix
|
||||
| Digitsequence Exponentpart Udsuffix;
|
||||
|
||||
UserDefinedStringLiteral: StringLiteral Udsuffix;
|
||||
|
||||
UserDefinedCharacterLiteral: CharacterLiteral Udsuffix;
|
||||
|
||||
fragment Udsuffix: Identifier;
|
||||
|
||||
Whitespace: [ \t]+ -> skip;
|
||||
|
||||
Newline: ('\r' '\n'? | '\n') -> skip;
|
||||
|
||||
BlockComment: '/*' .*? '*/' -> skip;
|
||||
|
||||
LineComment: '//' ~ [\r\n]* -> skip;
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,757 @@
|
||||
// Generated from /home/syu/workspace/MSCCD_ALL/Project/grammarDefinations/CPP14/CPP14Lexer.g4 by ANTLR 4.8
|
||||
package com.itsaky.androidide.lexers.cpp;
|
||||
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"})
|
||||
public class CPP14Lexer extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.8", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
IntegerLiteral=1, CharacterLiteral=2, FloatingLiteral=3, StringLiteral=4,
|
||||
BooleanLiteral=5, PointerLiteral=6, UserDefinedLiteral=7, MultiLineMacro=8,
|
||||
Directive=9, Alignas=10, Alignof=11, Asm=12, Auto=13, Bool=14, Break=15,
|
||||
Case=16, Catch=17, Char=18, Char16=19, Char32=20, Class=21, Const=22,
|
||||
Constexpr=23, Const_cast=24, Continue=25, Decltype=26, Default=27, Delete=28,
|
||||
Do=29, Double=30, Dynamic_cast=31, Else=32, Enum=33, Explicit=34, Export=35,
|
||||
Extern=36, False_=37, Final=38, Float=39, For=40, Friend=41, Goto=42,
|
||||
If=43, Inline=44, Int=45, Long=46, Mutable=47, Namespace=48, New=49, Noexcept=50,
|
||||
Nullptr=51, Operator=52, Override=53, Private=54, Protected=55, Public=56,
|
||||
Register=57, Reinterpret_cast=58, Return=59, Short=60, Signed=61, Sizeof=62,
|
||||
Static=63, Static_assert=64, Static_cast=65, Struct=66, Switch=67, Template=68,
|
||||
This=69, Thread_local=70, Throw=71, True_=72, Try=73, Typedef=74, Typeid_=75,
|
||||
Typename_=76, Union=77, Unsigned=78, Using=79, Virtual=80, Void=81, Volatile=82,
|
||||
Wchar=83, While=84, LeftParen=85, RightParen=86, LeftBracket=87, RightBracket=88,
|
||||
LeftBrace=89, RightBrace=90, Plus=91, Minus=92, Star=93, Div=94, Mod=95,
|
||||
Caret=96, And=97, Or=98, Tilde=99, Not=100, Assign=101, Less=102, Greater=103,
|
||||
PlusAssign=104, MinusAssign=105, StarAssign=106, DivAssign=107, ModAssign=108,
|
||||
XorAssign=109, AndAssign=110, OrAssign=111, LeftShiftAssign=112, RightShiftAssign=113,
|
||||
Equal=114, NotEqual=115, LessEqual=116, GreaterEqual=117, AndAnd=118,
|
||||
OrOr=119, PlusPlus=120, MinusMinus=121, Comma=122, ArrowStar=123, Arrow=124,
|
||||
Question=125, Colon=126, Doublecolon=127, Semi=128, Dot=129, DotStar=130,
|
||||
Ellipsis=131, Identifier=132, DecimalLiteral=133, OctalLiteral=134, HexadecimalLiteral=135,
|
||||
BinaryLiteral=136, Integersuffix=137, UserDefinedIntegerLiteral=138, UserDefinedFloatingLiteral=139,
|
||||
UserDefinedStringLiteral=140, UserDefinedCharacterLiteral=141, Whitespace=142,
|
||||
Newline=143, BlockComment=144, LineComment=145;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"IntegerLiteral", "CharacterLiteral", "FloatingLiteral", "StringLiteral",
|
||||
"BooleanLiteral", "PointerLiteral", "UserDefinedLiteral", "MultiLineMacro",
|
||||
"Directive", "Alignas", "Alignof", "Asm", "Auto", "Bool", "Break", "Case",
|
||||
"Catch", "Char", "Char16", "Char32", "Class", "Const", "Constexpr", "Const_cast",
|
||||
"Continue", "Decltype", "Default", "Delete", "Do", "Double", "Dynamic_cast",
|
||||
"Else", "Enum", "Explicit", "Export", "Extern", "False_", "Final", "Float",
|
||||
"For", "Friend", "Goto", "If", "Inline", "Int", "Long", "Mutable", "Namespace",
|
||||
"New", "Noexcept", "Nullptr", "Operator", "Override", "Private", "Protected",
|
||||
"Public", "Register", "Reinterpret_cast", "Return", "Short", "Signed",
|
||||
"Sizeof", "Static", "Static_assert", "Static_cast", "Struct", "Switch",
|
||||
"Template", "This", "Thread_local", "Throw", "True_", "Try", "Typedef",
|
||||
"Typeid_", "Typename_", "Union", "Unsigned", "Using", "Virtual", "Void",
|
||||
"Volatile", "Wchar", "While", "LeftParen", "RightParen", "LeftBracket",
|
||||
"RightBracket", "LeftBrace", "RightBrace", "Plus", "Minus", "Star", "Div",
|
||||
"Mod", "Caret", "And", "Or", "Tilde", "Not", "Assign", "Less", "Greater",
|
||||
"PlusAssign", "MinusAssign", "StarAssign", "DivAssign", "ModAssign",
|
||||
"XorAssign", "AndAssign", "OrAssign", "LeftShiftAssign", "RightShiftAssign",
|
||||
"Equal", "NotEqual", "LessEqual", "GreaterEqual", "AndAnd", "OrOr", "PlusPlus",
|
||||
"MinusMinus", "Comma", "ArrowStar", "Arrow", "Question", "Colon", "Doublecolon",
|
||||
"Semi", "Dot", "DotStar", "Ellipsis", "Hexquad", "Universalcharactername",
|
||||
"Identifier", "Identifiernondigit", "NONDIGIT", "DIGIT", "DecimalLiteral",
|
||||
"OctalLiteral", "HexadecimalLiteral", "BinaryLiteral", "NONZERODIGIT",
|
||||
"OCTALDIGIT", "HEXADECIMALDIGIT", "BINARYDIGIT", "Integersuffix", "Unsignedsuffix",
|
||||
"Longsuffix", "Longlongsuffix", "Cchar", "Escapesequence", "Simpleescapesequence",
|
||||
"Octalescapesequence", "Hexadecimalescapesequence", "Fractionalconstant",
|
||||
"Exponentpart", "SIGN", "Digitsequence", "Floatingsuffix", "Encodingprefix",
|
||||
"Schar", "Rawstring", "UserDefinedIntegerLiteral", "UserDefinedFloatingLiteral",
|
||||
"UserDefinedStringLiteral", "UserDefinedCharacterLiteral", "Udsuffix",
|
||||
"Whitespace", "Newline", "BlockComment", "LineComment"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
null, null, null, null, null, null, null, null, null, null, "'alignas'",
|
||||
"'alignof'", "'asm'", "'auto'", "'bool'", "'break'", "'case'", "'catch'",
|
||||
"'char'", "'char16_t'", "'char32_t'", "'class'", "'const'", "'constexpr'",
|
||||
"'const_cast'", "'continue'", "'decltype'", "'default'", "'delete'",
|
||||
"'do'", "'double'", "'dynamic_cast'", "'else'", "'enum'", "'explicit'",
|
||||
"'export'", "'extern'", "'false'", "'final'", "'float'", "'for'", "'friend'",
|
||||
"'goto'", "'if'", "'inline'", "'int'", "'long'", "'mutable'", "'namespace'",
|
||||
"'new'", "'noexcept'", "'nullptr'", "'operator'", "'override'", "'private'",
|
||||
"'protected'", "'public'", "'register'", "'reinterpret_cast'", "'return'",
|
||||
"'short'", "'signed'", "'sizeof'", "'static'", "'static_assert'", "'static_cast'",
|
||||
"'struct'", "'switch'", "'template'", "'this'", "'thread_local'", "'throw'",
|
||||
"'true'", "'try'", "'typedef'", "'typeid'", "'typename'", "'union'",
|
||||
"'unsigned'", "'using'", "'virtual'", "'void'", "'volatile'", "'wchar_t'",
|
||||
"'while'", "'('", "')'", "'['", "']'", "'{'", "'}'", "'+'", "'-'", "'*'",
|
||||
"'/'", "'%'", "'^'", "'&'", "'|'", "'~'", null, "'='", "'<'", "'>'",
|
||||
"'+='", "'-='", "'*='", "'/='", "'%='", "'^='", "'&='", "'|='", "'<<='",
|
||||
"'>>='", "'=='", "'!='", "'<='", "'>='", null, null, "'++'", "'--'",
|
||||
"','", "'->*'", "'->'", "'?'", "':'", "'::'", "';'", "'.'", "'.*'", "'...'"
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, "IntegerLiteral", "CharacterLiteral", "FloatingLiteral", "StringLiteral",
|
||||
"BooleanLiteral", "PointerLiteral", "UserDefinedLiteral", "MultiLineMacro",
|
||||
"Directive", "Alignas", "Alignof", "Asm", "Auto", "Bool", "Break", "Case",
|
||||
"Catch", "Char", "Char16", "Char32", "Class", "Const", "Constexpr", "Const_cast",
|
||||
"Continue", "Decltype", "Default", "Delete", "Do", "Double", "Dynamic_cast",
|
||||
"Else", "Enum", "Explicit", "Export", "Extern", "False_", "Final", "Float",
|
||||
"For", "Friend", "Goto", "If", "Inline", "Int", "Long", "Mutable", "Namespace",
|
||||
"New", "Noexcept", "Nullptr", "Operator", "Override", "Private", "Protected",
|
||||
"Public", "Register", "Reinterpret_cast", "Return", "Short", "Signed",
|
||||
"Sizeof", "Static", "Static_assert", "Static_cast", "Struct", "Switch",
|
||||
"Template", "This", "Thread_local", "Throw", "True_", "Try", "Typedef",
|
||||
"Typeid_", "Typename_", "Union", "Unsigned", "Using", "Virtual", "Void",
|
||||
"Volatile", "Wchar", "While", "LeftParen", "RightParen", "LeftBracket",
|
||||
"RightBracket", "LeftBrace", "RightBrace", "Plus", "Minus", "Star", "Div",
|
||||
"Mod", "Caret", "And", "Or", "Tilde", "Not", "Assign", "Less", "Greater",
|
||||
"PlusAssign", "MinusAssign", "StarAssign", "DivAssign", "ModAssign",
|
||||
"XorAssign", "AndAssign", "OrAssign", "LeftShiftAssign", "RightShiftAssign",
|
||||
"Equal", "NotEqual", "LessEqual", "GreaterEqual", "AndAnd", "OrOr", "PlusPlus",
|
||||
"MinusMinus", "Comma", "ArrowStar", "Arrow", "Question", "Colon", "Doublecolon",
|
||||
"Semi", "Dot", "DotStar", "Ellipsis", "Identifier", "DecimalLiteral",
|
||||
"OctalLiteral", "HexadecimalLiteral", "BinaryLiteral", "Integersuffix",
|
||||
"UserDefinedIntegerLiteral", "UserDefinedFloatingLiteral", "UserDefinedStringLiteral",
|
||||
"UserDefinedCharacterLiteral", "Whitespace", "Newline", "BlockComment",
|
||||
"LineComment"
|
||||
};
|
||||
}
|
||||
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 CPP14Lexer(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "CPP14Lexer.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; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\u0093\u05b4\b\1\4"+
|
||||
"\2\t\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n"+
|
||||
"\4\13\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22"+
|
||||
"\t\22\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31"+
|
||||
"\t\31\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t"+
|
||||
" \4!\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t"+
|
||||
"+\4,\t,\4-\t-\4.\t.\4/\t/\4\60\t\60\4\61\t\61\4\62\t\62\4\63\t\63\4\64"+
|
||||
"\t\64\4\65\t\65\4\66\t\66\4\67\t\67\48\t8\49\t9\4:\t:\4;\t;\4<\t<\4=\t"+
|
||||
"=\4>\t>\4?\t?\4@\t@\4A\tA\4B\tB\4C\tC\4D\tD\4E\tE\4F\tF\4G\tG\4H\tH\4"+
|
||||
"I\tI\4J\tJ\4K\tK\4L\tL\4M\tM\4N\tN\4O\tO\4P\tP\4Q\tQ\4R\tR\4S\tS\4T\t"+
|
||||
"T\4U\tU\4V\tV\4W\tW\4X\tX\4Y\tY\4Z\tZ\4[\t[\4\\\t\\\4]\t]\4^\t^\4_\t_"+
|
||||
"\4`\t`\4a\ta\4b\tb\4c\tc\4d\td\4e\te\4f\tf\4g\tg\4h\th\4i\ti\4j\tj\4k"+
|
||||
"\tk\4l\tl\4m\tm\4n\tn\4o\to\4p\tp\4q\tq\4r\tr\4s\ts\4t\tt\4u\tu\4v\tv"+
|
||||
"\4w\tw\4x\tx\4y\ty\4z\tz\4{\t{\4|\t|\4}\t}\4~\t~\4\177\t\177\4\u0080\t"+
|
||||
"\u0080\4\u0081\t\u0081\4\u0082\t\u0082\4\u0083\t\u0083\4\u0084\t\u0084"+
|
||||
"\4\u0085\t\u0085\4\u0086\t\u0086\4\u0087\t\u0087\4\u0088\t\u0088\4\u0089"+
|
||||
"\t\u0089\4\u008a\t\u008a\4\u008b\t\u008b\4\u008c\t\u008c\4\u008d\t\u008d"+
|
||||
"\4\u008e\t\u008e\4\u008f\t\u008f\4\u0090\t\u0090\4\u0091\t\u0091\4\u0092"+
|
||||
"\t\u0092\4\u0093\t\u0093\4\u0094\t\u0094\4\u0095\t\u0095\4\u0096\t\u0096"+
|
||||
"\4\u0097\t\u0097\4\u0098\t\u0098\4\u0099\t\u0099\4\u009a\t\u009a\4\u009b"+
|
||||
"\t\u009b\4\u009c\t\u009c\4\u009d\t\u009d\4\u009e\t\u009e\4\u009f\t\u009f"+
|
||||
"\4\u00a0\t\u00a0\4\u00a1\t\u00a1\4\u00a2\t\u00a2\4\u00a3\t\u00a3\4\u00a4"+
|
||||
"\t\u00a4\4\u00a5\t\u00a5\4\u00a6\t\u00a6\4\u00a7\t\u00a7\4\u00a8\t\u00a8"+
|
||||
"\4\u00a9\t\u00a9\4\u00aa\t\u00aa\4\u00ab\t\u00ab\4\u00ac\t\u00ac\3\2\3"+
|
||||
"\2\5\2\u015c\n\2\3\2\3\2\5\2\u0160\n\2\3\2\3\2\5\2\u0164\n\2\3\2\3\2\5"+
|
||||
"\2\u0168\n\2\5\2\u016a\n\2\3\3\5\3\u016d\n\3\3\3\3\3\6\3\u0171\n\3\r\3"+
|
||||
"\16\3\u0172\3\3\3\3\3\4\3\4\5\4\u0179\n\4\3\4\5\4\u017c\n\4\3\4\3\4\3"+
|
||||
"\4\5\4\u0181\n\4\5\4\u0183\n\4\3\5\5\5\u0186\n\5\3\5\3\5\7\5\u018a\n\5"+
|
||||
"\f\5\16\5\u018d\13\5\3\5\3\5\5\5\u0191\n\5\3\5\3\5\5\5\u0195\n\5\3\6\3"+
|
||||
"\6\5\6\u0199\n\6\3\7\3\7\3\b\3\b\3\b\3\b\5\b\u01a1\n\b\3\t\3\t\7\t\u01a5"+
|
||||
"\n\t\f\t\16\t\u01a8\13\t\3\t\3\t\5\t\u01ac\n\t\3\t\6\t\u01af\n\t\r\t\16"+
|
||||
"\t\u01b0\3\t\6\t\u01b4\n\t\r\t\16\t\u01b5\3\t\3\t\3\n\3\n\7\n\u01bc\n"+
|
||||
"\n\f\n\16\n\u01bf\13\n\3\n\3\n\3\13\3\13\3\13\3\13\3\13\3\13\3\13\3\13"+
|
||||
"\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\f\3\r\3\r\3\r\3\r\3\16\3\16\3\16\3\16\3"+
|
||||
"\16\3\17\3\17\3\17\3\17\3\17\3\20\3\20\3\20\3\20\3\20\3\20\3\21\3\21\3"+
|
||||
"\21\3\21\3\21\3\22\3\22\3\22\3\22\3\22\3\22\3\23\3\23\3\23\3\23\3\23\3"+
|
||||
"\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3"+
|
||||
"\25\3\25\3\25\3\25\3\26\3\26\3\26\3\26\3\26\3\26\3\27\3\27\3\27\3\27\3"+
|
||||
"\27\3\27\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\30\3\31\3\31\3"+
|
||||
"\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3"+
|
||||
"\32\3\32\3\32\3\32\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\33\3\34\3"+
|
||||
"\34\3\34\3\34\3\34\3\34\3\34\3\34\3\35\3\35\3\35\3\35\3\35\3\35\3\35\3"+
|
||||
"\36\3\36\3\36\3\37\3\37\3\37\3\37\3\37\3\37\3\37\3 \3 \3 \3 \3 \3 \3 "+
|
||||
"\3 \3 \3 \3 \3 \3 \3!\3!\3!\3!\3!\3\"\3\"\3\"\3\"\3\"\3#\3#\3#\3#\3#\3"+
|
||||
"#\3#\3#\3#\3$\3$\3$\3$\3$\3$\3$\3%\3%\3%\3%\3%\3%\3%\3&\3&\3&\3&\3&\3"+
|
||||
"&\3\'\3\'\3\'\3\'\3\'\3\'\3(\3(\3(\3(\3(\3(\3)\3)\3)\3)\3*\3*\3*\3*\3"+
|
||||
"*\3*\3*\3+\3+\3+\3+\3+\3,\3,\3,\3-\3-\3-\3-\3-\3-\3-\3.\3.\3.\3.\3/\3"+
|
||||
"/\3/\3/\3/\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\60\3\61\3\61\3\61\3\61"+
|
||||
"\3\61\3\61\3\61\3\61\3\61\3\61\3\62\3\62\3\62\3\62\3\63\3\63\3\63\3\63"+
|
||||
"\3\63\3\63\3\63\3\63\3\63\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\64\3\65"+
|
||||
"\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\65\3\66\3\66\3\66\3\66\3\66\3\66"+
|
||||
"\3\66\3\66\3\66\3\67\3\67\3\67\3\67\3\67\3\67\3\67\3\67\38\38\38\38\3"+
|
||||
"8\38\38\38\38\38\39\39\39\39\39\39\39\3:\3:\3:\3:\3:\3:\3:\3:\3:\3;\3"+
|
||||
";\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3;\3<\3<\3<\3<\3<\3<\3<\3"+
|
||||
"=\3=\3=\3=\3=\3=\3>\3>\3>\3>\3>\3>\3>\3?\3?\3?\3?\3?\3?\3?\3@\3@\3@\3"+
|
||||
"@\3@\3@\3@\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3A\3B\3B\3B\3B\3B\3"+
|
||||
"B\3B\3B\3B\3B\3B\3B\3C\3C\3C\3C\3C\3C\3C\3D\3D\3D\3D\3D\3D\3D\3E\3E\3"+
|
||||
"E\3E\3E\3E\3E\3E\3E\3F\3F\3F\3F\3F\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3G\3"+
|
||||
"G\3G\3H\3H\3H\3H\3H\3H\3I\3I\3I\3I\3I\3J\3J\3J\3J\3K\3K\3K\3K\3K\3K\3"+
|
||||
"K\3K\3L\3L\3L\3L\3L\3L\3L\3M\3M\3M\3M\3M\3M\3M\3M\3M\3N\3N\3N\3N\3N\3"+
|
||||
"N\3O\3O\3O\3O\3O\3O\3O\3O\3O\3P\3P\3P\3P\3P\3P\3Q\3Q\3Q\3Q\3Q\3Q\3Q\3"+
|
||||
"Q\3R\3R\3R\3R\3R\3S\3S\3S\3S\3S\3S\3S\3S\3S\3T\3T\3T\3T\3T\3T\3T\3T\3"+
|
||||
"U\3U\3U\3U\3U\3U\3V\3V\3W\3W\3X\3X\3Y\3Y\3Z\3Z\3[\3[\3\\\3\\\3]\3]\3^"+
|
||||
"\3^\3_\3_\3`\3`\3a\3a\3b\3b\3c\3c\3d\3d\3e\3e\3e\3e\5e\u040b\ne\3f\3f"+
|
||||
"\3g\3g\3h\3h\3i\3i\3i\3j\3j\3j\3k\3k\3k\3l\3l\3l\3m\3m\3m\3n\3n\3n\3o"+
|
||||
"\3o\3o\3p\3p\3p\3q\3q\3q\3q\3r\3r\3r\3r\3s\3s\3s\3t\3t\3t\3u\3u\3u\3v"+
|
||||
"\3v\3v\3w\3w\3w\3w\3w\5w\u0444\nw\3x\3x\3x\3x\5x\u044a\nx\3y\3y\3y\3z"+
|
||||
"\3z\3z\3{\3{\3|\3|\3|\3|\3}\3}\3}\3~\3~\3\177\3\177\3\u0080\3\u0080\3"+
|
||||
"\u0080\3\u0081\3\u0081\3\u0082\3\u0082\3\u0083\3\u0083\3\u0083\3\u0084"+
|
||||
"\3\u0084\3\u0084\3\u0084\3\u0085\3\u0085\3\u0085\3\u0085\3\u0085\3\u0086"+
|
||||
"\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086\3\u0086"+
|
||||
"\5\u0086\u047c\n\u0086\3\u0087\3\u0087\3\u0087\7\u0087\u0481\n\u0087\f"+
|
||||
"\u0087\16\u0087\u0484\13\u0087\3\u0088\3\u0088\5\u0088\u0488\n\u0088\3"+
|
||||
"\u0089\3\u0089\3\u008a\3\u008a\3\u008b\3\u008b\5\u008b\u0490\n\u008b\3"+
|
||||
"\u008b\7\u008b\u0493\n\u008b\f\u008b\16\u008b\u0496\13\u008b\3\u008c\3"+
|
||||
"\u008c\5\u008c\u049a\n\u008c\3\u008c\7\u008c\u049d\n\u008c\f\u008c\16"+
|
||||
"\u008c\u04a0\13\u008c\3\u008d\3\u008d\3\u008d\3\u008d\5\u008d\u04a6\n"+
|
||||
"\u008d\3\u008d\3\u008d\5\u008d\u04aa\n\u008d\3\u008d\7\u008d\u04ad\n\u008d"+
|
||||
"\f\u008d\16\u008d\u04b0\13\u008d\3\u008e\3\u008e\3\u008e\3\u008e\5\u008e"+
|
||||
"\u04b6\n\u008e\3\u008e\3\u008e\5\u008e\u04ba\n\u008e\3\u008e\7\u008e\u04bd"+
|
||||
"\n\u008e\f\u008e\16\u008e\u04c0\13\u008e\3\u008f\3\u008f\3\u0090\3\u0090"+
|
||||
"\3\u0091\3\u0091\3\u0092\3\u0092\3\u0093\3\u0093\5\u0093\u04cc\n\u0093"+
|
||||
"\3\u0093\3\u0093\5\u0093\u04d0\n\u0093\3\u0093\3\u0093\5\u0093\u04d4\n"+
|
||||
"\u0093\3\u0093\3\u0093\5\u0093\u04d8\n\u0093\5\u0093\u04da\n\u0093\3\u0094"+
|
||||
"\3\u0094\3\u0095\3\u0095\3\u0096\3\u0096\3\u0096\3\u0096\5\u0096\u04e4"+
|
||||
"\n\u0096\3\u0097\3\u0097\3\u0097\5\u0097\u04e9\n\u0097\3\u0098\3\u0098"+
|
||||
"\3\u0098\5\u0098\u04ee\n\u0098\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099"+
|
||||
"\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099"+
|
||||
"\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\3\u0099\5\u0099\u0505"+
|
||||
"\n\u0099\3\u0099\5\u0099\u0508\n\u0099\3\u0099\3\u0099\3\u0099\3\u0099"+
|
||||
"\5\u0099\u050e\n\u0099\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a"+
|
||||
"\3\u009a\3\u009a\3\u009a\3\u009a\3\u009a\5\u009a\u051b\n\u009a\3\u009b"+
|
||||
"\3\u009b\3\u009b\3\u009b\6\u009b\u0521\n\u009b\r\u009b\16\u009b\u0522"+
|
||||
"\3\u009c\5\u009c\u0526\n\u009c\3\u009c\3\u009c\3\u009c\3\u009c\3\u009c"+
|
||||
"\5\u009c\u052d\n\u009c\3\u009d\3\u009d\5\u009d\u0531\n\u009d\3\u009d\3"+
|
||||
"\u009d\3\u009d\5\u009d\u0536\n\u009d\3\u009d\5\u009d\u0539\n\u009d\3\u009e"+
|
||||
"\3\u009e\3\u009f\3\u009f\5\u009f\u053f\n\u009f\3\u009f\7\u009f\u0542\n"+
|
||||
"\u009f\f\u009f\16\u009f\u0545\13\u009f\3\u00a0\3\u00a0\3\u00a1\3\u00a1"+
|
||||
"\3\u00a1\5\u00a1\u054c\n\u00a1\3\u00a2\3\u00a2\3\u00a2\5\u00a2\u0551\n"+
|
||||
"\u00a2\3\u00a3\3\u00a3\7\u00a3\u0555\n\u00a3\f\u00a3\16\u00a3\u0558\13"+
|
||||
"\u00a3\3\u00a3\3\u00a3\7\u00a3\u055c\n\u00a3\f\u00a3\16\u00a3\u055f\13"+
|
||||
"\u00a3\3\u00a3\3\u00a3\7\u00a3\u0563\n\u00a3\f\u00a3\16\u00a3\u0566\13"+
|
||||
"\u00a3\3\u00a3\3\u00a3\3\u00a4\3\u00a4\3\u00a4\3\u00a4\3\u00a4\3\u00a4"+
|
||||
"\3\u00a4\3\u00a4\3\u00a4\3\u00a4\3\u00a4\3\u00a4\5\u00a4\u0576\n\u00a4"+
|
||||
"\3\u00a5\3\u00a5\5\u00a5\u057a\n\u00a5\3\u00a5\3\u00a5\3\u00a5\3\u00a5"+
|
||||
"\3\u00a5\3\u00a5\5\u00a5\u0582\n\u00a5\3\u00a6\3\u00a6\3\u00a6\3\u00a7"+
|
||||
"\3\u00a7\3\u00a7\3\u00a8\3\u00a8\3\u00a9\6\u00a9\u058d\n\u00a9\r\u00a9"+
|
||||
"\16\u00a9\u058e\3\u00a9\3\u00a9\3\u00aa\3\u00aa\5\u00aa\u0595\n\u00aa"+
|
||||
"\3\u00aa\5\u00aa\u0598\n\u00aa\3\u00aa\3\u00aa\3\u00ab\3\u00ab\3\u00ab"+
|
||||
"\3\u00ab\7\u00ab\u05a0\n\u00ab\f\u00ab\16\u00ab\u05a3\13\u00ab\3\u00ab"+
|
||||
"\3\u00ab\3\u00ab\3\u00ab\3\u00ab\3\u00ac\3\u00ac\3\u00ac\3\u00ac\7\u00ac"+
|
||||
"\u05ae\n\u00ac\f\u00ac\16\u00ac\u05b1\13\u00ac\3\u00ac\3\u00ac\4\u01a6"+
|
||||
"\u05a1\2\u00ad\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16"+
|
||||
"\33\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34"+
|
||||
"\67\359\36;\37= ?!A\"C#E$G%I&K\'M(O)Q*S+U,W-Y.[/]\60_\61a\62c\63e\64g"+
|
||||
"\65i\66k\67m8o9q:s;u<w=y>{?}@\177A\u0081B\u0083C\u0085D\u0087E\u0089F"+
|
||||
"\u008bG\u008dH\u008fI\u0091J\u0093K\u0095L\u0097M\u0099N\u009bO\u009d"+
|
||||
"P\u009fQ\u00a1R\u00a3S\u00a5T\u00a7U\u00a9V\u00abW\u00adX\u00afY\u00b1"+
|
||||
"Z\u00b3[\u00b5\\\u00b7]\u00b9^\u00bb_\u00bd`\u00bfa\u00c1b\u00c3c\u00c5"+
|
||||
"d\u00c7e\u00c9f\u00cbg\u00cdh\u00cfi\u00d1j\u00d3k\u00d5l\u00d7m\u00d9"+
|
||||
"n\u00dbo\u00ddp\u00dfq\u00e1r\u00e3s\u00e5t\u00e7u\u00e9v\u00ebw\u00ed"+
|
||||
"x\u00efy\u00f1z\u00f3{\u00f5|\u00f7}\u00f9~\u00fb\177\u00fd\u0080\u00ff"+
|
||||
"\u0081\u0101\u0082\u0103\u0083\u0105\u0084\u0107\u0085\u0109\2\u010b\2"+
|
||||
"\u010d\u0086\u010f\2\u0111\2\u0113\2\u0115\u0087\u0117\u0088\u0119\u0089"+
|
||||
"\u011b\u008a\u011d\2\u011f\2\u0121\2\u0123\2\u0125\u008b\u0127\2\u0129"+
|
||||
"\2\u012b\2\u012d\2\u012f\2\u0131\2\u0133\2\u0135\2\u0137\2\u0139\2\u013b"+
|
||||
"\2\u013d\2\u013f\2\u0141\2\u0143\2\u0145\2\u0147\u008c\u0149\u008d\u014b"+
|
||||
"\u008e\u014d\u008f\u014f\2\u0151\u0090\u0153\u0091\u0155\u0092\u0157\u0093"+
|
||||
"\3\2\25\5\2NNWWww\3\2\f\f\5\2C\\aac|\3\2\62;\3\2\63;\3\2\629\5\2\62;C"+
|
||||
"Hch\3\2\62\63\4\2WWww\4\2NNnn\6\2\f\f\17\17))^^\4\2--//\6\2HHNNhhnn\6"+
|
||||
"\2\f\f\17\17$$^^\5\2\f\f\17\17**\5\2\f\f\17\17++\5\2\f\f\17\17$$\4\2\13"+
|
||||
"\13\"\"\4\2\f\f\17\17\2\u05f7\2\3\3\2\2\2\2\5\3\2\2\2\2\7\3\2\2\2\2\t"+
|
||||
"\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2\2\21\3\2\2\2\2\23\3\2\2"+
|
||||
"\2\2\25\3\2\2\2\2\27\3\2\2\2\2\31\3\2\2\2\2\33\3\2\2\2\2\35\3\2\2\2\2"+
|
||||
"\37\3\2\2\2\2!\3\2\2\2\2#\3\2\2\2\2%\3\2\2\2\2\'\3\2\2\2\2)\3\2\2\2\2"+
|
||||
"+\3\2\2\2\2-\3\2\2\2\2/\3\2\2\2\2\61\3\2\2\2\2\63\3\2\2\2\2\65\3\2\2\2"+
|
||||
"\2\67\3\2\2\2\29\3\2\2\2\2;\3\2\2\2\2=\3\2\2\2\2?\3\2\2\2\2A\3\2\2\2\2"+
|
||||
"C\3\2\2\2\2E\3\2\2\2\2G\3\2\2\2\2I\3\2\2\2\2K\3\2\2\2\2M\3\2\2\2\2O\3"+
|
||||
"\2\2\2\2Q\3\2\2\2\2S\3\2\2\2\2U\3\2\2\2\2W\3\2\2\2\2Y\3\2\2\2\2[\3\2\2"+
|
||||
"\2\2]\3\2\2\2\2_\3\2\2\2\2a\3\2\2\2\2c\3\2\2\2\2e\3\2\2\2\2g\3\2\2\2\2"+
|
||||
"i\3\2\2\2\2k\3\2\2\2\2m\3\2\2\2\2o\3\2\2\2\2q\3\2\2\2\2s\3\2\2\2\2u\3"+
|
||||
"\2\2\2\2w\3\2\2\2\2y\3\2\2\2\2{\3\2\2\2\2}\3\2\2\2\2\177\3\2\2\2\2\u0081"+
|
||||
"\3\2\2\2\2\u0083\3\2\2\2\2\u0085\3\2\2\2\2\u0087\3\2\2\2\2\u0089\3\2\2"+
|
||||
"\2\2\u008b\3\2\2\2\2\u008d\3\2\2\2\2\u008f\3\2\2\2\2\u0091\3\2\2\2\2\u0093"+
|
||||
"\3\2\2\2\2\u0095\3\2\2\2\2\u0097\3\2\2\2\2\u0099\3\2\2\2\2\u009b\3\2\2"+
|
||||
"\2\2\u009d\3\2\2\2\2\u009f\3\2\2\2\2\u00a1\3\2\2\2\2\u00a3\3\2\2\2\2\u00a5"+
|
||||
"\3\2\2\2\2\u00a7\3\2\2\2\2\u00a9\3\2\2\2\2\u00ab\3\2\2\2\2\u00ad\3\2\2"+
|
||||
"\2\2\u00af\3\2\2\2\2\u00b1\3\2\2\2\2\u00b3\3\2\2\2\2\u00b5\3\2\2\2\2\u00b7"+
|
||||
"\3\2\2\2\2\u00b9\3\2\2\2\2\u00bb\3\2\2\2\2\u00bd\3\2\2\2\2\u00bf\3\2\2"+
|
||||
"\2\2\u00c1\3\2\2\2\2\u00c3\3\2\2\2\2\u00c5\3\2\2\2\2\u00c7\3\2\2\2\2\u00c9"+
|
||||
"\3\2\2\2\2\u00cb\3\2\2\2\2\u00cd\3\2\2\2\2\u00cf\3\2\2\2\2\u00d1\3\2\2"+
|
||||
"\2\2\u00d3\3\2\2\2\2\u00d5\3\2\2\2\2\u00d7\3\2\2\2\2\u00d9\3\2\2\2\2\u00db"+
|
||||
"\3\2\2\2\2\u00dd\3\2\2\2\2\u00df\3\2\2\2\2\u00e1\3\2\2\2\2\u00e3\3\2\2"+
|
||||
"\2\2\u00e5\3\2\2\2\2\u00e7\3\2\2\2\2\u00e9\3\2\2\2\2\u00eb\3\2\2\2\2\u00ed"+
|
||||
"\3\2\2\2\2\u00ef\3\2\2\2\2\u00f1\3\2\2\2\2\u00f3\3\2\2\2\2\u00f5\3\2\2"+
|
||||
"\2\2\u00f7\3\2\2\2\2\u00f9\3\2\2\2\2\u00fb\3\2\2\2\2\u00fd\3\2\2\2\2\u00ff"+
|
||||
"\3\2\2\2\2\u0101\3\2\2\2\2\u0103\3\2\2\2\2\u0105\3\2\2\2\2\u0107\3\2\2"+
|
||||
"\2\2\u010d\3\2\2\2\2\u0115\3\2\2\2\2\u0117\3\2\2\2\2\u0119\3\2\2\2\2\u011b"+
|
||||
"\3\2\2\2\2\u0125\3\2\2\2\2\u0147\3\2\2\2\2\u0149\3\2\2\2\2\u014b\3\2\2"+
|
||||
"\2\2\u014d\3\2\2\2\2\u0151\3\2\2\2\2\u0153\3\2\2\2\2\u0155\3\2\2\2\2\u0157"+
|
||||
"\3\2\2\2\3\u0169\3\2\2\2\5\u016c\3\2\2\2\7\u0182\3\2\2\2\t\u0194\3\2\2"+
|
||||
"\2\13\u0198\3\2\2\2\r\u019a\3\2\2\2\17\u01a0\3\2\2\2\21\u01a2\3\2\2\2"+
|
||||
"\23\u01b9\3\2\2\2\25\u01c2\3\2\2\2\27\u01ca\3\2\2\2\31\u01d2\3\2\2\2\33"+
|
||||
"\u01d6\3\2\2\2\35\u01db\3\2\2\2\37\u01e0\3\2\2\2!\u01e6\3\2\2\2#\u01eb"+
|
||||
"\3\2\2\2%\u01f1\3\2\2\2\'\u01f6\3\2\2\2)\u01ff\3\2\2\2+\u0208\3\2\2\2"+
|
||||
"-\u020e\3\2\2\2/\u0214\3\2\2\2\61\u021e\3\2\2\2\63\u0229\3\2\2\2\65\u0232"+
|
||||
"\3\2\2\2\67\u023b\3\2\2\29\u0243\3\2\2\2;\u024a\3\2\2\2=\u024d\3\2\2\2"+
|
||||
"?\u0254\3\2\2\2A\u0261\3\2\2\2C\u0266\3\2\2\2E\u026b\3\2\2\2G\u0274\3"+
|
||||
"\2\2\2I\u027b\3\2\2\2K\u0282\3\2\2\2M\u0288\3\2\2\2O\u028e\3\2\2\2Q\u0294"+
|
||||
"\3\2\2\2S\u0298\3\2\2\2U\u029f\3\2\2\2W\u02a4\3\2\2\2Y\u02a7\3\2\2\2["+
|
||||
"\u02ae\3\2\2\2]\u02b2\3\2\2\2_\u02b7\3\2\2\2a\u02bf\3\2\2\2c\u02c9\3\2"+
|
||||
"\2\2e\u02cd\3\2\2\2g\u02d6\3\2\2\2i\u02de\3\2\2\2k\u02e7\3\2\2\2m\u02f0"+
|
||||
"\3\2\2\2o\u02f8\3\2\2\2q\u0302\3\2\2\2s\u0309\3\2\2\2u\u0312\3\2\2\2w"+
|
||||
"\u0323\3\2\2\2y\u032a\3\2\2\2{\u0330\3\2\2\2}\u0337\3\2\2\2\177\u033e"+
|
||||
"\3\2\2\2\u0081\u0345\3\2\2\2\u0083\u0353\3\2\2\2\u0085\u035f\3\2\2\2\u0087"+
|
||||
"\u0366\3\2\2\2\u0089\u036d\3\2\2\2\u008b\u0376\3\2\2\2\u008d\u037b\3\2"+
|
||||
"\2\2\u008f\u0388\3\2\2\2\u0091\u038e\3\2\2\2\u0093\u0393\3\2\2\2\u0095"+
|
||||
"\u0397\3\2\2\2\u0097\u039f\3\2\2\2\u0099\u03a6\3\2\2\2\u009b\u03af\3\2"+
|
||||
"\2\2\u009d\u03b5\3\2\2\2\u009f\u03be\3\2\2\2\u00a1\u03c4\3\2\2\2\u00a3"+
|
||||
"\u03cc\3\2\2\2\u00a5\u03d1\3\2\2\2\u00a7\u03da\3\2\2\2\u00a9\u03e2\3\2"+
|
||||
"\2\2\u00ab\u03e8\3\2\2\2\u00ad\u03ea\3\2\2\2\u00af\u03ec\3\2\2\2\u00b1"+
|
||||
"\u03ee\3\2\2\2\u00b3\u03f0\3\2\2\2\u00b5\u03f2\3\2\2\2\u00b7\u03f4\3\2"+
|
||||
"\2\2\u00b9\u03f6\3\2\2\2\u00bb\u03f8\3\2\2\2\u00bd\u03fa\3\2\2\2\u00bf"+
|
||||
"\u03fc\3\2\2\2\u00c1\u03fe\3\2\2\2\u00c3\u0400\3\2\2\2\u00c5\u0402\3\2"+
|
||||
"\2\2\u00c7\u0404\3\2\2\2\u00c9\u040a\3\2\2\2\u00cb\u040c\3\2\2\2\u00cd"+
|
||||
"\u040e\3\2\2\2\u00cf\u0410\3\2\2\2\u00d1\u0412\3\2\2\2\u00d3\u0415\3\2"+
|
||||
"\2\2\u00d5\u0418\3\2\2\2\u00d7\u041b\3\2\2\2\u00d9\u041e\3\2\2\2\u00db"+
|
||||
"\u0421\3\2\2\2\u00dd\u0424\3\2\2\2\u00df\u0427\3\2\2\2\u00e1\u042a\3\2"+
|
||||
"\2\2\u00e3\u042e\3\2\2\2\u00e5\u0432\3\2\2\2\u00e7\u0435\3\2\2\2\u00e9"+
|
||||
"\u0438\3\2\2\2\u00eb\u043b\3\2\2\2\u00ed\u0443\3\2\2\2\u00ef\u0449\3\2"+
|
||||
"\2\2\u00f1\u044b\3\2\2\2\u00f3\u044e\3\2\2\2\u00f5\u0451\3\2\2\2\u00f7"+
|
||||
"\u0453\3\2\2\2\u00f9\u0457\3\2\2\2\u00fb\u045a\3\2\2\2\u00fd\u045c\3\2"+
|
||||
"\2\2\u00ff\u045e\3\2\2\2\u0101\u0461\3\2\2\2\u0103\u0463\3\2\2\2\u0105"+
|
||||
"\u0465\3\2\2\2\u0107\u0468\3\2\2\2\u0109\u046c\3\2\2\2\u010b\u047b\3\2"+
|
||||
"\2\2\u010d\u047d\3\2\2\2\u010f\u0487\3\2\2\2\u0111\u0489\3\2\2\2\u0113"+
|
||||
"\u048b\3\2\2\2\u0115\u048d\3\2\2\2\u0117\u0497\3\2\2\2\u0119\u04a5\3\2"+
|
||||
"\2\2\u011b\u04b5\3\2\2\2\u011d\u04c1\3\2\2\2\u011f\u04c3\3\2\2\2\u0121"+
|
||||
"\u04c5\3\2\2\2\u0123\u04c7\3\2\2\2\u0125\u04d9\3\2\2\2\u0127\u04db\3\2"+
|
||||
"\2\2\u0129\u04dd\3\2\2\2\u012b\u04e3\3\2\2\2\u012d\u04e8\3\2\2\2\u012f"+
|
||||
"\u04ed\3\2\2\2\u0131\u050d\3\2\2\2\u0133\u051a\3\2\2\2\u0135\u051c\3\2"+
|
||||
"\2\2\u0137\u052c\3\2\2\2\u0139\u0538\3\2\2\2\u013b\u053a\3\2\2\2\u013d"+
|
||||
"\u053c\3\2\2\2\u013f\u0546\3\2\2\2\u0141\u054b\3\2\2\2\u0143\u0550\3\2"+
|
||||
"\2\2\u0145\u0552\3\2\2\2\u0147\u0575\3\2\2\2\u0149\u0581\3\2\2\2\u014b"+
|
||||
"\u0583\3\2\2\2\u014d\u0586\3\2\2\2\u014f\u0589\3\2\2\2\u0151\u058c\3\2"+
|
||||
"\2\2\u0153\u0597\3\2\2\2\u0155\u059b\3\2\2\2\u0157\u05a9\3\2\2\2\u0159"+
|
||||
"\u015b\5\u0115\u008b\2\u015a\u015c\5\u0125\u0093\2\u015b\u015a\3\2\2\2"+
|
||||
"\u015b\u015c\3\2\2\2\u015c\u016a\3\2\2\2\u015d\u015f\5\u0117\u008c\2\u015e"+
|
||||
"\u0160\5\u0125\u0093\2\u015f\u015e\3\2\2\2\u015f\u0160\3\2\2\2\u0160\u016a"+
|
||||
"\3\2\2\2\u0161\u0163\5\u0119\u008d\2\u0162\u0164\5\u0125\u0093\2\u0163"+
|
||||
"\u0162\3\2\2\2\u0163\u0164\3\2\2\2\u0164\u016a\3\2\2\2\u0165\u0167\5\u011b"+
|
||||
"\u008e\2\u0166\u0168\5\u0125\u0093\2\u0167\u0166\3\2\2\2\u0167\u0168\3"+
|
||||
"\2\2\2\u0168\u016a\3\2\2\2\u0169\u0159\3\2\2\2\u0169\u015d\3\2\2\2\u0169"+
|
||||
"\u0161\3\2\2\2\u0169\u0165\3\2\2\2\u016a\4\3\2\2\2\u016b\u016d\t\2\2\2"+
|
||||
"\u016c\u016b\3\2\2\2\u016c\u016d\3\2\2\2\u016d\u016e\3\2\2\2\u016e\u0170"+
|
||||
"\7)\2\2\u016f\u0171\5\u012d\u0097\2\u0170\u016f\3\2\2\2\u0171\u0172\3"+
|
||||
"\2\2\2\u0172\u0170\3\2\2\2\u0172\u0173\3\2\2\2\u0173\u0174\3\2\2\2\u0174"+
|
||||
"\u0175\7)\2\2\u0175\6\3\2\2\2\u0176\u0178\5\u0137\u009c\2\u0177\u0179"+
|
||||
"\5\u0139\u009d\2\u0178\u0177\3\2\2\2\u0178\u0179\3\2\2\2\u0179\u017b\3"+
|
||||
"\2\2\2\u017a\u017c\5\u013f\u00a0\2\u017b\u017a\3\2\2\2\u017b\u017c\3\2"+
|
||||
"\2\2\u017c\u0183\3\2\2\2\u017d\u017e\5\u013d\u009f\2\u017e\u0180\5\u0139"+
|
||||
"\u009d\2\u017f\u0181\5\u013f\u00a0\2\u0180\u017f\3\2\2\2\u0180\u0181\3"+
|
||||
"\2\2\2\u0181\u0183\3\2\2\2\u0182\u0176\3\2\2\2\u0182\u017d\3\2\2\2\u0183"+
|
||||
"\b\3\2\2\2\u0184\u0186\5\u0141\u00a1\2\u0185\u0184\3\2\2\2\u0185\u0186"+
|
||||
"\3\2\2\2\u0186\u0187\3\2\2\2\u0187\u018b\7$\2\2\u0188\u018a\5\u0143\u00a2"+
|
||||
"\2\u0189\u0188\3\2\2\2\u018a\u018d\3\2\2\2\u018b\u0189\3\2\2\2\u018b\u018c"+
|
||||
"\3\2\2\2\u018c\u018e\3\2\2\2\u018d\u018b\3\2\2\2\u018e\u0195\7$\2\2\u018f"+
|
||||
"\u0191\5\u0141\u00a1\2\u0190\u018f\3\2\2\2\u0190\u0191\3\2\2\2\u0191\u0192"+
|
||||
"\3\2\2\2\u0192\u0193\7T\2\2\u0193\u0195\5\u0145\u00a3\2\u0194\u0185\3"+
|
||||
"\2\2\2\u0194\u0190\3\2\2\2\u0195\n\3\2\2\2\u0196\u0199\5K&\2\u0197\u0199"+
|
||||
"\5\u0091I\2\u0198\u0196\3\2\2\2\u0198\u0197\3\2\2\2\u0199\f\3\2\2\2\u019a"+
|
||||
"\u019b\5g\64\2\u019b\16\3\2\2\2\u019c\u01a1\5\u0147\u00a4\2\u019d\u01a1"+
|
||||
"\5\u0149\u00a5\2\u019e\u01a1\5\u014b\u00a6\2\u019f\u01a1\5\u014d\u00a7"+
|
||||
"\2\u01a0\u019c\3\2\2\2\u01a0\u019d\3\2\2\2\u01a0\u019e\3\2\2\2\u01a0\u019f"+
|
||||
"\3\2\2\2\u01a1\20\3\2\2\2\u01a2\u01ae\7%\2\2\u01a3\u01a5\n\3\2\2\u01a4"+
|
||||
"\u01a3\3\2\2\2\u01a5\u01a8\3\2\2\2\u01a6\u01a7\3\2\2\2\u01a6\u01a4\3\2"+
|
||||
"\2\2\u01a7\u01a9\3\2\2\2\u01a8\u01a6\3\2\2\2\u01a9\u01ab\7^\2\2\u01aa"+
|
||||
"\u01ac\7\17\2\2\u01ab\u01aa\3\2\2\2\u01ab\u01ac\3\2\2\2\u01ac\u01ad\3"+
|
||||
"\2\2\2\u01ad\u01af\7\f\2\2\u01ae\u01a6\3\2\2\2\u01af\u01b0\3\2\2\2\u01b0"+
|
||||
"\u01ae\3\2\2\2\u01b0\u01b1\3\2\2\2\u01b1\u01b3\3\2\2\2\u01b2\u01b4\n\3"+
|
||||
"\2\2\u01b3\u01b2\3\2\2\2\u01b4\u01b5\3\2\2\2\u01b5\u01b3\3\2\2\2\u01b5"+
|
||||
"\u01b6\3\2\2\2\u01b6\u01b7\3\2\2\2\u01b7\u01b8\b\t\2\2\u01b8\22\3\2\2"+
|
||||
"\2\u01b9\u01bd\7%\2\2\u01ba\u01bc\n\3\2\2\u01bb\u01ba\3\2\2\2\u01bc\u01bf"+
|
||||
"\3\2\2\2\u01bd\u01bb\3\2\2\2\u01bd\u01be\3\2\2\2\u01be\u01c0\3\2\2\2\u01bf"+
|
||||
"\u01bd\3\2\2\2\u01c0\u01c1\b\n\2\2\u01c1\24\3\2\2\2\u01c2\u01c3\7c\2\2"+
|
||||
"\u01c3\u01c4\7n\2\2\u01c4\u01c5\7k\2\2\u01c5\u01c6\7i\2\2\u01c6\u01c7"+
|
||||
"\7p\2\2\u01c7\u01c8\7c\2\2\u01c8\u01c9\7u\2\2\u01c9\26\3\2\2\2\u01ca\u01cb"+
|
||||
"\7c\2\2\u01cb\u01cc\7n\2\2\u01cc\u01cd\7k\2\2\u01cd\u01ce\7i\2\2\u01ce"+
|
||||
"\u01cf\7p\2\2\u01cf\u01d0\7q\2\2\u01d0\u01d1\7h\2\2\u01d1\30\3\2\2\2\u01d2"+
|
||||
"\u01d3\7c\2\2\u01d3\u01d4\7u\2\2\u01d4\u01d5\7o\2\2\u01d5\32\3\2\2\2\u01d6"+
|
||||
"\u01d7\7c\2\2\u01d7\u01d8\7w\2\2\u01d8\u01d9\7v\2\2\u01d9\u01da\7q\2\2"+
|
||||
"\u01da\34\3\2\2\2\u01db\u01dc\7d\2\2\u01dc\u01dd\7q\2\2\u01dd\u01de\7"+
|
||||
"q\2\2\u01de\u01df\7n\2\2\u01df\36\3\2\2\2\u01e0\u01e1\7d\2\2\u01e1\u01e2"+
|
||||
"\7t\2\2\u01e2\u01e3\7g\2\2\u01e3\u01e4\7c\2\2\u01e4\u01e5\7m\2\2\u01e5"+
|
||||
" \3\2\2\2\u01e6\u01e7\7e\2\2\u01e7\u01e8\7c\2\2\u01e8\u01e9\7u\2\2\u01e9"+
|
||||
"\u01ea\7g\2\2\u01ea\"\3\2\2\2\u01eb\u01ec\7e\2\2\u01ec\u01ed\7c\2\2\u01ed"+
|
||||
"\u01ee\7v\2\2\u01ee\u01ef\7e\2\2\u01ef\u01f0\7j\2\2\u01f0$\3\2\2\2\u01f1"+
|
||||
"\u01f2\7e\2\2\u01f2\u01f3\7j\2\2\u01f3\u01f4\7c\2\2\u01f4\u01f5\7t\2\2"+
|
||||
"\u01f5&\3\2\2\2\u01f6\u01f7\7e\2\2\u01f7\u01f8\7j\2\2\u01f8\u01f9\7c\2"+
|
||||
"\2\u01f9\u01fa\7t\2\2\u01fa\u01fb\7\63\2\2\u01fb\u01fc\78\2\2\u01fc\u01fd"+
|
||||
"\7a\2\2\u01fd\u01fe\7v\2\2\u01fe(\3\2\2\2\u01ff\u0200\7e\2\2\u0200\u0201"+
|
||||
"\7j\2\2\u0201\u0202\7c\2\2\u0202\u0203\7t\2\2\u0203\u0204\7\65\2\2\u0204"+
|
||||
"\u0205\7\64\2\2\u0205\u0206\7a\2\2\u0206\u0207\7v\2\2\u0207*\3\2\2\2\u0208"+
|
||||
"\u0209\7e\2\2\u0209\u020a\7n\2\2\u020a\u020b\7c\2\2\u020b\u020c\7u\2\2"+
|
||||
"\u020c\u020d\7u\2\2\u020d,\3\2\2\2\u020e\u020f\7e\2\2\u020f\u0210\7q\2"+
|
||||
"\2\u0210\u0211\7p\2\2\u0211\u0212\7u\2\2\u0212\u0213\7v\2\2\u0213.\3\2"+
|
||||
"\2\2\u0214\u0215\7e\2\2\u0215\u0216\7q\2\2\u0216\u0217\7p\2\2\u0217\u0218"+
|
||||
"\7u\2\2\u0218\u0219\7v\2\2\u0219\u021a\7g\2\2\u021a\u021b\7z\2\2\u021b"+
|
||||
"\u021c\7r\2\2\u021c\u021d\7t\2\2\u021d\60\3\2\2\2\u021e\u021f\7e\2\2\u021f"+
|
||||
"\u0220\7q\2\2\u0220\u0221\7p\2\2\u0221\u0222\7u\2\2\u0222\u0223\7v\2\2"+
|
||||
"\u0223\u0224\7a\2\2\u0224\u0225\7e\2\2\u0225\u0226\7c\2\2\u0226\u0227"+
|
||||
"\7u\2\2\u0227\u0228\7v\2\2\u0228\62\3\2\2\2\u0229\u022a\7e\2\2\u022a\u022b"+
|
||||
"\7q\2\2\u022b\u022c\7p\2\2\u022c\u022d\7v\2\2\u022d\u022e\7k\2\2\u022e"+
|
||||
"\u022f\7p\2\2\u022f\u0230\7w\2\2\u0230\u0231\7g\2\2\u0231\64\3\2\2\2\u0232"+
|
||||
"\u0233\7f\2\2\u0233\u0234\7g\2\2\u0234\u0235\7e\2\2\u0235\u0236\7n\2\2"+
|
||||
"\u0236\u0237\7v\2\2\u0237\u0238\7{\2\2\u0238\u0239\7r\2\2\u0239\u023a"+
|
||||
"\7g\2\2\u023a\66\3\2\2\2\u023b\u023c\7f\2\2\u023c\u023d\7g\2\2\u023d\u023e"+
|
||||
"\7h\2\2\u023e\u023f\7c\2\2\u023f\u0240\7w\2\2\u0240\u0241\7n\2\2\u0241"+
|
||||
"\u0242\7v\2\2\u02428\3\2\2\2\u0243\u0244\7f\2\2\u0244\u0245\7g\2\2\u0245"+
|
||||
"\u0246\7n\2\2\u0246\u0247\7g\2\2\u0247\u0248\7v\2\2\u0248\u0249\7g\2\2"+
|
||||
"\u0249:\3\2\2\2\u024a\u024b\7f\2\2\u024b\u024c\7q\2\2\u024c<\3\2\2\2\u024d"+
|
||||
"\u024e\7f\2\2\u024e\u024f\7q\2\2\u024f\u0250\7w\2\2\u0250\u0251\7d\2\2"+
|
||||
"\u0251\u0252\7n\2\2\u0252\u0253\7g\2\2\u0253>\3\2\2\2\u0254\u0255\7f\2"+
|
||||
"\2\u0255\u0256\7{\2\2\u0256\u0257\7p\2\2\u0257\u0258\7c\2\2\u0258\u0259"+
|
||||
"\7o\2\2\u0259\u025a\7k\2\2\u025a\u025b\7e\2\2\u025b\u025c\7a\2\2\u025c"+
|
||||
"\u025d\7e\2\2\u025d\u025e\7c\2\2\u025e\u025f\7u\2\2\u025f\u0260\7v\2\2"+
|
||||
"\u0260@\3\2\2\2\u0261\u0262\7g\2\2\u0262\u0263\7n\2\2\u0263\u0264\7u\2"+
|
||||
"\2\u0264\u0265\7g\2\2\u0265B\3\2\2\2\u0266\u0267\7g\2\2\u0267\u0268\7"+
|
||||
"p\2\2\u0268\u0269\7w\2\2\u0269\u026a\7o\2\2\u026aD\3\2\2\2\u026b\u026c"+
|
||||
"\7g\2\2\u026c\u026d\7z\2\2\u026d\u026e\7r\2\2\u026e\u026f\7n\2\2\u026f"+
|
||||
"\u0270\7k\2\2\u0270\u0271\7e\2\2\u0271\u0272\7k\2\2\u0272\u0273\7v\2\2"+
|
||||
"\u0273F\3\2\2\2\u0274\u0275\7g\2\2\u0275\u0276\7z\2\2\u0276\u0277\7r\2"+
|
||||
"\2\u0277\u0278\7q\2\2\u0278\u0279\7t\2\2\u0279\u027a\7v\2\2\u027aH\3\2"+
|
||||
"\2\2\u027b\u027c\7g\2\2\u027c\u027d\7z\2\2\u027d\u027e\7v\2\2\u027e\u027f"+
|
||||
"\7g\2\2\u027f\u0280\7t\2\2\u0280\u0281\7p\2\2\u0281J\3\2\2\2\u0282\u0283"+
|
||||
"\7h\2\2\u0283\u0284\7c\2\2\u0284\u0285\7n\2\2\u0285\u0286\7u\2\2\u0286"+
|
||||
"\u0287\7g\2\2\u0287L\3\2\2\2\u0288\u0289\7h\2\2\u0289\u028a\7k\2\2\u028a"+
|
||||
"\u028b\7p\2\2\u028b\u028c\7c\2\2\u028c\u028d\7n\2\2\u028dN\3\2\2\2\u028e"+
|
||||
"\u028f\7h\2\2\u028f\u0290\7n\2\2\u0290\u0291\7q\2\2\u0291\u0292\7c\2\2"+
|
||||
"\u0292\u0293\7v\2\2\u0293P\3\2\2\2\u0294\u0295\7h\2\2\u0295\u0296\7q\2"+
|
||||
"\2\u0296\u0297\7t\2\2\u0297R\3\2\2\2\u0298\u0299\7h\2\2\u0299\u029a\7"+
|
||||
"t\2\2\u029a\u029b\7k\2\2\u029b\u029c\7g\2\2\u029c\u029d\7p\2\2\u029d\u029e"+
|
||||
"\7f\2\2\u029eT\3\2\2\2\u029f\u02a0\7i\2\2\u02a0\u02a1\7q\2\2\u02a1\u02a2"+
|
||||
"\7v\2\2\u02a2\u02a3\7q\2\2\u02a3V\3\2\2\2\u02a4\u02a5\7k\2\2\u02a5\u02a6"+
|
||||
"\7h\2\2\u02a6X\3\2\2\2\u02a7\u02a8\7k\2\2\u02a8\u02a9\7p\2\2\u02a9\u02aa"+
|
||||
"\7n\2\2\u02aa\u02ab\7k\2\2\u02ab\u02ac\7p\2\2\u02ac\u02ad\7g\2\2\u02ad"+
|
||||
"Z\3\2\2\2\u02ae\u02af\7k\2\2\u02af\u02b0\7p\2\2\u02b0\u02b1\7v\2\2\u02b1"+
|
||||
"\\\3\2\2\2\u02b2\u02b3\7n\2\2\u02b3\u02b4\7q\2\2\u02b4\u02b5\7p\2\2\u02b5"+
|
||||
"\u02b6\7i\2\2\u02b6^\3\2\2\2\u02b7\u02b8\7o\2\2\u02b8\u02b9\7w\2\2\u02b9"+
|
||||
"\u02ba\7v\2\2\u02ba\u02bb\7c\2\2\u02bb\u02bc\7d\2\2\u02bc\u02bd\7n\2\2"+
|
||||
"\u02bd\u02be\7g\2\2\u02be`\3\2\2\2\u02bf\u02c0\7p\2\2\u02c0\u02c1\7c\2"+
|
||||
"\2\u02c1\u02c2\7o\2\2\u02c2\u02c3\7g\2\2\u02c3\u02c4\7u\2\2\u02c4\u02c5"+
|
||||
"\7r\2\2\u02c5\u02c6\7c\2\2\u02c6\u02c7\7e\2\2\u02c7\u02c8\7g\2\2\u02c8"+
|
||||
"b\3\2\2\2\u02c9\u02ca\7p\2\2\u02ca\u02cb\7g\2\2\u02cb\u02cc\7y\2\2\u02cc"+
|
||||
"d\3\2\2\2\u02cd\u02ce\7p\2\2\u02ce\u02cf\7q\2\2\u02cf\u02d0\7g\2\2\u02d0"+
|
||||
"\u02d1\7z\2\2\u02d1\u02d2\7e\2\2\u02d2\u02d3\7g\2\2\u02d3\u02d4\7r\2\2"+
|
||||
"\u02d4\u02d5\7v\2\2\u02d5f\3\2\2\2\u02d6\u02d7\7p\2\2\u02d7\u02d8\7w\2"+
|
||||
"\2\u02d8\u02d9\7n\2\2\u02d9\u02da\7n\2\2\u02da\u02db\7r\2\2\u02db\u02dc"+
|
||||
"\7v\2\2\u02dc\u02dd\7t\2\2\u02ddh\3\2\2\2\u02de\u02df\7q\2\2\u02df\u02e0"+
|
||||
"\7r\2\2\u02e0\u02e1\7g\2\2\u02e1\u02e2\7t\2\2\u02e2\u02e3\7c\2\2\u02e3"+
|
||||
"\u02e4\7v\2\2\u02e4\u02e5\7q\2\2\u02e5\u02e6\7t\2\2\u02e6j\3\2\2\2\u02e7"+
|
||||
"\u02e8\7q\2\2\u02e8\u02e9\7x\2\2\u02e9\u02ea\7g\2\2\u02ea\u02eb\7t\2\2"+
|
||||
"\u02eb\u02ec\7t\2\2\u02ec\u02ed\7k\2\2\u02ed\u02ee\7f\2\2\u02ee\u02ef"+
|
||||
"\7g\2\2\u02efl\3\2\2\2\u02f0\u02f1\7r\2\2\u02f1\u02f2\7t\2\2\u02f2\u02f3"+
|
||||
"\7k\2\2\u02f3\u02f4\7x\2\2\u02f4\u02f5\7c\2\2\u02f5\u02f6\7v\2\2\u02f6"+
|
||||
"\u02f7\7g\2\2\u02f7n\3\2\2\2\u02f8\u02f9\7r\2\2\u02f9\u02fa\7t\2\2\u02fa"+
|
||||
"\u02fb\7q\2\2\u02fb\u02fc\7v\2\2\u02fc\u02fd\7g\2\2\u02fd\u02fe\7e\2\2"+
|
||||
"\u02fe\u02ff\7v\2\2\u02ff\u0300\7g\2\2\u0300\u0301\7f\2\2\u0301p\3\2\2"+
|
||||
"\2\u0302\u0303\7r\2\2\u0303\u0304\7w\2\2\u0304\u0305\7d\2\2\u0305\u0306"+
|
||||
"\7n\2\2\u0306\u0307\7k\2\2\u0307\u0308\7e\2\2\u0308r\3\2\2\2\u0309\u030a"+
|
||||
"\7t\2\2\u030a\u030b\7g\2\2\u030b\u030c\7i\2\2\u030c\u030d\7k\2\2\u030d"+
|
||||
"\u030e\7u\2\2\u030e\u030f\7v\2\2\u030f\u0310\7g\2\2\u0310\u0311\7t\2\2"+
|
||||
"\u0311t\3\2\2\2\u0312\u0313\7t\2\2\u0313\u0314\7g\2\2\u0314\u0315\7k\2"+
|
||||
"\2\u0315\u0316\7p\2\2\u0316\u0317\7v\2\2\u0317\u0318\7g\2\2\u0318\u0319"+
|
||||
"\7t\2\2\u0319\u031a\7r\2\2\u031a\u031b\7t\2\2\u031b\u031c\7g\2\2\u031c"+
|
||||
"\u031d\7v\2\2\u031d\u031e\7a\2\2\u031e\u031f\7e\2\2\u031f\u0320\7c\2\2"+
|
||||
"\u0320\u0321\7u\2\2\u0321\u0322\7v\2\2\u0322v\3\2\2\2\u0323\u0324\7t\2"+
|
||||
"\2\u0324\u0325\7g\2\2\u0325\u0326\7v\2\2\u0326\u0327\7w\2\2\u0327\u0328"+
|
||||
"\7t\2\2\u0328\u0329\7p\2\2\u0329x\3\2\2\2\u032a\u032b\7u\2\2\u032b\u032c"+
|
||||
"\7j\2\2\u032c\u032d\7q\2\2\u032d\u032e\7t\2\2\u032e\u032f\7v\2\2\u032f"+
|
||||
"z\3\2\2\2\u0330\u0331\7u\2\2\u0331\u0332\7k\2\2\u0332\u0333\7i\2\2\u0333"+
|
||||
"\u0334\7p\2\2\u0334\u0335\7g\2\2\u0335\u0336\7f\2\2\u0336|\3\2\2\2\u0337"+
|
||||
"\u0338\7u\2\2\u0338\u0339\7k\2\2\u0339\u033a\7|\2\2\u033a\u033b\7g\2\2"+
|
||||
"\u033b\u033c\7q\2\2\u033c\u033d\7h\2\2\u033d~\3\2\2\2\u033e\u033f\7u\2"+
|
||||
"\2\u033f\u0340\7v\2\2\u0340\u0341\7c\2\2\u0341\u0342\7v\2\2\u0342\u0343"+
|
||||
"\7k\2\2\u0343\u0344\7e\2\2\u0344\u0080\3\2\2\2\u0345\u0346\7u\2\2\u0346"+
|
||||
"\u0347\7v\2\2\u0347\u0348\7c\2\2\u0348\u0349\7v\2\2\u0349\u034a\7k\2\2"+
|
||||
"\u034a\u034b\7e\2\2\u034b\u034c\7a\2\2\u034c\u034d\7c\2\2\u034d\u034e"+
|
||||
"\7u\2\2\u034e\u034f\7u\2\2\u034f\u0350\7g\2\2\u0350\u0351\7t\2\2\u0351"+
|
||||
"\u0352\7v\2\2\u0352\u0082\3\2\2\2\u0353\u0354\7u\2\2\u0354\u0355\7v\2"+
|
||||
"\2\u0355\u0356\7c\2\2\u0356\u0357\7v\2\2\u0357\u0358\7k\2\2\u0358\u0359"+
|
||||
"\7e\2\2\u0359\u035a\7a\2\2\u035a\u035b\7e\2\2\u035b\u035c\7c\2\2\u035c"+
|
||||
"\u035d\7u\2\2\u035d\u035e\7v\2\2\u035e\u0084\3\2\2\2\u035f\u0360\7u\2"+
|
||||
"\2\u0360\u0361\7v\2\2\u0361\u0362\7t\2\2\u0362\u0363\7w\2\2\u0363\u0364"+
|
||||
"\7e\2\2\u0364\u0365\7v\2\2\u0365\u0086\3\2\2\2\u0366\u0367\7u\2\2\u0367"+
|
||||
"\u0368\7y\2\2\u0368\u0369\7k\2\2\u0369\u036a\7v\2\2\u036a\u036b\7e\2\2"+
|
||||
"\u036b\u036c\7j\2\2\u036c\u0088\3\2\2\2\u036d\u036e\7v\2\2\u036e\u036f"+
|
||||
"\7g\2\2\u036f\u0370\7o\2\2\u0370\u0371\7r\2\2\u0371\u0372\7n\2\2\u0372"+
|
||||
"\u0373\7c\2\2\u0373\u0374\7v\2\2\u0374\u0375\7g\2\2\u0375\u008a\3\2\2"+
|
||||
"\2\u0376\u0377\7v\2\2\u0377\u0378\7j\2\2\u0378\u0379\7k\2\2\u0379\u037a"+
|
||||
"\7u\2\2\u037a\u008c\3\2\2\2\u037b\u037c\7v\2\2\u037c\u037d\7j\2\2\u037d"+
|
||||
"\u037e\7t\2\2\u037e\u037f\7g\2\2\u037f\u0380\7c\2\2\u0380\u0381\7f\2\2"+
|
||||
"\u0381\u0382\7a\2\2\u0382\u0383\7n\2\2\u0383\u0384\7q\2\2\u0384\u0385"+
|
||||
"\7e\2\2\u0385\u0386\7c\2\2\u0386\u0387\7n\2\2\u0387\u008e\3\2\2\2\u0388"+
|
||||
"\u0389\7v\2\2\u0389\u038a\7j\2\2\u038a\u038b\7t\2\2\u038b\u038c\7q\2\2"+
|
||||
"\u038c\u038d\7y\2\2\u038d\u0090\3\2\2\2\u038e\u038f\7v\2\2\u038f\u0390"+
|
||||
"\7t\2\2\u0390\u0391\7w\2\2\u0391\u0392\7g\2\2\u0392\u0092\3\2\2\2\u0393"+
|
||||
"\u0394\7v\2\2\u0394\u0395\7t\2\2\u0395\u0396\7{\2\2\u0396\u0094\3\2\2"+
|
||||
"\2\u0397\u0398\7v\2\2\u0398\u0399\7{\2\2\u0399\u039a\7r\2\2\u039a\u039b"+
|
||||
"\7g\2\2\u039b\u039c\7f\2\2\u039c\u039d\7g\2\2\u039d\u039e\7h\2\2\u039e"+
|
||||
"\u0096\3\2\2\2\u039f\u03a0\7v\2\2\u03a0\u03a1\7{\2\2\u03a1\u03a2\7r\2"+
|
||||
"\2\u03a2\u03a3\7g\2\2\u03a3\u03a4\7k\2\2\u03a4\u03a5\7f\2\2\u03a5\u0098"+
|
||||
"\3\2\2\2\u03a6\u03a7\7v\2\2\u03a7\u03a8\7{\2\2\u03a8\u03a9\7r\2\2\u03a9"+
|
||||
"\u03aa\7g\2\2\u03aa\u03ab\7p\2\2\u03ab\u03ac\7c\2\2\u03ac\u03ad\7o\2\2"+
|
||||
"\u03ad\u03ae\7g\2\2\u03ae\u009a\3\2\2\2\u03af\u03b0\7w\2\2\u03b0\u03b1"+
|
||||
"\7p\2\2\u03b1\u03b2\7k\2\2\u03b2\u03b3\7q\2\2\u03b3\u03b4\7p\2\2\u03b4"+
|
||||
"\u009c\3\2\2\2\u03b5\u03b6\7w\2\2\u03b6\u03b7\7p\2\2\u03b7\u03b8\7u\2"+
|
||||
"\2\u03b8\u03b9\7k\2\2\u03b9\u03ba\7i\2\2\u03ba\u03bb\7p\2\2\u03bb\u03bc"+
|
||||
"\7g\2\2\u03bc\u03bd\7f\2\2\u03bd\u009e\3\2\2\2\u03be\u03bf\7w\2\2\u03bf"+
|
||||
"\u03c0\7u\2\2\u03c0\u03c1\7k\2\2\u03c1\u03c2\7p\2\2\u03c2\u03c3\7i\2\2"+
|
||||
"\u03c3\u00a0\3\2\2\2\u03c4\u03c5\7x\2\2\u03c5\u03c6\7k\2\2\u03c6\u03c7"+
|
||||
"\7t\2\2\u03c7\u03c8\7v\2\2\u03c8\u03c9\7w\2\2\u03c9\u03ca\7c\2\2\u03ca"+
|
||||
"\u03cb\7n\2\2\u03cb\u00a2\3\2\2\2\u03cc\u03cd\7x\2\2\u03cd\u03ce\7q\2"+
|
||||
"\2\u03ce\u03cf\7k\2\2\u03cf\u03d0\7f\2\2\u03d0\u00a4\3\2\2\2\u03d1\u03d2"+
|
||||
"\7x\2\2\u03d2\u03d3\7q\2\2\u03d3\u03d4\7n\2\2\u03d4\u03d5\7c\2\2\u03d5"+
|
||||
"\u03d6\7v\2\2\u03d6\u03d7\7k\2\2\u03d7\u03d8\7n\2\2\u03d8\u03d9\7g\2\2"+
|
||||
"\u03d9\u00a6\3\2\2\2\u03da\u03db\7y\2\2\u03db\u03dc\7e\2\2\u03dc\u03dd"+
|
||||
"\7j\2\2\u03dd\u03de\7c\2\2\u03de\u03df\7t\2\2\u03df\u03e0\7a\2\2\u03e0"+
|
||||
"\u03e1\7v\2\2\u03e1\u00a8\3\2\2\2\u03e2\u03e3\7y\2\2\u03e3\u03e4\7j\2"+
|
||||
"\2\u03e4\u03e5\7k\2\2\u03e5\u03e6\7n\2\2\u03e6\u03e7\7g\2\2\u03e7\u00aa"+
|
||||
"\3\2\2\2\u03e8\u03e9\7*\2\2\u03e9\u00ac\3\2\2\2\u03ea\u03eb\7+\2\2\u03eb"+
|
||||
"\u00ae\3\2\2\2\u03ec\u03ed\7]\2\2\u03ed\u00b0\3\2\2\2\u03ee\u03ef\7_\2"+
|
||||
"\2\u03ef\u00b2\3\2\2\2\u03f0\u03f1\7}\2\2\u03f1\u00b4\3\2\2\2\u03f2\u03f3"+
|
||||
"\7\177\2\2\u03f3\u00b6\3\2\2\2\u03f4\u03f5\7-\2\2\u03f5\u00b8\3\2\2\2"+
|
||||
"\u03f6\u03f7\7/\2\2\u03f7\u00ba\3\2\2\2\u03f8\u03f9\7,\2\2\u03f9\u00bc"+
|
||||
"\3\2\2\2\u03fa\u03fb\7\61\2\2\u03fb\u00be\3\2\2\2\u03fc\u03fd\7\'\2\2"+
|
||||
"\u03fd\u00c0\3\2\2\2\u03fe\u03ff\7`\2\2\u03ff\u00c2\3\2\2\2\u0400\u0401"+
|
||||
"\7(\2\2\u0401\u00c4\3\2\2\2\u0402\u0403\7~\2\2\u0403\u00c6\3\2\2\2\u0404"+
|
||||
"\u0405\7\u0080\2\2\u0405\u00c8\3\2\2\2\u0406\u040b\7#\2\2\u0407\u0408"+
|
||||
"\7p\2\2\u0408\u0409\7q\2\2\u0409\u040b\7v\2\2\u040a\u0406\3\2\2\2\u040a"+
|
||||
"\u0407\3\2\2\2\u040b\u00ca\3\2\2\2\u040c\u040d\7?\2\2\u040d\u00cc\3\2"+
|
||||
"\2\2\u040e\u040f\7>\2\2\u040f\u00ce\3\2\2\2\u0410\u0411\7@\2\2\u0411\u00d0"+
|
||||
"\3\2\2\2\u0412\u0413\7-\2\2\u0413\u0414\7?\2\2\u0414\u00d2\3\2\2\2\u0415"+
|
||||
"\u0416\7/\2\2\u0416\u0417\7?\2\2\u0417\u00d4\3\2\2\2\u0418\u0419\7,\2"+
|
||||
"\2\u0419\u041a\7?\2\2\u041a\u00d6\3\2\2\2\u041b\u041c\7\61\2\2\u041c\u041d"+
|
||||
"\7?\2\2\u041d\u00d8\3\2\2\2\u041e\u041f\7\'\2\2\u041f\u0420\7?\2\2\u0420"+
|
||||
"\u00da\3\2\2\2\u0421\u0422\7`\2\2\u0422\u0423\7?\2\2\u0423\u00dc\3\2\2"+
|
||||
"\2\u0424\u0425\7(\2\2\u0425\u0426\7?\2\2\u0426\u00de\3\2\2\2\u0427\u0428"+
|
||||
"\7~\2\2\u0428\u0429\7?\2\2\u0429\u00e0\3\2\2\2\u042a\u042b\7>\2\2\u042b"+
|
||||
"\u042c\7>\2\2\u042c\u042d\7?\2\2\u042d\u00e2\3\2\2\2\u042e\u042f\7@\2"+
|
||||
"\2\u042f\u0430\7@\2\2\u0430\u0431\7?\2\2\u0431\u00e4\3\2\2\2\u0432\u0433"+
|
||||
"\7?\2\2\u0433\u0434\7?\2\2\u0434\u00e6\3\2\2\2\u0435\u0436\7#\2\2\u0436"+
|
||||
"\u0437\7?\2\2\u0437\u00e8\3\2\2\2\u0438\u0439\7>\2\2\u0439\u043a\7?\2"+
|
||||
"\2\u043a\u00ea\3\2\2\2\u043b\u043c\7@\2\2\u043c\u043d\7?\2\2\u043d\u00ec"+
|
||||
"\3\2\2\2\u043e\u043f\7(\2\2\u043f\u0444\7(\2\2\u0440\u0441\7c\2\2\u0441"+
|
||||
"\u0442\7p\2\2\u0442\u0444\7f\2\2\u0443\u043e\3\2\2\2\u0443\u0440\3\2\2"+
|
||||
"\2\u0444\u00ee\3\2\2\2\u0445\u0446\7~\2\2\u0446\u044a\7~\2\2\u0447\u0448"+
|
||||
"\7q\2\2\u0448\u044a\7t\2\2\u0449\u0445\3\2\2\2\u0449\u0447\3\2\2\2\u044a"+
|
||||
"\u00f0\3\2\2\2\u044b\u044c\7-\2\2\u044c\u044d\7-\2\2\u044d\u00f2\3\2\2"+
|
||||
"\2\u044e\u044f\7/\2\2\u044f\u0450\7/\2\2\u0450\u00f4\3\2\2\2\u0451\u0452"+
|
||||
"\7.\2\2\u0452\u00f6\3\2\2\2\u0453\u0454\7/\2\2\u0454\u0455\7@\2\2\u0455"+
|
||||
"\u0456\7,\2\2\u0456\u00f8\3\2\2\2\u0457\u0458\7/\2\2\u0458\u0459\7@\2"+
|
||||
"\2\u0459\u00fa\3\2\2\2\u045a\u045b\7A\2\2\u045b\u00fc\3\2\2\2\u045c\u045d"+
|
||||
"\7<\2\2\u045d\u00fe\3\2\2\2\u045e\u045f\7<\2\2\u045f\u0460\7<\2\2\u0460"+
|
||||
"\u0100\3\2\2\2\u0461\u0462\7=\2\2\u0462\u0102\3\2\2\2\u0463\u0464\7\60"+
|
||||
"\2\2\u0464\u0104\3\2\2\2\u0465\u0466\7\60\2\2\u0466\u0467\7,\2\2\u0467"+
|
||||
"\u0106\3\2\2\2\u0468\u0469\7\60\2\2\u0469\u046a\7\60\2\2\u046a\u046b\7"+
|
||||
"\60\2\2\u046b\u0108\3\2\2\2\u046c\u046d\5\u0121\u0091\2\u046d\u046e\5"+
|
||||
"\u0121\u0091\2\u046e\u046f\5\u0121\u0091\2\u046f\u0470\5\u0121\u0091\2"+
|
||||
"\u0470\u010a\3\2\2\2\u0471\u0472\7^\2\2\u0472\u0473\7w\2\2\u0473\u0474"+
|
||||
"\3\2\2\2\u0474\u047c\5\u0109\u0085\2\u0475\u0476\7^\2\2\u0476\u0477\7"+
|
||||
"W\2\2\u0477\u0478\3\2\2\2\u0478\u0479\5\u0109\u0085\2\u0479\u047a\5\u0109"+
|
||||
"\u0085\2\u047a\u047c\3\2\2\2\u047b\u0471\3\2\2\2\u047b\u0475\3\2\2\2\u047c"+
|
||||
"\u010c\3\2\2\2\u047d\u0482\5\u010f\u0088\2\u047e\u0481\5\u010f\u0088\2"+
|
||||
"\u047f\u0481\5\u0113\u008a\2\u0480\u047e\3\2\2\2\u0480\u047f\3\2\2\2\u0481"+
|
||||
"\u0484\3\2\2\2\u0482\u0480\3\2\2\2\u0482\u0483\3\2\2\2\u0483\u010e\3\2"+
|
||||
"\2\2\u0484\u0482\3\2\2\2\u0485\u0488\5\u0111\u0089\2\u0486\u0488\5\u010b"+
|
||||
"\u0086\2\u0487\u0485\3\2\2\2\u0487\u0486\3\2\2\2\u0488\u0110\3\2\2\2\u0489"+
|
||||
"\u048a\t\4\2\2\u048a\u0112\3\2\2\2\u048b\u048c\t\5\2\2\u048c\u0114\3\2"+
|
||||
"\2\2\u048d\u0494\5\u011d\u008f\2\u048e\u0490\7)\2\2\u048f\u048e\3\2\2"+
|
||||
"\2\u048f\u0490\3\2\2\2\u0490\u0491\3\2\2\2\u0491\u0493\5\u0113\u008a\2"+
|
||||
"\u0492\u048f\3\2\2\2\u0493\u0496\3\2\2\2\u0494\u0492\3\2\2\2\u0494\u0495"+
|
||||
"\3\2\2\2\u0495\u0116\3\2\2\2\u0496\u0494\3\2\2\2\u0497\u049e\7\62\2\2"+
|
||||
"\u0498\u049a\7)\2\2\u0499\u0498\3\2\2\2\u0499\u049a\3\2\2\2\u049a\u049b"+
|
||||
"\3\2\2\2\u049b\u049d\5\u011f\u0090\2\u049c\u0499\3\2\2\2\u049d\u04a0\3"+
|
||||
"\2\2\2\u049e\u049c\3\2\2\2\u049e\u049f\3\2\2\2\u049f\u0118\3\2\2\2\u04a0"+
|
||||
"\u049e\3\2\2\2\u04a1\u04a2\7\62\2\2\u04a2\u04a6\7z\2\2\u04a3\u04a4\7\62"+
|
||||
"\2\2\u04a4\u04a6\7Z\2\2\u04a5\u04a1\3\2\2\2\u04a5\u04a3\3\2\2\2\u04a6"+
|
||||
"\u04a7\3\2\2\2\u04a7\u04ae\5\u0121\u0091\2\u04a8\u04aa\7)\2\2\u04a9\u04a8"+
|
||||
"\3\2\2\2\u04a9\u04aa\3\2\2\2\u04aa\u04ab\3\2\2\2\u04ab\u04ad\5\u0121\u0091"+
|
||||
"\2\u04ac\u04a9\3\2\2\2\u04ad\u04b0\3\2\2\2\u04ae\u04ac\3\2\2\2\u04ae\u04af"+
|
||||
"\3\2\2\2\u04af\u011a\3\2\2\2\u04b0\u04ae\3\2\2\2\u04b1\u04b2\7\62\2\2"+
|
||||
"\u04b2\u04b6\7d\2\2\u04b3\u04b4\7\62\2\2\u04b4\u04b6\7D\2\2\u04b5\u04b1"+
|
||||
"\3\2\2\2\u04b5\u04b3\3\2\2\2\u04b6\u04b7\3\2\2\2\u04b7\u04be\5\u0123\u0092"+
|
||||
"\2\u04b8\u04ba\7)\2\2\u04b9\u04b8\3\2\2\2\u04b9\u04ba\3\2\2\2\u04ba\u04bb"+
|
||||
"\3\2\2\2\u04bb\u04bd\5\u0123\u0092\2\u04bc\u04b9\3\2\2\2\u04bd\u04c0\3"+
|
||||
"\2\2\2\u04be\u04bc\3\2\2\2\u04be\u04bf\3\2\2\2\u04bf\u011c\3\2\2\2\u04c0"+
|
||||
"\u04be\3\2\2\2\u04c1\u04c2\t\6\2\2\u04c2\u011e\3\2\2\2\u04c3\u04c4\t\7"+
|
||||
"\2\2\u04c4\u0120\3\2\2\2\u04c5\u04c6\t\b\2\2\u04c6\u0122\3\2\2\2\u04c7"+
|
||||
"\u04c8\t\t\2\2\u04c8\u0124\3\2\2\2\u04c9\u04cb\5\u0127\u0094\2\u04ca\u04cc"+
|
||||
"\5\u0129\u0095\2\u04cb\u04ca\3\2\2\2\u04cb\u04cc\3\2\2\2\u04cc\u04da\3"+
|
||||
"\2\2\2\u04cd\u04cf\5\u0127\u0094\2\u04ce\u04d0\5\u012b\u0096\2\u04cf\u04ce"+
|
||||
"\3\2\2\2\u04cf\u04d0\3\2\2\2\u04d0\u04da\3\2\2\2\u04d1\u04d3\5\u0129\u0095"+
|
||||
"\2\u04d2\u04d4\5\u0127\u0094\2\u04d3\u04d2\3\2\2\2\u04d3\u04d4\3\2\2\2"+
|
||||
"\u04d4\u04da\3\2\2\2\u04d5\u04d7\5\u012b\u0096\2\u04d6\u04d8\5\u0127\u0094"+
|
||||
"\2\u04d7\u04d6\3\2\2\2\u04d7\u04d8\3\2\2\2\u04d8\u04da\3\2\2\2\u04d9\u04c9"+
|
||||
"\3\2\2\2\u04d9\u04cd\3\2\2\2\u04d9\u04d1\3\2\2\2\u04d9\u04d5\3\2\2\2\u04da"+
|
||||
"\u0126\3\2\2\2\u04db\u04dc\t\n\2\2\u04dc\u0128\3\2\2\2\u04dd\u04de\t\13"+
|
||||
"\2\2\u04de\u012a\3\2\2\2\u04df\u04e0\7n\2\2\u04e0\u04e4\7n\2\2\u04e1\u04e2"+
|
||||
"\7N\2\2\u04e2\u04e4\7N\2\2\u04e3\u04df\3\2\2\2\u04e3\u04e1\3\2\2\2\u04e4"+
|
||||
"\u012c\3\2\2\2\u04e5\u04e9\n\f\2\2\u04e6\u04e9\5\u012f\u0098\2\u04e7\u04e9"+
|
||||
"\5\u010b\u0086\2\u04e8\u04e5\3\2\2\2\u04e8\u04e6\3\2\2\2\u04e8\u04e7\3"+
|
||||
"\2\2\2\u04e9\u012e\3\2\2\2\u04ea\u04ee\5\u0131\u0099\2\u04eb\u04ee\5\u0133"+
|
||||
"\u009a\2\u04ec\u04ee\5\u0135\u009b\2\u04ed\u04ea\3\2\2\2\u04ed\u04eb\3"+
|
||||
"\2\2\2\u04ed\u04ec\3\2\2\2\u04ee\u0130\3\2\2\2\u04ef\u04f0\7^\2\2\u04f0"+
|
||||
"\u050e\7)\2\2\u04f1\u04f2\7^\2\2\u04f2\u050e\7$\2\2\u04f3\u04f4\7^\2\2"+
|
||||
"\u04f4\u050e\7A\2\2\u04f5\u04f6\7^\2\2\u04f6\u050e\7^\2\2\u04f7\u04f8"+
|
||||
"\7^\2\2\u04f8\u050e\7c\2\2\u04f9\u04fa\7^\2\2\u04fa\u050e\7d\2\2\u04fb"+
|
||||
"\u04fc\7^\2\2\u04fc\u050e\7h\2\2\u04fd\u04fe\7^\2\2\u04fe\u050e\7p\2\2"+
|
||||
"\u04ff\u0500\7^\2\2\u0500\u050e\7t\2\2\u0501\u0507\7^\2\2\u0502\u0504"+
|
||||
"\7\17\2\2\u0503\u0505\7\f\2\2\u0504\u0503\3\2\2\2\u0504\u0505\3\2\2\2"+
|
||||
"\u0505\u0508\3\2\2\2\u0506\u0508\7\f\2\2\u0507\u0502\3\2\2\2\u0507\u0506"+
|
||||
"\3\2\2\2\u0508\u050e\3\2\2\2\u0509\u050a\7^\2\2\u050a\u050e\7v\2\2\u050b"+
|
||||
"\u050c\7^\2\2\u050c\u050e\7x\2\2\u050d\u04ef\3\2\2\2\u050d\u04f1\3\2\2"+
|
||||
"\2\u050d\u04f3\3\2\2\2\u050d\u04f5\3\2\2\2\u050d\u04f7\3\2\2\2\u050d\u04f9"+
|
||||
"\3\2\2\2\u050d\u04fb\3\2\2\2\u050d\u04fd\3\2\2\2\u050d\u04ff\3\2\2\2\u050d"+
|
||||
"\u0501\3\2\2\2\u050d\u0509\3\2\2\2\u050d\u050b\3\2\2\2\u050e\u0132\3\2"+
|
||||
"\2\2\u050f\u0510\7^\2\2\u0510\u051b\5\u011f\u0090\2\u0511\u0512\7^\2\2"+
|
||||
"\u0512\u0513\5\u011f\u0090\2\u0513\u0514\5\u011f\u0090\2\u0514\u051b\3"+
|
||||
"\2\2\2\u0515\u0516\7^\2\2\u0516\u0517\5\u011f\u0090\2\u0517\u0518\5\u011f"+
|
||||
"\u0090\2\u0518\u0519\5\u011f\u0090\2\u0519\u051b\3\2\2\2\u051a\u050f\3"+
|
||||
"\2\2\2\u051a\u0511\3\2\2\2\u051a\u0515\3\2\2\2\u051b\u0134\3\2\2\2\u051c"+
|
||||
"\u051d\7^\2\2\u051d\u051e\7z\2\2\u051e\u0520\3\2\2\2\u051f\u0521\5\u0121"+
|
||||
"\u0091\2\u0520\u051f\3\2\2\2\u0521\u0522\3\2\2\2\u0522\u0520\3\2\2\2\u0522"+
|
||||
"\u0523\3\2\2\2\u0523\u0136\3\2\2\2\u0524\u0526\5\u013d\u009f\2\u0525\u0524"+
|
||||
"\3\2\2\2\u0525\u0526\3\2\2\2\u0526\u0527\3\2\2\2\u0527\u0528\7\60\2\2"+
|
||||
"\u0528\u052d\5\u013d\u009f\2\u0529\u052a\5\u013d\u009f\2\u052a\u052b\7"+
|
||||
"\60\2\2\u052b\u052d\3\2\2\2\u052c\u0525\3\2\2\2\u052c\u0529\3\2\2\2\u052d"+
|
||||
"\u0138\3\2\2\2\u052e\u0530\7g\2\2\u052f\u0531\5\u013b\u009e\2\u0530\u052f"+
|
||||
"\3\2\2\2\u0530\u0531\3\2\2\2\u0531\u0532\3\2\2\2\u0532\u0539\5\u013d\u009f"+
|
||||
"\2\u0533\u0535\7G\2\2\u0534\u0536\5\u013b\u009e\2\u0535\u0534\3\2\2\2"+
|
||||
"\u0535\u0536\3\2\2\2\u0536\u0537\3\2\2\2\u0537\u0539\5\u013d\u009f\2\u0538"+
|
||||
"\u052e\3\2\2\2\u0538\u0533\3\2\2\2\u0539\u013a\3\2\2\2\u053a\u053b\t\r"+
|
||||
"\2\2\u053b\u013c\3\2\2\2\u053c\u0543\5\u0113\u008a\2\u053d\u053f\7)\2"+
|
||||
"\2\u053e\u053d\3\2\2\2\u053e\u053f\3\2\2\2\u053f\u0540\3\2\2\2\u0540\u0542"+
|
||||
"\5\u0113\u008a\2\u0541\u053e\3\2\2\2\u0542\u0545\3\2\2\2\u0543\u0541\3"+
|
||||
"\2\2\2\u0543\u0544\3\2\2\2\u0544\u013e\3\2\2\2\u0545\u0543\3\2\2\2\u0546"+
|
||||
"\u0547\t\16\2\2\u0547\u0140\3\2\2\2\u0548\u0549\7w\2\2\u0549\u054c\7:"+
|
||||
"\2\2\u054a\u054c\t\2\2\2\u054b\u0548\3\2\2\2\u054b\u054a\3\2\2\2\u054c"+
|
||||
"\u0142\3\2\2\2\u054d\u0551\n\17\2\2\u054e\u0551\5\u012f\u0098\2\u054f"+
|
||||
"\u0551\5\u010b\u0086\2\u0550\u054d\3\2\2\2\u0550\u054e\3\2\2\2\u0550\u054f"+
|
||||
"\3\2\2\2\u0551\u0144\3\2\2\2\u0552\u0556\7$\2\2\u0553\u0555\n\20\2\2\u0554"+
|
||||
"\u0553\3\2\2\2\u0555\u0558\3\2\2\2\u0556\u0554\3\2\2\2\u0556\u0557\3\2"+
|
||||
"\2\2\u0557\u0559\3\2\2\2\u0558\u0556\3\2\2\2\u0559\u055d\7*\2\2\u055a"+
|
||||
"\u055c\n\21\2\2\u055b\u055a\3\2\2\2\u055c\u055f\3\2\2\2\u055d\u055b\3"+
|
||||
"\2\2\2\u055d\u055e\3\2\2\2\u055e\u0560\3\2\2\2\u055f\u055d\3\2\2\2\u0560"+
|
||||
"\u0564\7+\2\2\u0561\u0563\n\22\2\2\u0562\u0561\3\2\2\2\u0563\u0566\3\2"+
|
||||
"\2\2\u0564\u0562\3\2\2\2\u0564\u0565\3\2\2\2\u0565\u0567\3\2\2\2\u0566"+
|
||||
"\u0564\3\2\2\2\u0567\u0568\7$\2\2\u0568\u0146\3\2\2\2\u0569\u056a\5\u0115"+
|
||||
"\u008b\2\u056a\u056b\5\u014f\u00a8\2\u056b\u0576\3\2\2\2\u056c\u056d\5"+
|
||||
"\u0117\u008c\2\u056d\u056e\5\u014f\u00a8\2\u056e\u0576\3\2\2\2\u056f\u0570"+
|
||||
"\5\u0119\u008d\2\u0570\u0571\5\u014f\u00a8\2\u0571\u0576\3\2\2\2\u0572"+
|
||||
"\u0573\5\u011b\u008e\2\u0573\u0574\5\u014f\u00a8\2\u0574\u0576\3\2\2\2"+
|
||||
"\u0575\u0569\3\2\2\2\u0575\u056c\3\2\2\2\u0575\u056f\3\2\2\2\u0575\u0572"+
|
||||
"\3\2\2\2\u0576\u0148\3\2\2\2\u0577\u0579\5\u0137\u009c\2\u0578\u057a\5"+
|
||||
"\u0139\u009d\2\u0579\u0578\3\2\2\2\u0579\u057a\3\2\2\2\u057a\u057b\3\2"+
|
||||
"\2\2\u057b\u057c\5\u014f\u00a8\2\u057c\u0582\3\2\2\2\u057d\u057e\5\u013d"+
|
||||
"\u009f\2\u057e\u057f\5\u0139\u009d\2\u057f\u0580\5\u014f\u00a8\2\u0580"+
|
||||
"\u0582\3\2\2\2\u0581\u0577\3\2\2\2\u0581\u057d\3\2\2\2\u0582\u014a\3\2"+
|
||||
"\2\2\u0583\u0584\5\t\5\2\u0584\u0585\5\u014f\u00a8\2\u0585\u014c\3\2\2"+
|
||||
"\2\u0586\u0587\5\5\3\2\u0587\u0588\5\u014f\u00a8\2\u0588\u014e\3\2\2\2"+
|
||||
"\u0589\u058a\5\u010d\u0087\2\u058a\u0150\3\2\2\2\u058b\u058d\t\23\2\2"+
|
||||
"\u058c\u058b\3\2\2\2\u058d\u058e\3\2\2\2\u058e\u058c\3\2\2\2\u058e\u058f"+
|
||||
"\3\2\2\2\u058f\u0590\3\2\2\2\u0590\u0591\b\u00a9\3\2\u0591\u0152\3\2\2"+
|
||||
"\2\u0592\u0594\7\17\2\2\u0593\u0595\7\f\2\2\u0594\u0593\3\2\2\2\u0594"+
|
||||
"\u0595\3\2\2\2\u0595\u0598\3\2\2\2\u0596\u0598\7\f\2\2\u0597\u0592\3\2"+
|
||||
"\2\2\u0597\u0596\3\2\2\2\u0598\u0599\3\2\2\2\u0599\u059a\b\u00aa\3\2\u059a"+
|
||||
"\u0154\3\2\2\2\u059b\u059c\7\61\2\2\u059c\u059d\7,\2\2\u059d\u05a1\3\2"+
|
||||
"\2\2\u059e\u05a0\13\2\2\2\u059f\u059e\3\2\2\2\u05a0\u05a3\3\2\2\2\u05a1"+
|
||||
"\u05a2\3\2\2\2\u05a1\u059f\3\2\2\2\u05a2\u05a4\3\2\2\2\u05a3\u05a1\3\2"+
|
||||
"\2\2\u05a4\u05a5\7,\2\2\u05a5\u05a6\7\61\2\2\u05a6\u05a7\3\2\2\2\u05a7"+
|
||||
"\u05a8\b\u00ab\3\2\u05a8\u0156\3\2\2\2\u05a9\u05aa\7\61\2\2\u05aa\u05ab"+
|
||||
"\7\61\2\2\u05ab\u05af\3\2\2\2\u05ac\u05ae\n\24\2\2\u05ad\u05ac\3\2\2\2"+
|
||||
"\u05ae\u05b1\3\2\2\2\u05af\u05ad\3\2\2\2\u05af\u05b0\3\2\2\2\u05b0\u05b2"+
|
||||
"\3\2\2\2\u05b1\u05af\3\2\2\2\u05b2\u05b3\b\u00ac\3\2\u05b3\u0158\3\2\2"+
|
||||
"\2K\2\u015b\u015f\u0163\u0167\u0169\u016c\u0172\u0178\u017b\u0180\u0182"+
|
||||
"\u0185\u018b\u0190\u0194\u0198\u01a0\u01a6\u01ab\u01b0\u01b5\u01bd\u040a"+
|
||||
"\u0443\u0449\u047b\u0480\u0482\u0487\u048f\u0494\u0499\u049e\u04a5\u04a9"+
|
||||
"\u04ae\u04b5\u04b9\u04be\u04cb\u04cf\u04d3\u04d7\u04d9\u04e3\u04e8\u04ed"+
|
||||
"\u0504\u0507\u050d\u051a\u0522\u0525\u052c\u0530\u0535\u0538\u053e\u0543"+
|
||||
"\u054b\u0550\u0556\u055d\u0564\u0575\u0579\u0581\u058e\u0594\u0597\u05a1"+
|
||||
"\u05af\4\2\3\2\b\2\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
||||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
||||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,264 @@
|
||||
IntegerLiteral=1
|
||||
CharacterLiteral=2
|
||||
FloatingLiteral=3
|
||||
StringLiteral=4
|
||||
BooleanLiteral=5
|
||||
PointerLiteral=6
|
||||
UserDefinedLiteral=7
|
||||
MultiLineMacro=8
|
||||
Directive=9
|
||||
Alignas=10
|
||||
Alignof=11
|
||||
Asm=12
|
||||
Auto=13
|
||||
Bool=14
|
||||
Break=15
|
||||
Case=16
|
||||
Catch=17
|
||||
Char=18
|
||||
Char16=19
|
||||
Char32=20
|
||||
Class=21
|
||||
Const=22
|
||||
Constexpr=23
|
||||
Const_cast=24
|
||||
Continue=25
|
||||
Decltype=26
|
||||
Default=27
|
||||
Delete=28
|
||||
Do=29
|
||||
Double=30
|
||||
Dynamic_cast=31
|
||||
Else=32
|
||||
Enum=33
|
||||
Explicit=34
|
||||
Export=35
|
||||
Extern=36
|
||||
False_=37
|
||||
Final=38
|
||||
Float=39
|
||||
For=40
|
||||
Friend=41
|
||||
Goto=42
|
||||
If=43
|
||||
Inline=44
|
||||
Int=45
|
||||
Long=46
|
||||
Mutable=47
|
||||
Namespace=48
|
||||
New=49
|
||||
Noexcept=50
|
||||
Nullptr=51
|
||||
Operator=52
|
||||
Override=53
|
||||
Private=54
|
||||
Protected=55
|
||||
Public=56
|
||||
Register=57
|
||||
Reinterpret_cast=58
|
||||
Return=59
|
||||
Short=60
|
||||
Signed=61
|
||||
Sizeof=62
|
||||
Static=63
|
||||
Static_assert=64
|
||||
Static_cast=65
|
||||
Struct=66
|
||||
Switch=67
|
||||
Template=68
|
||||
This=69
|
||||
Thread_local=70
|
||||
Throw=71
|
||||
True_=72
|
||||
Try=73
|
||||
Typedef=74
|
||||
Typeid_=75
|
||||
Typename_=76
|
||||
Union=77
|
||||
Unsigned=78
|
||||
Using=79
|
||||
Virtual=80
|
||||
Void=81
|
||||
Volatile=82
|
||||
Wchar=83
|
||||
While=84
|
||||
LeftParen=85
|
||||
RightParen=86
|
||||
LeftBracket=87
|
||||
RightBracket=88
|
||||
LeftBrace=89
|
||||
RightBrace=90
|
||||
Plus=91
|
||||
Minus=92
|
||||
Star=93
|
||||
Div=94
|
||||
Mod=95
|
||||
Caret=96
|
||||
And=97
|
||||
Or=98
|
||||
Tilde=99
|
||||
Not=100
|
||||
Assign=101
|
||||
Less=102
|
||||
Greater=103
|
||||
PlusAssign=104
|
||||
MinusAssign=105
|
||||
StarAssign=106
|
||||
DivAssign=107
|
||||
ModAssign=108
|
||||
XorAssign=109
|
||||
AndAssign=110
|
||||
OrAssign=111
|
||||
LeftShiftAssign=112
|
||||
RightShiftAssign=113
|
||||
Equal=114
|
||||
NotEqual=115
|
||||
LessEqual=116
|
||||
GreaterEqual=117
|
||||
AndAnd=118
|
||||
OrOr=119
|
||||
PlusPlus=120
|
||||
MinusMinus=121
|
||||
Comma=122
|
||||
ArrowStar=123
|
||||
Arrow=124
|
||||
Question=125
|
||||
Colon=126
|
||||
Doublecolon=127
|
||||
Semi=128
|
||||
Dot=129
|
||||
DotStar=130
|
||||
Ellipsis=131
|
||||
Identifier=132
|
||||
DecimalLiteral=133
|
||||
OctalLiteral=134
|
||||
HexadecimalLiteral=135
|
||||
BinaryLiteral=136
|
||||
Integersuffix=137
|
||||
UserDefinedIntegerLiteral=138
|
||||
UserDefinedFloatingLiteral=139
|
||||
UserDefinedStringLiteral=140
|
||||
UserDefinedCharacterLiteral=141
|
||||
Whitespace=142
|
||||
Newline=143
|
||||
BlockComment=144
|
||||
LineComment=145
|
||||
'alignas'=10
|
||||
'alignof'=11
|
||||
'asm'=12
|
||||
'auto'=13
|
||||
'bool'=14
|
||||
'break'=15
|
||||
'case'=16
|
||||
'catch'=17
|
||||
'char'=18
|
||||
'char16_t'=19
|
||||
'char32_t'=20
|
||||
'class'=21
|
||||
'const'=22
|
||||
'constexpr'=23
|
||||
'const_cast'=24
|
||||
'continue'=25
|
||||
'decltype'=26
|
||||
'default'=27
|
||||
'delete'=28
|
||||
'do'=29
|
||||
'double'=30
|
||||
'dynamic_cast'=31
|
||||
'else'=32
|
||||
'enum'=33
|
||||
'explicit'=34
|
||||
'export'=35
|
||||
'extern'=36
|
||||
'false'=37
|
||||
'final'=38
|
||||
'float'=39
|
||||
'for'=40
|
||||
'friend'=41
|
||||
'goto'=42
|
||||
'if'=43
|
||||
'inline'=44
|
||||
'int'=45
|
||||
'long'=46
|
||||
'mutable'=47
|
||||
'namespace'=48
|
||||
'new'=49
|
||||
'noexcept'=50
|
||||
'nullptr'=51
|
||||
'operator'=52
|
||||
'override'=53
|
||||
'private'=54
|
||||
'protected'=55
|
||||
'public'=56
|
||||
'register'=57
|
||||
'reinterpret_cast'=58
|
||||
'return'=59
|
||||
'short'=60
|
||||
'signed'=61
|
||||
'sizeof'=62
|
||||
'static'=63
|
||||
'static_assert'=64
|
||||
'static_cast'=65
|
||||
'struct'=66
|
||||
'switch'=67
|
||||
'template'=68
|
||||
'this'=69
|
||||
'thread_local'=70
|
||||
'throw'=71
|
||||
'true'=72
|
||||
'try'=73
|
||||
'typedef'=74
|
||||
'typeid'=75
|
||||
'typename'=76
|
||||
'union'=77
|
||||
'unsigned'=78
|
||||
'using'=79
|
||||
'virtual'=80
|
||||
'void'=81
|
||||
'volatile'=82
|
||||
'wchar_t'=83
|
||||
'while'=84
|
||||
'('=85
|
||||
')'=86
|
||||
'['=87
|
||||
']'=88
|
||||
'{'=89
|
||||
'}'=90
|
||||
'+'=91
|
||||
'-'=92
|
||||
'*'=93
|
||||
'/'=94
|
||||
'%'=95
|
||||
'^'=96
|
||||
'&'=97
|
||||
'|'=98
|
||||
'~'=99
|
||||
'='=101
|
||||
'<'=102
|
||||
'>'=103
|
||||
'+='=104
|
||||
'-='=105
|
||||
'*='=106
|
||||
'/='=107
|
||||
'%='=108
|
||||
'^='=109
|
||||
'&='=110
|
||||
'|='=111
|
||||
'<<='=112
|
||||
'>>='=113
|
||||
'=='=114
|
||||
'!='=115
|
||||
'<='=116
|
||||
'>='=117
|
||||
'++'=120
|
||||
'--'=121
|
||||
','=122
|
||||
'->*'=123
|
||||
'->'=124
|
||||
'?'=125
|
||||
':'=126
|
||||
'::'=127
|
||||
';'=128
|
||||
'.'=129
|
||||
'.*'=130
|
||||
'...'=131
|
||||
@@ -0,0 +1,823 @@
|
||||
/*******************************************************************************
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2015 Camilo Sanchez (Camiloasc1) 2020 Martin Mirchev (Marti2203)
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
|
||||
* associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
* sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all copies or
|
||||
* substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
|
||||
* NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
* ****************************************************************************
|
||||
*/
|
||||
parser grammar CPP14Parser;
|
||||
options {
|
||||
tokenVocab = CPP14Lexer;
|
||||
}
|
||||
/*Basic concepts*/
|
||||
|
||||
translationUnit: declarationseq? EOF;
|
||||
/*Expressions*/
|
||||
|
||||
primaryExpression:
|
||||
literal+
|
||||
| This
|
||||
| LeftParen expression RightParen
|
||||
| idExpression
|
||||
| lambdaExpression;
|
||||
|
||||
idExpression: unqualifiedId | qualifiedId;
|
||||
|
||||
unqualifiedId:
|
||||
Identifier
|
||||
| operatorFunctionId
|
||||
| conversionFunctionId
|
||||
| literalOperatorId
|
||||
| Tilde (className | decltypeSpecifier)
|
||||
| templateId;
|
||||
|
||||
qualifiedId: nestedNameSpecifier Template? unqualifiedId;
|
||||
|
||||
nestedNameSpecifier:
|
||||
(theTypeName | namespaceName | decltypeSpecifier)? Doublecolon
|
||||
| nestedNameSpecifier (
|
||||
Identifier
|
||||
| Template? simpleTemplateId
|
||||
) Doublecolon;
|
||||
lambdaExpression:
|
||||
lambdaIntroducer lambdaDeclarator? compoundStatement;
|
||||
|
||||
lambdaIntroducer: LeftBracket lambdaCapture? RightBracket;
|
||||
|
||||
lambdaCapture:
|
||||
captureList
|
||||
| captureDefault (Comma captureList)?;
|
||||
|
||||
captureDefault: And | Assign;
|
||||
|
||||
captureList: capture (Comma capture)* Ellipsis?;
|
||||
|
||||
capture: simpleCapture | initcapture;
|
||||
|
||||
simpleCapture: And? Identifier | This;
|
||||
|
||||
initcapture: And? Identifier initializer;
|
||||
|
||||
lambdaDeclarator:
|
||||
LeftParen parameterDeclarationClause? RightParen Mutable? exceptionSpecification?
|
||||
attributeSpecifierSeq? trailingReturnType?;
|
||||
|
||||
postfixExpression:
|
||||
primaryExpression
|
||||
| postfixExpression LeftBracket (expression | bracedInitList) RightBracket
|
||||
| postfixExpression LeftParen expressionList? RightParen
|
||||
| (simpleTypeSpecifier | typeNameSpecifier) (
|
||||
LeftParen expressionList? RightParen
|
||||
| bracedInitList
|
||||
)
|
||||
| postfixExpression (Dot | Arrow) (
|
||||
Template? idExpression
|
||||
| pseudoDestructorName
|
||||
)
|
||||
| postfixExpression (PlusPlus | MinusMinus)
|
||||
| (
|
||||
Dynamic_cast
|
||||
| Static_cast
|
||||
| Reinterpret_cast
|
||||
| Const_cast
|
||||
) Less theTypeId Greater LeftParen expression RightParen
|
||||
| typeIdOfTheTypeId LeftParen (expression | theTypeId) RightParen;
|
||||
/*
|
||||
add a middle layer to eliminate duplicated function declarations
|
||||
*/
|
||||
|
||||
typeIdOfTheTypeId: Typeid_;
|
||||
|
||||
expressionList: initializerList;
|
||||
|
||||
pseudoDestructorName:
|
||||
nestedNameSpecifier? (theTypeName Doublecolon)? Tilde theTypeName
|
||||
| nestedNameSpecifier Template simpleTemplateId Doublecolon Tilde theTypeName
|
||||
| Tilde decltypeSpecifier;
|
||||
|
||||
unaryExpression:
|
||||
postfixExpression
|
||||
| (PlusPlus | MinusMinus | unaryOperator | Sizeof) unaryExpression
|
||||
| Sizeof (
|
||||
LeftParen theTypeId RightParen
|
||||
| Ellipsis LeftParen Identifier RightParen
|
||||
)
|
||||
| Alignof LeftParen theTypeId RightParen
|
||||
| noExceptExpression
|
||||
| newExpression
|
||||
| deleteExpression;
|
||||
|
||||
unaryOperator: Or | Star | And | Plus | Tilde | Minus | Not;
|
||||
|
||||
newExpression:
|
||||
Doublecolon? New newPlacement? (
|
||||
newTypeId
|
||||
| (LeftParen theTypeId RightParen)
|
||||
) newInitializer?;
|
||||
|
||||
newPlacement: LeftParen expressionList RightParen;
|
||||
|
||||
newTypeId: typeSpecifierSeq newDeclarator?;
|
||||
|
||||
newDeclarator:
|
||||
pointerOperator newDeclarator?
|
||||
| noPointerNewDeclarator;
|
||||
|
||||
noPointerNewDeclarator:
|
||||
LeftBracket expression RightBracket attributeSpecifierSeq?
|
||||
| noPointerNewDeclarator LeftBracket constantExpression RightBracket attributeSpecifierSeq?;
|
||||
|
||||
newInitializer:
|
||||
LeftParen expressionList? RightParen
|
||||
| bracedInitList;
|
||||
|
||||
deleteExpression:
|
||||
Doublecolon? Delete (LeftBracket RightBracket)? castExpression;
|
||||
|
||||
noExceptExpression: Noexcept LeftParen expression RightParen;
|
||||
|
||||
castExpression:
|
||||
unaryExpression
|
||||
| LeftParen theTypeId RightParen castExpression;
|
||||
|
||||
pointerMemberExpression:
|
||||
castExpression ((DotStar | ArrowStar) castExpression)*;
|
||||
|
||||
multiplicativeExpression:
|
||||
pointerMemberExpression (
|
||||
(Star | Div | Mod) pointerMemberExpression
|
||||
)*;
|
||||
|
||||
additiveExpression:
|
||||
multiplicativeExpression (
|
||||
(Plus | Minus) multiplicativeExpression
|
||||
)*;
|
||||
|
||||
shiftExpression:
|
||||
additiveExpression (shiftOperator additiveExpression)*;
|
||||
|
||||
shiftOperator: Greater Greater | Less Less;
|
||||
|
||||
relationalExpression:
|
||||
shiftExpression (
|
||||
(Less | Greater | LessEqual | GreaterEqual) shiftExpression
|
||||
)*;
|
||||
|
||||
equalityExpression:
|
||||
relationalExpression (
|
||||
(Equal | NotEqual) relationalExpression
|
||||
)*;
|
||||
|
||||
andExpression: equalityExpression (And equalityExpression)*;
|
||||
|
||||
exclusiveOrExpression: andExpression (Caret andExpression)*;
|
||||
|
||||
inclusiveOrExpression:
|
||||
exclusiveOrExpression (Or exclusiveOrExpression)*;
|
||||
|
||||
logicalAndExpression:
|
||||
inclusiveOrExpression (AndAnd inclusiveOrExpression)*;
|
||||
|
||||
logicalOrExpression:
|
||||
logicalAndExpression (OrOr logicalAndExpression)*;
|
||||
|
||||
conditionalExpression:
|
||||
logicalOrExpression (
|
||||
Question expression Colon assignmentExpression
|
||||
)?;
|
||||
|
||||
assignmentExpression:
|
||||
conditionalExpression
|
||||
| logicalOrExpression assignmentOperator initializerClause
|
||||
| throwExpression;
|
||||
|
||||
assignmentOperator:
|
||||
Assign
|
||||
| StarAssign
|
||||
| DivAssign
|
||||
| ModAssign
|
||||
| PlusAssign
|
||||
| MinusAssign
|
||||
| RightShiftAssign
|
||||
| LeftShiftAssign
|
||||
| AndAssign
|
||||
| XorAssign
|
||||
| OrAssign;
|
||||
|
||||
expression: assignmentExpression (Comma assignmentExpression)*;
|
||||
|
||||
constantExpression: conditionalExpression;
|
||||
/*Statements*/
|
||||
|
||||
statement:
|
||||
labeledStatement
|
||||
| declarationStatement
|
||||
| attributeSpecifierSeq? (
|
||||
expressionStatement
|
||||
| compoundStatement
|
||||
| selectionStatement
|
||||
| iterationStatement
|
||||
| jumpStatement
|
||||
| tryBlock
|
||||
);
|
||||
|
||||
labeledStatement:
|
||||
attributeSpecifierSeq? (
|
||||
Identifier
|
||||
| Case constantExpression
|
||||
| Default
|
||||
) Colon statement;
|
||||
|
||||
expressionStatement: expression? Semi;
|
||||
|
||||
compoundStatement: LeftBrace statementSeq? RightBrace;
|
||||
|
||||
statementSeq: statement+;
|
||||
|
||||
selectionStatement:
|
||||
If LeftParen condition RightParen statement (Else statement)?
|
||||
| Switch LeftParen condition RightParen statement;
|
||||
|
||||
condition:
|
||||
expression
|
||||
| attributeSpecifierSeq? declSpecifierSeq declarator (
|
||||
Assign initializerClause
|
||||
| bracedInitList
|
||||
);
|
||||
|
||||
iterationStatement:
|
||||
While LeftParen condition RightParen statement
|
||||
| Do statement While LeftParen expression RightParen Semi
|
||||
| For LeftParen (
|
||||
forInitStatement condition? Semi expression?
|
||||
| forRangeDeclaration Colon forRangeInitializer
|
||||
) RightParen statement;
|
||||
|
||||
forInitStatement: expressionStatement | simpleDeclaration;
|
||||
|
||||
forRangeDeclaration:
|
||||
attributeSpecifierSeq? declSpecifierSeq declarator;
|
||||
|
||||
forRangeInitializer: expression | bracedInitList;
|
||||
|
||||
jumpStatement:
|
||||
(
|
||||
Break
|
||||
| Continue
|
||||
| Return (expression | bracedInitList)?
|
||||
| Goto Identifier
|
||||
) Semi;
|
||||
|
||||
declarationStatement: blockDeclaration;
|
||||
/*Declarations*/
|
||||
|
||||
declarationseq: declaration+;
|
||||
|
||||
declaration:
|
||||
blockDeclaration
|
||||
| functionDefinition
|
||||
| templateDeclaration
|
||||
| explicitInstantiation
|
||||
| explicitSpecialization
|
||||
| linkageSpecification
|
||||
| namespaceDefinition
|
||||
| emptyDeclaration
|
||||
| attributeDeclaration;
|
||||
|
||||
blockDeclaration:
|
||||
simpleDeclaration
|
||||
| asmDefinition
|
||||
| namespaceAliasDefinition
|
||||
| usingDeclaration
|
||||
| usingDirective
|
||||
| staticAssertDeclaration
|
||||
| aliasDeclaration
|
||||
| opaqueEnumDeclaration;
|
||||
|
||||
aliasDeclaration:
|
||||
Using Identifier attributeSpecifierSeq? Assign theTypeId Semi;
|
||||
|
||||
simpleDeclaration:
|
||||
declSpecifierSeq? initDeclaratorList? Semi
|
||||
| attributeSpecifierSeq declSpecifierSeq? initDeclaratorList Semi;
|
||||
|
||||
staticAssertDeclaration:
|
||||
Static_assert LeftParen constantExpression Comma StringLiteral RightParen Semi;
|
||||
|
||||
emptyDeclaration: Semi;
|
||||
|
||||
attributeDeclaration: attributeSpecifierSeq Semi;
|
||||
|
||||
declSpecifier:
|
||||
storageClassSpecifier
|
||||
| typeSpecifier
|
||||
| functionSpecifier
|
||||
| Friend
|
||||
| Typedef
|
||||
| Constexpr;
|
||||
|
||||
declSpecifierSeq: declSpecifier+? attributeSpecifierSeq?;
|
||||
|
||||
storageClassSpecifier:
|
||||
Register
|
||||
| Static
|
||||
| Thread_local
|
||||
| Extern
|
||||
| Mutable;
|
||||
|
||||
functionSpecifier: Inline | Virtual | Explicit;
|
||||
|
||||
typedefName: Identifier;
|
||||
|
||||
typeSpecifier:
|
||||
trailingTypeSpecifier
|
||||
| classSpecifier
|
||||
| enumSpecifier;
|
||||
|
||||
trailingTypeSpecifier:
|
||||
simpleTypeSpecifier
|
||||
| elaboratedTypeSpecifier
|
||||
| typeNameSpecifier
|
||||
| cvQualifier;
|
||||
|
||||
typeSpecifierSeq: typeSpecifier+ attributeSpecifierSeq?;
|
||||
|
||||
trailingTypeSpecifierSeq:
|
||||
trailingTypeSpecifier+ attributeSpecifierSeq?;
|
||||
|
||||
simpleTypeLengthModifier:
|
||||
Short
|
||||
| Long;
|
||||
|
||||
simpleTypeSignednessModifier:
|
||||
Unsigned
|
||||
| Signed;
|
||||
|
||||
simpleTypeSpecifier:
|
||||
nestedNameSpecifier? theTypeName
|
||||
| nestedNameSpecifier Template simpleTemplateId
|
||||
| simpleTypeSignednessModifier
|
||||
| simpleTypeSignednessModifier? simpleTypeLengthModifier+
|
||||
| simpleTypeSignednessModifier? Char
|
||||
| simpleTypeSignednessModifier? Char16
|
||||
| simpleTypeSignednessModifier? Char32
|
||||
| simpleTypeSignednessModifier? Wchar
|
||||
| Bool
|
||||
| simpleTypeSignednessModifier? simpleTypeLengthModifier* Int
|
||||
| Float
|
||||
| simpleTypeLengthModifier? Double
|
||||
| Void
|
||||
| Auto
|
||||
| decltypeSpecifier;
|
||||
|
||||
theTypeName:
|
||||
className
|
||||
| enumName
|
||||
| typedefName
|
||||
| simpleTemplateId;
|
||||
|
||||
decltypeSpecifier:
|
||||
Decltype LeftParen (expression | Auto) RightParen;
|
||||
|
||||
elaboratedTypeSpecifier:
|
||||
classKey (
|
||||
attributeSpecifierSeq? nestedNameSpecifier? Identifier
|
||||
| simpleTemplateId
|
||||
| nestedNameSpecifier Template? simpleTemplateId
|
||||
)
|
||||
| Enum nestedNameSpecifier? Identifier;
|
||||
|
||||
enumName: Identifier;
|
||||
|
||||
enumSpecifier:
|
||||
enumHead LeftBrace (enumeratorList Comma?)? RightBrace;
|
||||
|
||||
enumHead:
|
||||
enumkey attributeSpecifierSeq? (
|
||||
nestedNameSpecifier? Identifier
|
||||
)? enumbase?;
|
||||
|
||||
opaqueEnumDeclaration:
|
||||
enumkey attributeSpecifierSeq? Identifier enumbase? Semi;
|
||||
|
||||
enumkey: Enum (Class | Struct)?;
|
||||
|
||||
enumbase: Colon typeSpecifierSeq;
|
||||
|
||||
enumeratorList:
|
||||
enumeratorDefinition (Comma enumeratorDefinition)*;
|
||||
|
||||
enumeratorDefinition: enumerator (Assign constantExpression)?;
|
||||
|
||||
enumerator: Identifier;
|
||||
|
||||
namespaceName: originalNamespaceName | namespaceAlias;
|
||||
|
||||
originalNamespaceName: Identifier;
|
||||
|
||||
namespaceDefinition:
|
||||
Inline? Namespace (Identifier | originalNamespaceName)? LeftBrace namespaceBody = declarationseq
|
||||
? RightBrace;
|
||||
|
||||
namespaceAlias: Identifier;
|
||||
|
||||
namespaceAliasDefinition:
|
||||
Namespace Identifier Assign qualifiednamespacespecifier Semi;
|
||||
|
||||
qualifiednamespacespecifier: nestedNameSpecifier? namespaceName;
|
||||
|
||||
usingDeclaration:
|
||||
Using ((Typename_? nestedNameSpecifier) | Doublecolon) unqualifiedId Semi;
|
||||
|
||||
usingDirective:
|
||||
attributeSpecifierSeq? Using Namespace nestedNameSpecifier? namespaceName Semi;
|
||||
|
||||
asmDefinition: Asm LeftParen StringLiteral RightParen Semi;
|
||||
|
||||
linkageSpecification:
|
||||
Extern StringLiteral (
|
||||
LeftBrace declarationseq? RightBrace
|
||||
| declaration
|
||||
);
|
||||
|
||||
attributeSpecifierSeq: attributeSpecifier+;
|
||||
|
||||
attributeSpecifier:
|
||||
LeftBracket LeftBracket attributeList? RightBracket RightBracket
|
||||
| alignmentspecifier;
|
||||
|
||||
alignmentspecifier:
|
||||
Alignas LeftParen (theTypeId | constantExpression) Ellipsis? RightParen;
|
||||
|
||||
attributeList: attribute (Comma attribute)* Ellipsis?;
|
||||
|
||||
attribute: (attributeNamespace Doublecolon)? Identifier attributeArgumentClause?;
|
||||
|
||||
attributeNamespace: Identifier;
|
||||
|
||||
attributeArgumentClause: LeftParen balancedTokenSeq? RightParen;
|
||||
|
||||
balancedTokenSeq: balancedtoken+;
|
||||
|
||||
balancedtoken:
|
||||
LeftParen balancedTokenSeq RightParen
|
||||
| LeftBracket balancedTokenSeq RightBracket
|
||||
| LeftBrace balancedTokenSeq RightBrace
|
||||
| ~(
|
||||
LeftParen
|
||||
| RightParen
|
||||
| LeftBrace
|
||||
| RightBrace
|
||||
| LeftBracket
|
||||
| RightBracket
|
||||
)+;
|
||||
/*Declarators*/
|
||||
|
||||
initDeclaratorList: initDeclarator (Comma initDeclarator)*;
|
||||
|
||||
initDeclarator: declarator initializer?;
|
||||
|
||||
declarator:
|
||||
pointerDeclarator
|
||||
| noPointerDeclarator parametersAndQualifiers trailingReturnType;
|
||||
|
||||
pointerDeclarator: (pointerOperator Const?)* noPointerDeclarator;
|
||||
|
||||
noPointerDeclarator:
|
||||
declaratorid attributeSpecifierSeq?
|
||||
| noPointerDeclarator (
|
||||
parametersAndQualifiers
|
||||
| LeftBracket constantExpression? RightBracket attributeSpecifierSeq?
|
||||
)
|
||||
| LeftParen pointerDeclarator RightParen;
|
||||
|
||||
parametersAndQualifiers:
|
||||
LeftParen parameterDeclarationClause? RightParen cvqualifierseq? refqualifier?
|
||||
exceptionSpecification? attributeSpecifierSeq?;
|
||||
|
||||
trailingReturnType:
|
||||
Arrow trailingTypeSpecifierSeq abstractDeclarator?;
|
||||
|
||||
pointerOperator:
|
||||
(And | AndAnd) attributeSpecifierSeq?
|
||||
| nestedNameSpecifier? Star attributeSpecifierSeq? cvqualifierseq?;
|
||||
|
||||
cvqualifierseq: cvQualifier+;
|
||||
|
||||
cvQualifier: Const | Volatile;
|
||||
|
||||
refqualifier: And | AndAnd;
|
||||
|
||||
declaratorid: Ellipsis? idExpression;
|
||||
|
||||
theTypeId: typeSpecifierSeq abstractDeclarator?;
|
||||
|
||||
abstractDeclarator:
|
||||
pointerAbstractDeclarator
|
||||
| noPointerAbstractDeclarator? parametersAndQualifiers trailingReturnType
|
||||
| abstractPackDeclarator;
|
||||
|
||||
pointerAbstractDeclarator:
|
||||
noPointerAbstractDeclarator
|
||||
| pointerOperator+ noPointerAbstractDeclarator?;
|
||||
|
||||
noPointerAbstractDeclarator:
|
||||
noPointerAbstractDeclarator (
|
||||
parametersAndQualifiers
|
||||
| noPointerAbstractDeclarator LeftBracket constantExpression? RightBracket
|
||||
attributeSpecifierSeq?
|
||||
)
|
||||
| parametersAndQualifiers
|
||||
| LeftBracket constantExpression? RightBracket attributeSpecifierSeq?
|
||||
| LeftParen pointerAbstractDeclarator RightParen;
|
||||
|
||||
abstractPackDeclarator:
|
||||
pointerOperator* noPointerAbstractPackDeclarator;
|
||||
|
||||
noPointerAbstractPackDeclarator:
|
||||
noPointerAbstractPackDeclarator (
|
||||
parametersAndQualifiers
|
||||
| LeftBracket constantExpression? RightBracket attributeSpecifierSeq?
|
||||
)
|
||||
| Ellipsis;
|
||||
|
||||
parameterDeclarationClause:
|
||||
parameterDeclarationList (Comma? Ellipsis)?;
|
||||
|
||||
parameterDeclarationList:
|
||||
parameterDeclaration (Comma parameterDeclaration)*;
|
||||
|
||||
parameterDeclaration:
|
||||
attributeSpecifierSeq? declSpecifierSeq (
|
||||
(declarator | abstractDeclarator?) (
|
||||
Assign initializerClause
|
||||
)?
|
||||
);
|
||||
|
||||
functionDefinition:
|
||||
attributeSpecifierSeq? declSpecifierSeq? declarator virtualSpecifierSeq? functionBody;
|
||||
|
||||
functionBody:
|
||||
constructorInitializer? compoundStatement
|
||||
| functionTryBlock
|
||||
| Assign (Default | Delete) Semi;
|
||||
|
||||
initializer:
|
||||
braceOrEqualInitializer
|
||||
| LeftParen expressionList RightParen;
|
||||
|
||||
braceOrEqualInitializer:
|
||||
Assign initializerClause
|
||||
| bracedInitList;
|
||||
|
||||
initializerClause: assignmentExpression | bracedInitList;
|
||||
|
||||
initializerList:
|
||||
initializerClause Ellipsis? (
|
||||
Comma initializerClause Ellipsis?
|
||||
)*;
|
||||
|
||||
bracedInitList: LeftBrace (initializerList Comma?)? RightBrace;
|
||||
/*Classes*/
|
||||
|
||||
className: Identifier | simpleTemplateId;
|
||||
|
||||
classSpecifier:
|
||||
classHead LeftBrace memberSpecification? RightBrace;
|
||||
|
||||
classHead:
|
||||
classKey attributeSpecifierSeq? (
|
||||
classHeadName classVirtSpecifier?
|
||||
)? baseClause?
|
||||
| Union attributeSpecifierSeq? (
|
||||
classHeadName classVirtSpecifier?
|
||||
)?;
|
||||
|
||||
classHeadName: nestedNameSpecifier? className;
|
||||
|
||||
classVirtSpecifier: Final;
|
||||
|
||||
classKey: Class | Struct;
|
||||
|
||||
memberSpecification:
|
||||
(memberdeclaration | accessSpecifier Colon)+;
|
||||
|
||||
memberdeclaration:
|
||||
attributeSpecifierSeq? declSpecifierSeq? memberDeclaratorList? Semi
|
||||
| functionDefinition
|
||||
| usingDeclaration
|
||||
| staticAssertDeclaration
|
||||
| templateDeclaration
|
||||
| aliasDeclaration
|
||||
| emptyDeclaration;
|
||||
|
||||
memberDeclaratorList:
|
||||
memberDeclarator (Comma memberDeclarator)*;
|
||||
|
||||
memberDeclarator:
|
||||
declarator (
|
||||
virtualSpecifierSeq? pureSpecifier?
|
||||
| braceOrEqualInitializer?
|
||||
)
|
||||
| Identifier? attributeSpecifierSeq? Colon constantExpression;
|
||||
|
||||
virtualSpecifierSeq: virtualSpecifier+;
|
||||
|
||||
virtualSpecifier: Override | Final;
|
||||
/*
|
||||
purespecifier: Assign '0'//Conflicts with the lexer ;
|
||||
*/
|
||||
|
||||
pureSpecifier:
|
||||
Assign val = OctalLiteral {if($val.text.compareTo("0")!=0) throw new InputMismatchException(this);
|
||||
};
|
||||
/*Derived classes*/
|
||||
|
||||
baseClause: Colon baseSpecifierList;
|
||||
|
||||
baseSpecifierList:
|
||||
baseSpecifier Ellipsis? (Comma baseSpecifier Ellipsis?)*;
|
||||
|
||||
baseSpecifier:
|
||||
attributeSpecifierSeq? (
|
||||
baseTypeSpecifier
|
||||
| Virtual accessSpecifier? baseTypeSpecifier
|
||||
| accessSpecifier Virtual? baseTypeSpecifier
|
||||
);
|
||||
|
||||
classOrDeclType:
|
||||
nestedNameSpecifier? className
|
||||
| decltypeSpecifier;
|
||||
|
||||
baseTypeSpecifier: classOrDeclType;
|
||||
|
||||
accessSpecifier: Private | Protected | Public;
|
||||
/*Special member functions*/
|
||||
|
||||
conversionFunctionId: Operator conversionTypeId;
|
||||
|
||||
conversionTypeId: typeSpecifierSeq conversionDeclarator?;
|
||||
|
||||
conversionDeclarator: pointerOperator conversionDeclarator?;
|
||||
|
||||
constructorInitializer: Colon memInitializerList;
|
||||
|
||||
memInitializerList:
|
||||
memInitializer Ellipsis? (Comma memInitializer Ellipsis?)*;
|
||||
|
||||
memInitializer:
|
||||
meminitializerid (
|
||||
LeftParen expressionList? RightParen
|
||||
| bracedInitList
|
||||
);
|
||||
|
||||
meminitializerid: classOrDeclType | Identifier;
|
||||
/*Overloading*/
|
||||
|
||||
operatorFunctionId: Operator theOperator;
|
||||
|
||||
literalOperatorId:
|
||||
Operator (
|
||||
StringLiteral Identifier
|
||||
| UserDefinedStringLiteral
|
||||
);
|
||||
/*Templates*/
|
||||
|
||||
templateDeclaration:
|
||||
Template Less templateparameterList Greater declaration;
|
||||
|
||||
templateparameterList:
|
||||
templateParameter (Comma templateParameter)*;
|
||||
|
||||
templateParameter: typeParameter | parameterDeclaration;
|
||||
|
||||
typeParameter:
|
||||
(
|
||||
(Template Less templateparameterList Greater)? Class
|
||||
| Typename_
|
||||
) ((Ellipsis? Identifier?) | (Identifier? Assign theTypeId));
|
||||
|
||||
simpleTemplateId:
|
||||
templateName Less templateArgumentList? Greater;
|
||||
|
||||
templateId:
|
||||
simpleTemplateId
|
||||
| (operatorFunctionId | literalOperatorId) Less templateArgumentList? Greater;
|
||||
|
||||
templateName: Identifier;
|
||||
|
||||
templateArgumentList:
|
||||
templateArgument Ellipsis? (Comma templateArgument Ellipsis?)*;
|
||||
|
||||
templateArgument: theTypeId | constantExpression | idExpression;
|
||||
|
||||
typeNameSpecifier:
|
||||
Typename_ nestedNameSpecifier (
|
||||
Identifier
|
||||
| Template? simpleTemplateId
|
||||
);
|
||||
|
||||
explicitInstantiation: Extern? Template declaration;
|
||||
|
||||
explicitSpecialization: Template Less Greater declaration;
|
||||
/*Exception handling*/
|
||||
|
||||
tryBlock: Try compoundStatement handlerSeq;
|
||||
|
||||
functionTryBlock:
|
||||
Try constructorInitializer? compoundStatement handlerSeq;
|
||||
|
||||
handlerSeq: handler+;
|
||||
|
||||
handler:
|
||||
Catch LeftParen exceptionDeclaration RightParen compoundStatement;
|
||||
|
||||
exceptionDeclaration:
|
||||
attributeSpecifierSeq? typeSpecifierSeq (
|
||||
declarator
|
||||
| abstractDeclarator
|
||||
)?
|
||||
| Ellipsis;
|
||||
|
||||
throwExpression: Throw assignmentExpression?;
|
||||
|
||||
exceptionSpecification:
|
||||
dynamicExceptionSpecification
|
||||
| noeExceptSpecification;
|
||||
|
||||
dynamicExceptionSpecification:
|
||||
Throw LeftParen typeIdList? RightParen;
|
||||
|
||||
typeIdList: theTypeId Ellipsis? (Comma theTypeId Ellipsis?)*;
|
||||
|
||||
noeExceptSpecification:
|
||||
Noexcept LeftParen constantExpression RightParen
|
||||
| Noexcept;
|
||||
/*Preprocessing directives*/
|
||||
|
||||
/*Lexer*/
|
||||
|
||||
theOperator:
|
||||
New (LeftBracket RightBracket)?
|
||||
| Delete (LeftBracket RightBracket)?
|
||||
| Plus
|
||||
| Minus
|
||||
| Star
|
||||
| Div
|
||||
| Mod
|
||||
| Caret
|
||||
| And
|
||||
| Or
|
||||
| Tilde
|
||||
| Not
|
||||
| Assign
|
||||
| Greater
|
||||
| Less
|
||||
| GreaterEqual
|
||||
| PlusAssign
|
||||
| MinusAssign
|
||||
| StarAssign
|
||||
| ModAssign
|
||||
| XorAssign
|
||||
| AndAssign
|
||||
| OrAssign
|
||||
| Less Less
|
||||
| Greater Greater
|
||||
| RightShiftAssign
|
||||
| LeftShiftAssign
|
||||
| Equal
|
||||
| NotEqual
|
||||
| LessEqual
|
||||
| AndAnd
|
||||
| OrOr
|
||||
| PlusPlus
|
||||
| MinusMinus
|
||||
| Comma
|
||||
| ArrowStar
|
||||
| Arrow
|
||||
| LeftParen RightParen
|
||||
| LeftBracket RightBracket;
|
||||
|
||||
literal:
|
||||
IntegerLiteral
|
||||
| CharacterLiteral
|
||||
| FloatingLiteral
|
||||
| StringLiteral
|
||||
| BooleanLiteral
|
||||
| PointerLiteral
|
||||
| UserDefinedLiteral;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,264 @@
|
||||
IntegerLiteral=1
|
||||
CharacterLiteral=2
|
||||
FloatingLiteral=3
|
||||
StringLiteral=4
|
||||
BooleanLiteral=5
|
||||
PointerLiteral=6
|
||||
UserDefinedLiteral=7
|
||||
MultiLineMacro=8
|
||||
Directive=9
|
||||
Alignas=10
|
||||
Alignof=11
|
||||
Asm=12
|
||||
Auto=13
|
||||
Bool=14
|
||||
Break=15
|
||||
Case=16
|
||||
Catch=17
|
||||
Char=18
|
||||
Char16=19
|
||||
Char32=20
|
||||
Class=21
|
||||
Const=22
|
||||
Constexpr=23
|
||||
Const_cast=24
|
||||
Continue=25
|
||||
Decltype=26
|
||||
Default=27
|
||||
Delete=28
|
||||
Do=29
|
||||
Double=30
|
||||
Dynamic_cast=31
|
||||
Else=32
|
||||
Enum=33
|
||||
Explicit=34
|
||||
Export=35
|
||||
Extern=36
|
||||
False_=37
|
||||
Final=38
|
||||
Float=39
|
||||
For=40
|
||||
Friend=41
|
||||
Goto=42
|
||||
If=43
|
||||
Inline=44
|
||||
Int=45
|
||||
Long=46
|
||||
Mutable=47
|
||||
Namespace=48
|
||||
New=49
|
||||
Noexcept=50
|
||||
Nullptr=51
|
||||
Operator=52
|
||||
Override=53
|
||||
Private=54
|
||||
Protected=55
|
||||
Public=56
|
||||
Register=57
|
||||
Reinterpret_cast=58
|
||||
Return=59
|
||||
Short=60
|
||||
Signed=61
|
||||
Sizeof=62
|
||||
Static=63
|
||||
Static_assert=64
|
||||
Static_cast=65
|
||||
Struct=66
|
||||
Switch=67
|
||||
Template=68
|
||||
This=69
|
||||
Thread_local=70
|
||||
Throw=71
|
||||
True_=72
|
||||
Try=73
|
||||
Typedef=74
|
||||
Typeid_=75
|
||||
Typename_=76
|
||||
Union=77
|
||||
Unsigned=78
|
||||
Using=79
|
||||
Virtual=80
|
||||
Void=81
|
||||
Volatile=82
|
||||
Wchar=83
|
||||
While=84
|
||||
LeftParen=85
|
||||
RightParen=86
|
||||
LeftBracket=87
|
||||
RightBracket=88
|
||||
LeftBrace=89
|
||||
RightBrace=90
|
||||
Plus=91
|
||||
Minus=92
|
||||
Star=93
|
||||
Div=94
|
||||
Mod=95
|
||||
Caret=96
|
||||
And=97
|
||||
Or=98
|
||||
Tilde=99
|
||||
Not=100
|
||||
Assign=101
|
||||
Less=102
|
||||
Greater=103
|
||||
PlusAssign=104
|
||||
MinusAssign=105
|
||||
StarAssign=106
|
||||
DivAssign=107
|
||||
ModAssign=108
|
||||
XorAssign=109
|
||||
AndAssign=110
|
||||
OrAssign=111
|
||||
LeftShiftAssign=112
|
||||
RightShiftAssign=113
|
||||
Equal=114
|
||||
NotEqual=115
|
||||
LessEqual=116
|
||||
GreaterEqual=117
|
||||
AndAnd=118
|
||||
OrOr=119
|
||||
PlusPlus=120
|
||||
MinusMinus=121
|
||||
Comma=122
|
||||
ArrowStar=123
|
||||
Arrow=124
|
||||
Question=125
|
||||
Colon=126
|
||||
Doublecolon=127
|
||||
Semi=128
|
||||
Dot=129
|
||||
DotStar=130
|
||||
Ellipsis=131
|
||||
Identifier=132
|
||||
DecimalLiteral=133
|
||||
OctalLiteral=134
|
||||
HexadecimalLiteral=135
|
||||
BinaryLiteral=136
|
||||
Integersuffix=137
|
||||
UserDefinedIntegerLiteral=138
|
||||
UserDefinedFloatingLiteral=139
|
||||
UserDefinedStringLiteral=140
|
||||
UserDefinedCharacterLiteral=141
|
||||
Whitespace=142
|
||||
Newline=143
|
||||
BlockComment=144
|
||||
LineComment=145
|
||||
'alignas'=10
|
||||
'alignof'=11
|
||||
'asm'=12
|
||||
'auto'=13
|
||||
'bool'=14
|
||||
'break'=15
|
||||
'case'=16
|
||||
'catch'=17
|
||||
'char'=18
|
||||
'char16_t'=19
|
||||
'char32_t'=20
|
||||
'class'=21
|
||||
'const'=22
|
||||
'constexpr'=23
|
||||
'const_cast'=24
|
||||
'continue'=25
|
||||
'decltype'=26
|
||||
'default'=27
|
||||
'delete'=28
|
||||
'do'=29
|
||||
'double'=30
|
||||
'dynamic_cast'=31
|
||||
'else'=32
|
||||
'enum'=33
|
||||
'explicit'=34
|
||||
'export'=35
|
||||
'extern'=36
|
||||
'false'=37
|
||||
'final'=38
|
||||
'float'=39
|
||||
'for'=40
|
||||
'friend'=41
|
||||
'goto'=42
|
||||
'if'=43
|
||||
'inline'=44
|
||||
'int'=45
|
||||
'long'=46
|
||||
'mutable'=47
|
||||
'namespace'=48
|
||||
'new'=49
|
||||
'noexcept'=50
|
||||
'nullptr'=51
|
||||
'operator'=52
|
||||
'override'=53
|
||||
'private'=54
|
||||
'protected'=55
|
||||
'public'=56
|
||||
'register'=57
|
||||
'reinterpret_cast'=58
|
||||
'return'=59
|
||||
'short'=60
|
||||
'signed'=61
|
||||
'sizeof'=62
|
||||
'static'=63
|
||||
'static_assert'=64
|
||||
'static_cast'=65
|
||||
'struct'=66
|
||||
'switch'=67
|
||||
'template'=68
|
||||
'this'=69
|
||||
'thread_local'=70
|
||||
'throw'=71
|
||||
'true'=72
|
||||
'try'=73
|
||||
'typedef'=74
|
||||
'typeid'=75
|
||||
'typename'=76
|
||||
'union'=77
|
||||
'unsigned'=78
|
||||
'using'=79
|
||||
'virtual'=80
|
||||
'void'=81
|
||||
'volatile'=82
|
||||
'wchar_t'=83
|
||||
'while'=84
|
||||
'('=85
|
||||
')'=86
|
||||
'['=87
|
||||
']'=88
|
||||
'{'=89
|
||||
'}'=90
|
||||
'+'=91
|
||||
'-'=92
|
||||
'*'=93
|
||||
'/'=94
|
||||
'%'=95
|
||||
'^'=96
|
||||
'&'=97
|
||||
'|'=98
|
||||
'~'=99
|
||||
'='=101
|
||||
'<'=102
|
||||
'>'=103
|
||||
'+='=104
|
||||
'-='=105
|
||||
'*='=106
|
||||
'/='=107
|
||||
'%='=108
|
||||
'^='=109
|
||||
'&='=110
|
||||
'|='=111
|
||||
'<<='=112
|
||||
'>>='=113
|
||||
'=='=114
|
||||
'!='=115
|
||||
'<='=116
|
||||
'>='=117
|
||||
'++'=120
|
||||
'--'=121
|
||||
','=122
|
||||
'->*'=123
|
||||
'->'=124
|
||||
'?'=125
|
||||
':'=126
|
||||
'::'=127
|
||||
';'=128
|
||||
'.'=129
|
||||
'.*'=130
|
||||
'...'=131
|
||||
@@ -0,0 +1,525 @@
|
||||
/**
|
||||
* Kotlin lexical grammar in ANTLR4 notation
|
||||
*/
|
||||
|
||||
lexer grammar KotlinLexer;
|
||||
|
||||
import UnicodeClasses;
|
||||
|
||||
// SECTION: lexicalGeneral
|
||||
|
||||
ShebangLine
|
||||
: '#!' ~[\r\n]*
|
||||
;
|
||||
|
||||
DelimitedComment
|
||||
: '/*' ( DelimitedComment | . )*? '*/'
|
||||
-> channel(HIDDEN)
|
||||
;
|
||||
|
||||
LineComment
|
||||
: '//' ~[\r\n]*
|
||||
-> channel(HIDDEN)
|
||||
;
|
||||
|
||||
WS
|
||||
: [\u0020\u0009\u000C]
|
||||
-> channel(HIDDEN)
|
||||
;
|
||||
|
||||
NL: '\n' | '\r' '\n'?;
|
||||
|
||||
fragment Hidden: DelimitedComment | LineComment | WS;
|
||||
|
||||
// SECTION: separatorsAndOperations
|
||||
|
||||
RESERVED: '...';
|
||||
DOT: '.';
|
||||
COMMA: ',';
|
||||
LPAREN: '(' -> pushMode(Inside);
|
||||
RPAREN: ')';
|
||||
LSQUARE: '[' -> pushMode(Inside);
|
||||
RSQUARE: ']';
|
||||
LCURL: '{' -> pushMode(DEFAULT_MODE);
|
||||
/*
|
||||
* When using another programming language (not Java) to generate a parser,
|
||||
* please replace this code with the corresponding code of a programming language you are using.
|
||||
*/
|
||||
RCURL: '}' { if (!_modeStack.isEmpty()) { popMode(); } };
|
||||
MULT: '*';
|
||||
MOD: '%';
|
||||
DIV: '/';
|
||||
ADD: '+';
|
||||
SUB: '-';
|
||||
INCR: '++';
|
||||
DECR: '--';
|
||||
CONJ: '&&';
|
||||
DISJ: '||';
|
||||
EXCL_WS: '!' Hidden;
|
||||
EXCL_NO_WS: '!';
|
||||
COLON: ':';
|
||||
SEMICOLON: ';';
|
||||
ASSIGNMENT: '=';
|
||||
ADD_ASSIGNMENT: '+=';
|
||||
SUB_ASSIGNMENT: '-=';
|
||||
MULT_ASSIGNMENT: '*=';
|
||||
DIV_ASSIGNMENT: '/=';
|
||||
MOD_ASSIGNMENT: '%=';
|
||||
ARROW: '->';
|
||||
DOUBLE_ARROW: '=>';
|
||||
RANGE: '..';
|
||||
COLONCOLON: '::';
|
||||
DOUBLE_SEMICOLON: ';;';
|
||||
HASH: '#';
|
||||
AT_NO_WS: '@';
|
||||
AT_POST_WS: '@' (Hidden | NL);
|
||||
AT_PRE_WS: (Hidden | NL) '@' ;
|
||||
AT_BOTH_WS: (Hidden | NL) '@' (Hidden | NL);
|
||||
QUEST_WS: '?' Hidden;
|
||||
QUEST_NO_WS: '?';
|
||||
LANGLE: '<';
|
||||
RANGLE: '>';
|
||||
LE: '<=';
|
||||
GE: '>=';
|
||||
EXCL_EQ: '!=';
|
||||
EXCL_EQEQ: '!==';
|
||||
AS_SAFE: 'as?';
|
||||
EQEQ: '==';
|
||||
EQEQEQ: '===';
|
||||
SINGLE_QUOTE: '\'';
|
||||
|
||||
// SECTION: keywords
|
||||
|
||||
RETURN_AT: 'return@' Identifier;
|
||||
CONTINUE_AT: 'continue@' Identifier;
|
||||
BREAK_AT: 'break@' Identifier;
|
||||
|
||||
THIS_AT: 'this@' Identifier;
|
||||
SUPER_AT: 'super@' Identifier;
|
||||
|
||||
FILE: 'file';
|
||||
FIELD: 'field';
|
||||
PROPERTY: 'property';
|
||||
GET: 'get';
|
||||
SET: 'set';
|
||||
RECEIVER: 'receiver';
|
||||
PARAM: 'param';
|
||||
SETPARAM: 'setparam';
|
||||
DELEGATE: 'delegate';
|
||||
|
||||
PACKAGE: 'package';
|
||||
IMPORT: 'import';
|
||||
CLASS: 'class';
|
||||
INTERFACE: 'interface';
|
||||
FUN: 'fun';
|
||||
OBJECT: 'object';
|
||||
VAL: 'val';
|
||||
VAR: 'var';
|
||||
TYPE_ALIAS: 'typealias';
|
||||
CONSTRUCTOR: 'constructor';
|
||||
BY: 'by';
|
||||
COMPANION: 'companion';
|
||||
INIT: 'init';
|
||||
THIS: 'this';
|
||||
SUPER: 'super';
|
||||
TYPEOF: 'typeof';
|
||||
WHERE: 'where';
|
||||
IF: 'if';
|
||||
ELSE: 'else';
|
||||
WHEN: 'when';
|
||||
TRY: 'try';
|
||||
CATCH: 'catch';
|
||||
FINALLY: 'finally';
|
||||
FOR: 'for';
|
||||
DO: 'do';
|
||||
WHILE: 'while';
|
||||
THROW: 'throw';
|
||||
RETURN: 'return';
|
||||
CONTINUE: 'continue';
|
||||
BREAK: 'break';
|
||||
AS: 'as';
|
||||
IS: 'is';
|
||||
IN: 'in';
|
||||
NOT_IS: '!is' (Hidden | NL);
|
||||
NOT_IN: '!in' (Hidden | NL);
|
||||
OUT: 'out';
|
||||
DYNAMIC: 'dynamic';
|
||||
|
||||
// SECTION: lexicalModifiers
|
||||
|
||||
PUBLIC: 'public';
|
||||
PRIVATE: 'private';
|
||||
PROTECTED: 'protected';
|
||||
INTERNAL: 'internal';
|
||||
ENUM: 'enum';
|
||||
SEALED: 'sealed';
|
||||
ANNOTATION: 'annotation';
|
||||
DATA: 'data';
|
||||
INNER: 'inner';
|
||||
VALUE: 'value';
|
||||
TAILREC: 'tailrec';
|
||||
OPERATOR: 'operator';
|
||||
INLINE: 'inline';
|
||||
INFIX: 'infix';
|
||||
EXTERNAL: 'external';
|
||||
SUSPEND: 'suspend';
|
||||
OVERRIDE: 'override';
|
||||
ABSTRACT: 'abstract';
|
||||
FINAL: 'final';
|
||||
OPEN: 'open';
|
||||
CONST: 'const';
|
||||
LATEINIT: 'lateinit';
|
||||
VARARG: 'vararg';
|
||||
NOINLINE: 'noinline';
|
||||
CROSSINLINE: 'crossinline';
|
||||
REIFIED: 'reified';
|
||||
EXPECT: 'expect';
|
||||
ACTUAL: 'actual';
|
||||
|
||||
// SECTION: literals
|
||||
|
||||
fragment DecDigit: '0'..'9';
|
||||
fragment DecDigitNoZero: '1'..'9';
|
||||
fragment DecDigitOrSeparator: DecDigit | '_';
|
||||
|
||||
fragment DecDigits
|
||||
: DecDigit DecDigitOrSeparator* DecDigit
|
||||
| DecDigit
|
||||
;
|
||||
|
||||
fragment DoubleExponent: [eE] [+-]? DecDigits;
|
||||
|
||||
RealLiteral
|
||||
: FloatLiteral
|
||||
| DoubleLiteral
|
||||
;
|
||||
|
||||
FloatLiteral
|
||||
: DoubleLiteral [fF]
|
||||
| DecDigits [fF]
|
||||
;
|
||||
|
||||
DoubleLiteral
|
||||
: DecDigits? '.' DecDigits DoubleExponent?
|
||||
| DecDigits DoubleExponent
|
||||
;
|
||||
|
||||
IntegerLiteral
|
||||
: DecDigitNoZero DecDigitOrSeparator* DecDigit
|
||||
| DecDigit
|
||||
;
|
||||
|
||||
fragment HexDigit: [0-9a-fA-F];
|
||||
fragment HexDigitOrSeparator: HexDigit | '_';
|
||||
|
||||
HexLiteral
|
||||
: '0' [xX] HexDigit HexDigitOrSeparator* HexDigit
|
||||
| '0' [xX] HexDigit
|
||||
;
|
||||
|
||||
fragment BinDigit: [01];
|
||||
fragment BinDigitOrSeparator: BinDigit | '_';
|
||||
|
||||
BinLiteral
|
||||
: '0' [bB] BinDigit BinDigitOrSeparator* BinDigit
|
||||
| '0' [bB] BinDigit
|
||||
;
|
||||
|
||||
UnsignedLiteral
|
||||
: (IntegerLiteral | HexLiteral | BinLiteral) [uU] [lL]?
|
||||
;
|
||||
|
||||
LongLiteral
|
||||
: (IntegerLiteral | HexLiteral | BinLiteral) [lL]
|
||||
;
|
||||
|
||||
BooleanLiteral: 'true'| 'false';
|
||||
|
||||
NullLiteral: 'null';
|
||||
|
||||
CharacterLiteral
|
||||
: '\'' (EscapeSeq | ~[\n\r'\\]) '\''
|
||||
;
|
||||
|
||||
// SECTION: lexicalIdentifiers
|
||||
|
||||
fragment UnicodeDigit: UNICODE_CLASS_ND;
|
||||
|
||||
Identifier
|
||||
: (Letter | '_') (Letter | '_' | UnicodeDigit)*
|
||||
| '`' ~([\r\n] | '`')+ '`'
|
||||
;
|
||||
|
||||
IdentifierOrSoftKey
|
||||
: Identifier
|
||||
/* Soft keywords */
|
||||
| ABSTRACT
|
||||
| ANNOTATION
|
||||
| BY
|
||||
| CATCH
|
||||
| COMPANION
|
||||
| CONSTRUCTOR
|
||||
| CROSSINLINE
|
||||
| DATA
|
||||
| DYNAMIC
|
||||
| ENUM
|
||||
| EXTERNAL
|
||||
| FINAL
|
||||
| FINALLY
|
||||
| IMPORT
|
||||
| INFIX
|
||||
| INIT
|
||||
| INLINE
|
||||
| INNER
|
||||
| INTERNAL
|
||||
| LATEINIT
|
||||
| NOINLINE
|
||||
| OPEN
|
||||
| OPERATOR
|
||||
| OUT
|
||||
| OVERRIDE
|
||||
| PRIVATE
|
||||
| PROTECTED
|
||||
| PUBLIC
|
||||
| REIFIED
|
||||
| SEALED
|
||||
| TAILREC
|
||||
| VARARG
|
||||
| WHERE
|
||||
| GET
|
||||
| SET
|
||||
| FIELD
|
||||
| PROPERTY
|
||||
| RECEIVER
|
||||
| PARAM
|
||||
| SETPARAM
|
||||
| DELEGATE
|
||||
| FILE
|
||||
| EXPECT
|
||||
| ACTUAL
|
||||
| VALUE
|
||||
/* Strong keywords */
|
||||
| CONST
|
||||
| SUSPEND
|
||||
;
|
||||
|
||||
FieldIdentifier
|
||||
: '$' IdentifierOrSoftKey
|
||||
;
|
||||
|
||||
fragment UniCharacterLiteral
|
||||
: '\\' 'u' HexDigit HexDigit HexDigit HexDigit
|
||||
;
|
||||
|
||||
fragment EscapedIdentifier
|
||||
: '\\' ('t' | 'b' | 'r' | 'n' | '\'' | '"' | '\\' | '$')
|
||||
;
|
||||
|
||||
fragment EscapeSeq
|
||||
: UniCharacterLiteral
|
||||
| EscapedIdentifier
|
||||
;
|
||||
|
||||
// SECTION: characters
|
||||
|
||||
fragment Letter
|
||||
: UNICODE_CLASS_LU
|
||||
| UNICODE_CLASS_LL
|
||||
| UNICODE_CLASS_LT
|
||||
| UNICODE_CLASS_LM
|
||||
| UNICODE_CLASS_LO
|
||||
;
|
||||
|
||||
// SECTION: strings
|
||||
|
||||
QUOTE_OPEN: '"' -> pushMode(LineString);
|
||||
|
||||
TRIPLE_QUOTE_OPEN: '"""' -> pushMode(MultiLineString);
|
||||
|
||||
mode LineString;
|
||||
|
||||
QUOTE_CLOSE
|
||||
: '"' -> popMode
|
||||
;
|
||||
|
||||
LineStrRef
|
||||
: FieldIdentifier
|
||||
;
|
||||
|
||||
LineStrText
|
||||
: ~('\\' | '"' | '$')+ | '$'
|
||||
;
|
||||
|
||||
LineStrEscapedChar
|
||||
: EscapedIdentifier
|
||||
| UniCharacterLiteral
|
||||
;
|
||||
|
||||
LineStrExprStart
|
||||
: '${' -> pushMode(DEFAULT_MODE)
|
||||
;
|
||||
|
||||
mode MultiLineString;
|
||||
|
||||
TRIPLE_QUOTE_CLOSE
|
||||
: MultiLineStringQuote? '"""' -> popMode
|
||||
;
|
||||
|
||||
MultiLineStringQuote
|
||||
: '"'+
|
||||
;
|
||||
|
||||
MultiLineStrRef
|
||||
: FieldIdentifier
|
||||
;
|
||||
|
||||
MultiLineStrText
|
||||
: ~('"' | '$')+ | '$'
|
||||
;
|
||||
|
||||
MultiLineStrExprStart
|
||||
: '${' -> pushMode(DEFAULT_MODE)
|
||||
;
|
||||
|
||||
// SECTION: inside
|
||||
|
||||
mode Inside;
|
||||
|
||||
Inside_RPAREN: RPAREN -> popMode, type(RPAREN);
|
||||
Inside_RSQUARE: RSQUARE -> popMode, type(RSQUARE);
|
||||
Inside_LPAREN: LPAREN -> pushMode(Inside), type(LPAREN);
|
||||
Inside_LSQUARE: LSQUARE -> pushMode(Inside), type(LSQUARE);
|
||||
Inside_LCURL: LCURL -> pushMode(DEFAULT_MODE), type(LCURL);
|
||||
Inside_RCURL: RCURL -> popMode, type(RCURL);
|
||||
|
||||
Inside_DOT: DOT -> type(DOT);
|
||||
Inside_COMMA: COMMA -> type(COMMA);
|
||||
Inside_MULT: MULT -> type(MULT);
|
||||
Inside_MOD: MOD -> type(MOD);
|
||||
Inside_DIV: DIV -> type(DIV);
|
||||
Inside_ADD: ADD -> type(ADD);
|
||||
Inside_SUB: SUB -> type(SUB);
|
||||
Inside_INCR: INCR -> type(INCR);
|
||||
Inside_DECR: DECR -> type(DECR);
|
||||
Inside_CONJ: CONJ -> type(CONJ);
|
||||
Inside_DISJ: DISJ -> type(DISJ);
|
||||
Inside_EXCL_WS: '!' (Hidden|NL) -> type(EXCL_WS);
|
||||
Inside_EXCL_NO_WS: EXCL_NO_WS -> type(EXCL_NO_WS);
|
||||
Inside_COLON: COLON -> type(COLON);
|
||||
Inside_SEMICOLON: SEMICOLON -> type(SEMICOLON);
|
||||
Inside_ASSIGNMENT: ASSIGNMENT -> type(ASSIGNMENT);
|
||||
Inside_ADD_ASSIGNMENT: ADD_ASSIGNMENT -> type(ADD_ASSIGNMENT);
|
||||
Inside_SUB_ASSIGNMENT: SUB_ASSIGNMENT -> type(SUB_ASSIGNMENT);
|
||||
Inside_MULT_ASSIGNMENT: MULT_ASSIGNMENT -> type(MULT_ASSIGNMENT);
|
||||
Inside_DIV_ASSIGNMENT: DIV_ASSIGNMENT -> type(DIV_ASSIGNMENT);
|
||||
Inside_MOD_ASSIGNMENT: MOD_ASSIGNMENT -> type(MOD_ASSIGNMENT);
|
||||
Inside_ARROW: ARROW -> type(ARROW);
|
||||
Inside_DOUBLE_ARROW: DOUBLE_ARROW -> type(DOUBLE_ARROW);
|
||||
Inside_RANGE: RANGE -> type(RANGE);
|
||||
Inside_RESERVED: RESERVED -> type(RESERVED);
|
||||
Inside_COLONCOLON: COLONCOLON -> type(COLONCOLON);
|
||||
Inside_DOUBLE_SEMICOLON: DOUBLE_SEMICOLON -> type(DOUBLE_SEMICOLON);
|
||||
Inside_HASH: HASH -> type(HASH);
|
||||
Inside_AT_NO_WS: AT_NO_WS -> type(AT_NO_WS);
|
||||
Inside_AT_POST_WS: AT_POST_WS -> type(AT_POST_WS);
|
||||
Inside_AT_PRE_WS: AT_PRE_WS -> type(AT_PRE_WS);
|
||||
Inside_AT_BOTH_WS: AT_BOTH_WS -> type(AT_BOTH_WS);
|
||||
Inside_QUEST_WS: '?' (Hidden | NL) -> type(QUEST_WS);
|
||||
Inside_QUEST_NO_WS: QUEST_NO_WS -> type(QUEST_NO_WS);
|
||||
Inside_LANGLE: LANGLE -> type(LANGLE);
|
||||
Inside_RANGLE: RANGLE -> type(RANGLE);
|
||||
Inside_LE: LE -> type(LE);
|
||||
Inside_GE: GE -> type(GE);
|
||||
Inside_EXCL_EQ: EXCL_EQ -> type(EXCL_EQ);
|
||||
Inside_EXCL_EQEQ: EXCL_EQEQ -> type(EXCL_EQEQ);
|
||||
Inside_IS: IS -> type(IS);
|
||||
Inside_NOT_IS: NOT_IS -> type(NOT_IS);
|
||||
Inside_NOT_IN: NOT_IN -> type(NOT_IN);
|
||||
Inside_AS: AS -> type(AS);
|
||||
Inside_AS_SAFE: AS_SAFE -> type(AS_SAFE);
|
||||
Inside_EQEQ: EQEQ -> type(EQEQ);
|
||||
Inside_EQEQEQ: EQEQEQ -> type(EQEQEQ);
|
||||
Inside_SINGLE_QUOTE: SINGLE_QUOTE -> type(SINGLE_QUOTE);
|
||||
Inside_QUOTE_OPEN: QUOTE_OPEN -> pushMode(LineString), type(QUOTE_OPEN);
|
||||
Inside_TRIPLE_QUOTE_OPEN: TRIPLE_QUOTE_OPEN -> pushMode(MultiLineString), type(TRIPLE_QUOTE_OPEN);
|
||||
|
||||
Inside_VAL: VAL -> type(VAL);
|
||||
Inside_VAR: VAR -> type(VAR);
|
||||
Inside_FUN: FUN -> type(FUN);
|
||||
Inside_OBJECT: OBJECT -> type(OBJECT);
|
||||
Inside_SUPER: SUPER -> type(SUPER);
|
||||
Inside_IN: IN -> type(IN);
|
||||
Inside_OUT: OUT -> type(OUT);
|
||||
Inside_FIELD: FIELD -> type(FIELD);
|
||||
Inside_FILE: FILE -> type(FILE);
|
||||
Inside_PROPERTY: PROPERTY -> type(PROPERTY);
|
||||
Inside_GET: GET -> type(GET);
|
||||
Inside_SET: SET -> type(SET);
|
||||
Inside_RECEIVER: RECEIVER -> type(RECEIVER);
|
||||
Inside_PARAM: PARAM -> type(PARAM);
|
||||
Inside_SETPARAM: SETPARAM -> type(SETPARAM);
|
||||
Inside_DELEGATE: DELEGATE -> type(DELEGATE);
|
||||
Inside_THROW: THROW -> type(THROW);
|
||||
Inside_RETURN: RETURN -> type(RETURN);
|
||||
Inside_CONTINUE: CONTINUE -> type(CONTINUE);
|
||||
Inside_BREAK: BREAK -> type(BREAK);
|
||||
Inside_RETURN_AT: RETURN_AT -> type(RETURN_AT);
|
||||
Inside_CONTINUE_AT: CONTINUE_AT -> type(CONTINUE_AT);
|
||||
Inside_BREAK_AT: BREAK_AT -> type(BREAK_AT);
|
||||
Inside_IF: IF -> type(IF);
|
||||
Inside_ELSE: ELSE -> type(ELSE);
|
||||
Inside_WHEN: WHEN -> type(WHEN);
|
||||
Inside_TRY: TRY -> type(TRY);
|
||||
Inside_CATCH: CATCH -> type(CATCH);
|
||||
Inside_FINALLY: FINALLY -> type(FINALLY);
|
||||
Inside_FOR: FOR -> type(FOR);
|
||||
Inside_DO: DO -> type(DO);
|
||||
Inside_WHILE: WHILE -> type(WHILE);
|
||||
|
||||
Inside_PUBLIC: PUBLIC -> type(PUBLIC);
|
||||
Inside_PRIVATE: PRIVATE -> type(PRIVATE);
|
||||
Inside_PROTECTED: PROTECTED -> type(PROTECTED);
|
||||
Inside_INTERNAL: INTERNAL -> type(INTERNAL);
|
||||
Inside_ENUM: ENUM -> type(ENUM);
|
||||
Inside_SEALED: SEALED -> type(SEALED);
|
||||
Inside_ANNOTATION: ANNOTATION -> type(ANNOTATION);
|
||||
Inside_DATA: DATA -> type(DATA);
|
||||
Inside_INNER: INNER -> type(INNER);
|
||||
Inside_VALUE: VALUE -> type(VALUE);
|
||||
Inside_TAILREC: TAILREC -> type(TAILREC);
|
||||
Inside_OPERATOR: OPERATOR -> type(OPERATOR);
|
||||
Inside_INLINE: INLINE -> type(INLINE);
|
||||
Inside_INFIX: INFIX -> type(INFIX);
|
||||
Inside_EXTERNAL: EXTERNAL -> type(EXTERNAL);
|
||||
Inside_SUSPEND: SUSPEND -> type(SUSPEND);
|
||||
Inside_OVERRIDE: OVERRIDE -> type(OVERRIDE);
|
||||
Inside_ABSTRACT: ABSTRACT -> type(ABSTRACT);
|
||||
Inside_FINAL: FINAL -> type(FINAL);
|
||||
Inside_OPEN: OPEN -> type(OPEN);
|
||||
Inside_CONST: CONST -> type(CONST);
|
||||
Inside_LATEINIT: LATEINIT -> type(LATEINIT);
|
||||
Inside_VARARG: VARARG -> type(VARARG);
|
||||
Inside_NOINLINE: NOINLINE -> type(NOINLINE);
|
||||
Inside_CROSSINLINE: CROSSINLINE -> type(CROSSINLINE);
|
||||
Inside_REIFIED: REIFIED -> type(REIFIED);
|
||||
Inside_EXPECT: EXPECT -> type(EXPECT);
|
||||
Inside_ACTUAL: ACTUAL -> type(ACTUAL);
|
||||
|
||||
Inside_BooleanLiteral: BooleanLiteral -> type(BooleanLiteral);
|
||||
Inside_IntegerLiteral: IntegerLiteral -> type(IntegerLiteral);
|
||||
Inside_HexLiteral: HexLiteral -> type(HexLiteral);
|
||||
Inside_BinLiteral: BinLiteral -> type(BinLiteral);
|
||||
Inside_CharacterLiteral: CharacterLiteral -> type(CharacterLiteral);
|
||||
Inside_RealLiteral: RealLiteral -> type(RealLiteral);
|
||||
Inside_NullLiteral: NullLiteral -> type(NullLiteral);
|
||||
Inside_LongLiteral: LongLiteral -> type(LongLiteral);
|
||||
Inside_UnsignedLiteral: UnsignedLiteral -> type(UnsignedLiteral);
|
||||
|
||||
Inside_Identifier: Identifier -> type(Identifier);
|
||||
Inside_Comment: (LineComment | DelimitedComment) -> channel(HIDDEN);
|
||||
Inside_WS: WS -> channel(HIDDEN);
|
||||
Inside_NL: NL -> channel(HIDDEN);
|
||||
|
||||
mode DEFAULT_MODE;
|
||||
|
||||
ErrorCharacter: .;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,290 @@
|
||||
ShebangLine=1
|
||||
DelimitedComment=2
|
||||
LineComment=3
|
||||
WS=4
|
||||
NL=5
|
||||
RESERVED=6
|
||||
DOT=7
|
||||
COMMA=8
|
||||
LPAREN=9
|
||||
RPAREN=10
|
||||
LSQUARE=11
|
||||
RSQUARE=12
|
||||
LCURL=13
|
||||
RCURL=14
|
||||
MULT=15
|
||||
MOD=16
|
||||
DIV=17
|
||||
ADD=18
|
||||
SUB=19
|
||||
INCR=20
|
||||
DECR=21
|
||||
CONJ=22
|
||||
DISJ=23
|
||||
EXCL_WS=24
|
||||
EXCL_NO_WS=25
|
||||
COLON=26
|
||||
SEMICOLON=27
|
||||
ASSIGNMENT=28
|
||||
ADD_ASSIGNMENT=29
|
||||
SUB_ASSIGNMENT=30
|
||||
MULT_ASSIGNMENT=31
|
||||
DIV_ASSIGNMENT=32
|
||||
MOD_ASSIGNMENT=33
|
||||
ARROW=34
|
||||
DOUBLE_ARROW=35
|
||||
RANGE=36
|
||||
COLONCOLON=37
|
||||
DOUBLE_SEMICOLON=38
|
||||
HASH=39
|
||||
AT_NO_WS=40
|
||||
AT_POST_WS=41
|
||||
AT_PRE_WS=42
|
||||
AT_BOTH_WS=43
|
||||
QUEST_WS=44
|
||||
QUEST_NO_WS=45
|
||||
LANGLE=46
|
||||
RANGLE=47
|
||||
LE=48
|
||||
GE=49
|
||||
EXCL_EQ=50
|
||||
EXCL_EQEQ=51
|
||||
AS_SAFE=52
|
||||
EQEQ=53
|
||||
EQEQEQ=54
|
||||
SINGLE_QUOTE=55
|
||||
RETURN_AT=56
|
||||
CONTINUE_AT=57
|
||||
BREAK_AT=58
|
||||
THIS_AT=59
|
||||
SUPER_AT=60
|
||||
FILE=61
|
||||
FIELD=62
|
||||
PROPERTY=63
|
||||
GET=64
|
||||
SET=65
|
||||
RECEIVER=66
|
||||
PARAM=67
|
||||
SETPARAM=68
|
||||
DELEGATE=69
|
||||
PACKAGE=70
|
||||
IMPORT=71
|
||||
CLASS=72
|
||||
INTERFACE=73
|
||||
FUN=74
|
||||
OBJECT=75
|
||||
VAL=76
|
||||
VAR=77
|
||||
TYPE_ALIAS=78
|
||||
CONSTRUCTOR=79
|
||||
BY=80
|
||||
COMPANION=81
|
||||
INIT=82
|
||||
THIS=83
|
||||
SUPER=84
|
||||
TYPEOF=85
|
||||
WHERE=86
|
||||
IF=87
|
||||
ELSE=88
|
||||
WHEN=89
|
||||
TRY=90
|
||||
CATCH=91
|
||||
FINALLY=92
|
||||
FOR=93
|
||||
DO=94
|
||||
WHILE=95
|
||||
THROW=96
|
||||
RETURN=97
|
||||
CONTINUE=98
|
||||
BREAK=99
|
||||
AS=100
|
||||
IS=101
|
||||
IN=102
|
||||
NOT_IS=103
|
||||
NOT_IN=104
|
||||
OUT=105
|
||||
DYNAMIC=106
|
||||
PUBLIC=107
|
||||
PRIVATE=108
|
||||
PROTECTED=109
|
||||
INTERNAL=110
|
||||
ENUM=111
|
||||
SEALED=112
|
||||
ANNOTATION=113
|
||||
DATA=114
|
||||
INNER=115
|
||||
VALUE=116
|
||||
TAILREC=117
|
||||
OPERATOR=118
|
||||
INLINE=119
|
||||
INFIX=120
|
||||
EXTERNAL=121
|
||||
SUSPEND=122
|
||||
OVERRIDE=123
|
||||
ABSTRACT=124
|
||||
FINAL=125
|
||||
OPEN=126
|
||||
CONST=127
|
||||
LATEINIT=128
|
||||
VARARG=129
|
||||
NOINLINE=130
|
||||
CROSSINLINE=131
|
||||
REIFIED=132
|
||||
EXPECT=133
|
||||
ACTUAL=134
|
||||
RealLiteral=135
|
||||
FloatLiteral=136
|
||||
DoubleLiteral=137
|
||||
IntegerLiteral=138
|
||||
HexLiteral=139
|
||||
BinLiteral=140
|
||||
UnsignedLiteral=141
|
||||
LongLiteral=142
|
||||
BooleanLiteral=143
|
||||
NullLiteral=144
|
||||
CharacterLiteral=145
|
||||
Identifier=146
|
||||
IdentifierOrSoftKey=147
|
||||
FieldIdentifier=148
|
||||
QUOTE_OPEN=149
|
||||
TRIPLE_QUOTE_OPEN=150
|
||||
UNICODE_CLASS_LL=151
|
||||
UNICODE_CLASS_LM=152
|
||||
UNICODE_CLASS_LO=153
|
||||
UNICODE_CLASS_LT=154
|
||||
UNICODE_CLASS_LU=155
|
||||
UNICODE_CLASS_ND=156
|
||||
UNICODE_CLASS_NL=157
|
||||
QUOTE_CLOSE=158
|
||||
LineStrRef=159
|
||||
LineStrText=160
|
||||
LineStrEscapedChar=161
|
||||
LineStrExprStart=162
|
||||
TRIPLE_QUOTE_CLOSE=163
|
||||
MultiLineStringQuote=164
|
||||
MultiLineStrRef=165
|
||||
MultiLineStrText=166
|
||||
MultiLineStrExprStart=167
|
||||
Inside_Comment=168
|
||||
Inside_WS=169
|
||||
Inside_NL=170
|
||||
ErrorCharacter=171
|
||||
'...'=6
|
||||
'.'=7
|
||||
','=8
|
||||
'('=9
|
||||
')'=10
|
||||
'['=11
|
||||
']'=12
|
||||
'{'=13
|
||||
'}'=14
|
||||
'*'=15
|
||||
'%'=16
|
||||
'/'=17
|
||||
'+'=18
|
||||
'-'=19
|
||||
'++'=20
|
||||
'--'=21
|
||||
'&&'=22
|
||||
'||'=23
|
||||
'!'=25
|
||||
':'=26
|
||||
';'=27
|
||||
'='=28
|
||||
'+='=29
|
||||
'-='=30
|
||||
'*='=31
|
||||
'/='=32
|
||||
'%='=33
|
||||
'->'=34
|
||||
'=>'=35
|
||||
'..'=36
|
||||
'::'=37
|
||||
';;'=38
|
||||
'#'=39
|
||||
'@'=40
|
||||
'?'=45
|
||||
'<'=46
|
||||
'>'=47
|
||||
'<='=48
|
||||
'>='=49
|
||||
'!='=50
|
||||
'!=='=51
|
||||
'as?'=52
|
||||
'=='=53
|
||||
'==='=54
|
||||
'\''=55
|
||||
'file'=61
|
||||
'field'=62
|
||||
'property'=63
|
||||
'get'=64
|
||||
'set'=65
|
||||
'receiver'=66
|
||||
'param'=67
|
||||
'setparam'=68
|
||||
'delegate'=69
|
||||
'package'=70
|
||||
'import'=71
|
||||
'class'=72
|
||||
'interface'=73
|
||||
'fun'=74
|
||||
'object'=75
|
||||
'val'=76
|
||||
'var'=77
|
||||
'typealias'=78
|
||||
'constructor'=79
|
||||
'by'=80
|
||||
'companion'=81
|
||||
'init'=82
|
||||
'this'=83
|
||||
'super'=84
|
||||
'typeof'=85
|
||||
'where'=86
|
||||
'if'=87
|
||||
'else'=88
|
||||
'when'=89
|
||||
'try'=90
|
||||
'catch'=91
|
||||
'finally'=92
|
||||
'for'=93
|
||||
'do'=94
|
||||
'while'=95
|
||||
'throw'=96
|
||||
'return'=97
|
||||
'continue'=98
|
||||
'break'=99
|
||||
'as'=100
|
||||
'is'=101
|
||||
'in'=102
|
||||
'out'=105
|
||||
'dynamic'=106
|
||||
'public'=107
|
||||
'private'=108
|
||||
'protected'=109
|
||||
'internal'=110
|
||||
'enum'=111
|
||||
'sealed'=112
|
||||
'annotation'=113
|
||||
'data'=114
|
||||
'inner'=115
|
||||
'value'=116
|
||||
'tailrec'=117
|
||||
'operator'=118
|
||||
'inline'=119
|
||||
'infix'=120
|
||||
'external'=121
|
||||
'suspend'=122
|
||||
'override'=123
|
||||
'abstract'=124
|
||||
'final'=125
|
||||
'open'=126
|
||||
'const'=127
|
||||
'lateinit'=128
|
||||
'vararg'=129
|
||||
'noinline'=130
|
||||
'crossinline'=131
|
||||
'reified'=132
|
||||
'expect'=133
|
||||
'actual'=134
|
||||
'null'=144
|
||||
'"""'=150
|
||||
@@ -0,0 +1,923 @@
|
||||
/**
|
||||
* Kotlin syntax grammar in ANTLR4 notation
|
||||
*/
|
||||
|
||||
parser grammar KotlinParser;
|
||||
|
||||
options { tokenVocab = KotlinLexer; }
|
||||
|
||||
// SECTION: general
|
||||
|
||||
kotlinFile
|
||||
: shebangLine? NL* fileAnnotation* packageHeader importList topLevelObject* EOF
|
||||
;
|
||||
|
||||
script
|
||||
: shebangLine? NL* fileAnnotation* packageHeader importList (statement semi)* EOF
|
||||
;
|
||||
|
||||
shebangLine
|
||||
: ShebangLine NL+
|
||||
;
|
||||
|
||||
fileAnnotation
|
||||
: (AT_NO_WS | AT_PRE_WS) FILE NL* COLON NL* (LSQUARE unescapedAnnotation+ RSQUARE | unescapedAnnotation) NL*
|
||||
;
|
||||
|
||||
packageHeader
|
||||
: (PACKAGE identifier semi?)?
|
||||
;
|
||||
|
||||
importList
|
||||
: importHeader*
|
||||
;
|
||||
|
||||
importHeader
|
||||
: IMPORT identifier (DOT MULT | importAlias)? semi?
|
||||
;
|
||||
|
||||
importAlias
|
||||
: AS simpleIdentifier
|
||||
;
|
||||
|
||||
topLevelObject
|
||||
: declaration semis?
|
||||
;
|
||||
|
||||
typeAlias
|
||||
: modifiers? TYPE_ALIAS NL* simpleIdentifier (NL* typeParameters)? NL* ASSIGNMENT NL* type
|
||||
;
|
||||
|
||||
declaration
|
||||
: classDeclaration
|
||||
| objectDeclaration
|
||||
| functionDeclaration
|
||||
| propertyDeclaration
|
||||
| typeAlias
|
||||
;
|
||||
|
||||
// SECTION: classes
|
||||
|
||||
classDeclaration
|
||||
: modifiers? (CLASS | (FUN NL*)? INTERFACE) NL* simpleIdentifier
|
||||
(NL* typeParameters)? (NL* primaryConstructor)?
|
||||
(NL* COLON NL* delegationSpecifiers)?
|
||||
(NL* typeConstraints)?
|
||||
(NL* classBody | NL* enumClassBody)?
|
||||
;
|
||||
|
||||
primaryConstructor
|
||||
: (modifiers? CONSTRUCTOR NL*)? classParameters
|
||||
;
|
||||
|
||||
classBody
|
||||
: LCURL NL* classMemberDeclarations NL* RCURL
|
||||
;
|
||||
|
||||
classParameters
|
||||
: LPAREN NL* (classParameter (NL* COMMA NL* classParameter)* (NL* COMMA)?)? NL* RPAREN
|
||||
;
|
||||
|
||||
classParameter
|
||||
: modifiers? (VAL | VAR)? NL* simpleIdentifier COLON NL* type (NL* ASSIGNMENT NL* expression)?
|
||||
;
|
||||
|
||||
delegationSpecifiers
|
||||
: annotatedDelegationSpecifier (NL* COMMA NL* annotatedDelegationSpecifier)*
|
||||
;
|
||||
|
||||
delegationSpecifier
|
||||
: constructorInvocation
|
||||
| explicitDelegation
|
||||
| userType
|
||||
| functionType
|
||||
;
|
||||
|
||||
constructorInvocation
|
||||
: userType valueArguments
|
||||
;
|
||||
|
||||
annotatedDelegationSpecifier
|
||||
: annotation* NL* delegationSpecifier
|
||||
;
|
||||
|
||||
explicitDelegation
|
||||
: (userType | functionType) NL* BY NL* expression
|
||||
;
|
||||
|
||||
typeParameters
|
||||
: LANGLE NL* typeParameter (NL* COMMA NL* typeParameter)* (NL* COMMA)? NL* RANGLE
|
||||
;
|
||||
|
||||
typeParameter
|
||||
: typeParameterModifiers? NL* simpleIdentifier (NL* COLON NL* type)?
|
||||
;
|
||||
|
||||
typeConstraints
|
||||
: WHERE NL* typeConstraint (NL* COMMA NL* typeConstraint)*
|
||||
;
|
||||
|
||||
typeConstraint
|
||||
: annotation* simpleIdentifier NL* COLON NL* type
|
||||
;
|
||||
|
||||
// SECTION: classMembers
|
||||
|
||||
classMemberDeclarations
|
||||
: (classMemberDeclaration semis?)*
|
||||
;
|
||||
|
||||
classMemberDeclaration
|
||||
: declaration
|
||||
| companionObject
|
||||
| anonymousInitializer
|
||||
| secondaryConstructor
|
||||
;
|
||||
|
||||
anonymousInitializer
|
||||
: INIT NL* block
|
||||
;
|
||||
|
||||
companionObject
|
||||
: modifiers? COMPANION NL* OBJECT
|
||||
(NL* simpleIdentifier)?
|
||||
(NL* COLON NL* delegationSpecifiers)?
|
||||
(NL* classBody)?
|
||||
;
|
||||
|
||||
functionValueParameters
|
||||
: LPAREN NL* (functionValueParameter (NL* COMMA NL* functionValueParameter)* (NL* COMMA)?)? NL* RPAREN
|
||||
;
|
||||
|
||||
functionValueParameter
|
||||
: parameterModifiers? parameter (NL* ASSIGNMENT NL* expression)?
|
||||
;
|
||||
|
||||
functionDeclaration
|
||||
: modifiers?
|
||||
FUN (NL* typeParameters)? (NL* receiverType NL* DOT)? NL* simpleIdentifier
|
||||
NL* functionValueParameters
|
||||
(NL* COLON NL* type)?
|
||||
(NL* typeConstraints)?
|
||||
(NL* functionBody)?
|
||||
;
|
||||
|
||||
functionBody
|
||||
: block
|
||||
| ASSIGNMENT NL* expression
|
||||
;
|
||||
|
||||
variableDeclaration
|
||||
: annotation* NL* simpleIdentifier (NL* COLON NL* type)?
|
||||
;
|
||||
|
||||
multiVariableDeclaration
|
||||
: LPAREN NL* variableDeclaration (NL* COMMA NL* variableDeclaration)* (NL* COMMA)? NL* RPAREN
|
||||
;
|
||||
|
||||
propertyDeclaration
|
||||
: modifiers? (VAL | VAR)
|
||||
(NL* typeParameters)?
|
||||
(NL* receiverType NL* DOT)?
|
||||
(NL* (multiVariableDeclaration | variableDeclaration))
|
||||
(NL* typeConstraints)?
|
||||
(NL* (ASSIGNMENT NL* expression | propertyDelegate))?
|
||||
(NL+ SEMICOLON)? NL* (getter? (NL* semi? setter)? | setter? (NL* semi? getter)?)
|
||||
;
|
||||
|
||||
propertyDelegate
|
||||
: BY NL* expression
|
||||
;
|
||||
|
||||
getter
|
||||
: modifiers? GET
|
||||
(NL* LPAREN NL* RPAREN (NL* COLON NL* type)? NL* functionBody)?
|
||||
;
|
||||
|
||||
setter
|
||||
: modifiers? SET
|
||||
(NL* LPAREN NL* functionValueParameterWithOptionalType (NL* COMMA)? NL* RPAREN (NL* COLON NL* type)? NL* functionBody)?
|
||||
;
|
||||
|
||||
parametersWithOptionalType
|
||||
: LPAREN NL* (functionValueParameterWithOptionalType (NL* COMMA NL* functionValueParameterWithOptionalType)* (NL* COMMA)?)? NL* RPAREN
|
||||
;
|
||||
|
||||
functionValueParameterWithOptionalType
|
||||
: parameterModifiers? parameterWithOptionalType (NL* ASSIGNMENT NL* expression)?
|
||||
;
|
||||
|
||||
parameterWithOptionalType
|
||||
: simpleIdentifier NL* (COLON NL* type)?
|
||||
;
|
||||
|
||||
parameter
|
||||
: simpleIdentifier NL* COLON NL* type
|
||||
;
|
||||
|
||||
objectDeclaration
|
||||
: modifiers? OBJECT
|
||||
NL* simpleIdentifier
|
||||
(NL* COLON NL* delegationSpecifiers)?
|
||||
(NL* classBody)?
|
||||
;
|
||||
|
||||
secondaryConstructor
|
||||
: modifiers? CONSTRUCTOR NL* functionValueParameters (NL* COLON NL* constructorDelegationCall)? NL* block?
|
||||
;
|
||||
|
||||
constructorDelegationCall
|
||||
: (THIS | SUPER) NL* valueArguments
|
||||
;
|
||||
|
||||
// SECTION: enumClasses
|
||||
|
||||
enumClassBody
|
||||
: LCURL NL* enumEntries? (NL* SEMICOLON NL* classMemberDeclarations)? NL* RCURL
|
||||
;
|
||||
|
||||
enumEntries
|
||||
: enumEntry (NL* COMMA NL* enumEntry)* NL* COMMA?
|
||||
;
|
||||
|
||||
enumEntry
|
||||
: (modifiers NL*)? simpleIdentifier (NL* valueArguments)? (NL* classBody)?
|
||||
;
|
||||
|
||||
// SECTION: types
|
||||
|
||||
type
|
||||
: typeModifiers? (parenthesizedType | nullableType | typeReference | functionType)
|
||||
;
|
||||
|
||||
typeReference
|
||||
: userType
|
||||
| DYNAMIC
|
||||
;
|
||||
|
||||
nullableType
|
||||
: (typeReference | parenthesizedType) NL* quest+
|
||||
;
|
||||
|
||||
quest
|
||||
: QUEST_NO_WS
|
||||
| QUEST_WS
|
||||
;
|
||||
|
||||
userType
|
||||
: simpleUserType (NL* DOT NL* simpleUserType)*
|
||||
;
|
||||
|
||||
simpleUserType
|
||||
: simpleIdentifier (NL* typeArguments)?
|
||||
;
|
||||
|
||||
typeProjection
|
||||
: typeProjectionModifiers? type
|
||||
| MULT
|
||||
;
|
||||
|
||||
typeProjectionModifiers
|
||||
: typeProjectionModifier+
|
||||
;
|
||||
|
||||
typeProjectionModifier
|
||||
: varianceModifier NL*
|
||||
| annotation
|
||||
;
|
||||
|
||||
functionType
|
||||
: (receiverType NL* DOT NL*)? functionTypeParameters NL* ARROW NL* type
|
||||
;
|
||||
|
||||
functionTypeParameters
|
||||
: LPAREN NL* (parameter | type)? (NL* COMMA NL* (parameter | type))* (NL* COMMA)? NL* RPAREN
|
||||
;
|
||||
|
||||
parenthesizedType
|
||||
: LPAREN NL* type NL* RPAREN
|
||||
;
|
||||
|
||||
receiverType
|
||||
: typeModifiers? (parenthesizedType | nullableType | typeReference)
|
||||
;
|
||||
|
||||
parenthesizedUserType
|
||||
: LPAREN NL* (userType | parenthesizedUserType) NL* RPAREN
|
||||
;
|
||||
|
||||
// SECTION: statements
|
||||
|
||||
statements
|
||||
: (statement (semis statement)*)? semis?
|
||||
;
|
||||
|
||||
statement
|
||||
: (label | annotation)* ( declaration | assignment | loopStatement | expression)
|
||||
;
|
||||
|
||||
label
|
||||
: simpleIdentifier (AT_NO_WS | AT_POST_WS) NL*
|
||||
;
|
||||
|
||||
controlStructureBody
|
||||
: block
|
||||
| statement
|
||||
;
|
||||
|
||||
block
|
||||
: LCURL NL* statements NL* RCURL
|
||||
;
|
||||
|
||||
loopStatement
|
||||
: forStatement
|
||||
| whileStatement
|
||||
| doWhileStatement
|
||||
;
|
||||
|
||||
forStatement
|
||||
: FOR NL* LPAREN annotation* (variableDeclaration | multiVariableDeclaration)
|
||||
IN expression RPAREN NL* controlStructureBody?
|
||||
;
|
||||
|
||||
whileStatement
|
||||
: WHILE NL* LPAREN expression RPAREN NL* (controlStructureBody | SEMICOLON)
|
||||
;
|
||||
|
||||
doWhileStatement
|
||||
: DO NL* controlStructureBody? NL* WHILE NL* LPAREN expression RPAREN
|
||||
;
|
||||
|
||||
assignment
|
||||
: (directlyAssignableExpression ASSIGNMENT | assignableExpression assignmentAndOperator) NL* expression
|
||||
;
|
||||
|
||||
semi
|
||||
: (SEMICOLON | NL) NL*
|
||||
| EOF
|
||||
;
|
||||
|
||||
semis
|
||||
: (SEMICOLON | NL)+
|
||||
| EOF
|
||||
;
|
||||
|
||||
// SECTION: expressions
|
||||
|
||||
expression
|
||||
: disjunction
|
||||
;
|
||||
|
||||
disjunction
|
||||
: conjunction (NL* DISJ NL* conjunction)*
|
||||
;
|
||||
|
||||
conjunction
|
||||
: equality (NL* CONJ NL* equality)*
|
||||
;
|
||||
|
||||
equality
|
||||
: comparison (equalityOperator NL* comparison)*
|
||||
;
|
||||
|
||||
comparison
|
||||
: genericCallLikeComparison (comparisonOperator NL* genericCallLikeComparison)*
|
||||
;
|
||||
|
||||
genericCallLikeComparison
|
||||
: infixOperation callSuffix*
|
||||
;
|
||||
|
||||
infixOperation
|
||||
: elvisExpression (inOperator NL* elvisExpression | isOperator NL* type)*
|
||||
;
|
||||
|
||||
elvisExpression
|
||||
: infixFunctionCall (NL* elvis NL* infixFunctionCall)*
|
||||
;
|
||||
|
||||
elvis
|
||||
: QUEST_NO_WS COLON
|
||||
;
|
||||
|
||||
infixFunctionCall
|
||||
: rangeExpression (simpleIdentifier NL* rangeExpression)*
|
||||
;
|
||||
|
||||
rangeExpression
|
||||
: additiveExpression (RANGE NL* additiveExpression)*
|
||||
;
|
||||
|
||||
additiveExpression
|
||||
: multiplicativeExpression (additiveOperator NL* multiplicativeExpression)*
|
||||
;
|
||||
|
||||
multiplicativeExpression
|
||||
: asExpression (multiplicativeOperator NL* asExpression)*
|
||||
;
|
||||
|
||||
asExpression
|
||||
: prefixUnaryExpression (NL* asOperator NL* type)*
|
||||
;
|
||||
|
||||
prefixUnaryExpression
|
||||
: unaryPrefix* postfixUnaryExpression
|
||||
;
|
||||
|
||||
unaryPrefix
|
||||
: annotation
|
||||
| label
|
||||
| prefixUnaryOperator NL*
|
||||
;
|
||||
|
||||
postfixUnaryExpression
|
||||
: primaryExpression postfixUnarySuffix*
|
||||
;
|
||||
|
||||
postfixUnarySuffix
|
||||
: postfixUnaryOperator
|
||||
| typeArguments
|
||||
| callSuffix
|
||||
| indexingSuffix
|
||||
| navigationSuffix
|
||||
;
|
||||
|
||||
directlyAssignableExpression
|
||||
: postfixUnaryExpression assignableSuffix
|
||||
| simpleIdentifier
|
||||
| parenthesizedDirectlyAssignableExpression
|
||||
;
|
||||
|
||||
parenthesizedDirectlyAssignableExpression
|
||||
: LPAREN NL* directlyAssignableExpression NL* RPAREN
|
||||
;
|
||||
|
||||
assignableExpression
|
||||
: prefixUnaryExpression
|
||||
| parenthesizedAssignableExpression
|
||||
;
|
||||
|
||||
parenthesizedAssignableExpression
|
||||
: LPAREN NL* assignableExpression NL* RPAREN
|
||||
;
|
||||
|
||||
assignableSuffix
|
||||
: typeArguments
|
||||
| indexingSuffix
|
||||
| navigationSuffix
|
||||
;
|
||||
|
||||
indexingSuffix
|
||||
: LSQUARE NL* expression (NL* COMMA NL* expression)* (NL* COMMA)? NL* RSQUARE
|
||||
;
|
||||
|
||||
navigationSuffix
|
||||
: memberAccessOperator NL* (simpleIdentifier | parenthesizedExpression | CLASS)
|
||||
;
|
||||
|
||||
callSuffix
|
||||
: typeArguments? (valueArguments? annotatedLambda | valueArguments)
|
||||
;
|
||||
|
||||
annotatedLambda
|
||||
: annotation* label? NL* lambdaLiteral
|
||||
;
|
||||
|
||||
typeArguments
|
||||
: LANGLE NL* typeProjection (NL* COMMA NL* typeProjection)* (NL* COMMA)? NL* RANGLE
|
||||
;
|
||||
|
||||
valueArguments
|
||||
: LPAREN NL* (valueArgument (NL* COMMA NL* valueArgument)* (NL* COMMA)? NL*)? RPAREN
|
||||
;
|
||||
|
||||
valueArgument
|
||||
: annotation? NL* (simpleIdentifier NL* ASSIGNMENT NL*)? MULT? NL* expression
|
||||
;
|
||||
|
||||
primaryExpression
|
||||
: parenthesizedExpression
|
||||
| simpleIdentifier
|
||||
| literalConstant
|
||||
| stringLiteral
|
||||
| callableReference
|
||||
| functionLiteral
|
||||
| objectLiteral
|
||||
| collectionLiteral
|
||||
| thisExpression
|
||||
| superExpression
|
||||
| ifExpression
|
||||
| whenExpression
|
||||
| tryExpression
|
||||
| jumpExpression
|
||||
;
|
||||
|
||||
parenthesizedExpression
|
||||
: LPAREN NL* expression NL* RPAREN
|
||||
;
|
||||
|
||||
collectionLiteral
|
||||
: LSQUARE NL* (expression (NL* COMMA NL* expression)* (NL* COMMA)? NL*)? RSQUARE
|
||||
;
|
||||
|
||||
literalConstant
|
||||
: BooleanLiteral
|
||||
| IntegerLiteral
|
||||
| HexLiteral
|
||||
| BinLiteral
|
||||
| CharacterLiteral
|
||||
| RealLiteral
|
||||
| NullLiteral
|
||||
| LongLiteral
|
||||
| UnsignedLiteral
|
||||
;
|
||||
|
||||
stringLiteral
|
||||
: lineStringLiteral
|
||||
| multiLineStringLiteral
|
||||
;
|
||||
|
||||
lineStringLiteral
|
||||
: QUOTE_OPEN (lineStringContent | lineStringExpression)* QUOTE_CLOSE
|
||||
;
|
||||
|
||||
multiLineStringLiteral
|
||||
: TRIPLE_QUOTE_OPEN (multiLineStringContent | multiLineStringExpression | MultiLineStringQuote)* TRIPLE_QUOTE_CLOSE
|
||||
;
|
||||
|
||||
lineStringContent
|
||||
: LineStrText
|
||||
| LineStrEscapedChar
|
||||
| LineStrRef
|
||||
;
|
||||
|
||||
lineStringExpression
|
||||
: LineStrExprStart NL* expression NL* RCURL
|
||||
;
|
||||
|
||||
multiLineStringContent
|
||||
: MultiLineStrText
|
||||
| MultiLineStringQuote
|
||||
| MultiLineStrRef
|
||||
;
|
||||
|
||||
multiLineStringExpression
|
||||
: MultiLineStrExprStart NL* expression NL* RCURL
|
||||
;
|
||||
|
||||
lambdaLiteral
|
||||
: LCURL NL* (lambdaParameters? NL* ARROW NL*)? statements NL* RCURL
|
||||
;
|
||||
|
||||
lambdaParameters
|
||||
: lambdaParameter (NL* COMMA NL* lambdaParameter)* (NL* COMMA)?
|
||||
;
|
||||
|
||||
lambdaParameter
|
||||
: variableDeclaration
|
||||
| multiVariableDeclaration (NL* COLON NL* type)?
|
||||
;
|
||||
|
||||
anonymousFunction
|
||||
: FUN
|
||||
(NL* type NL* DOT)?
|
||||
NL* parametersWithOptionalType
|
||||
(NL* COLON NL* type)?
|
||||
(NL* typeConstraints)?
|
||||
(NL* functionBody)?
|
||||
;
|
||||
|
||||
functionLiteral
|
||||
: lambdaLiteral
|
||||
| anonymousFunction
|
||||
;
|
||||
|
||||
objectLiteral
|
||||
: OBJECT (NL* COLON NL* delegationSpecifiers NL*)? (NL* classBody)?
|
||||
;
|
||||
|
||||
thisExpression
|
||||
: THIS
|
||||
| THIS_AT
|
||||
;
|
||||
|
||||
superExpression
|
||||
: SUPER (LANGLE NL* type NL* RANGLE)? (AT_NO_WS simpleIdentifier)?
|
||||
| SUPER_AT
|
||||
;
|
||||
|
||||
ifExpression
|
||||
: IF NL* LPAREN NL* expression NL* RPAREN NL*
|
||||
( controlStructureBody
|
||||
| controlStructureBody? NL* SEMICOLON? NL* ELSE NL* (controlStructureBody | SEMICOLON)
|
||||
| SEMICOLON)
|
||||
;
|
||||
|
||||
whenSubject
|
||||
: LPAREN (annotation* NL* VAL NL* variableDeclaration NL* ASSIGNMENT NL*)? expression RPAREN
|
||||
;
|
||||
|
||||
whenExpression
|
||||
: WHEN NL* whenSubject? NL* LCURL NL* (whenEntry NL*)* NL* RCURL
|
||||
;
|
||||
|
||||
whenEntry
|
||||
: whenCondition (NL* COMMA NL* whenCondition)* (NL* COMMA)? NL* ARROW NL* controlStructureBody semi?
|
||||
| ELSE NL* ARROW NL* controlStructureBody semi?
|
||||
;
|
||||
|
||||
whenCondition
|
||||
: expression
|
||||
| rangeTest
|
||||
| typeTest
|
||||
;
|
||||
|
||||
rangeTest
|
||||
: inOperator NL* expression
|
||||
;
|
||||
|
||||
typeTest
|
||||
: isOperator NL* type
|
||||
;
|
||||
|
||||
tryExpression
|
||||
: TRY NL* block ((NL* catchBlock)+ (NL* finallyBlock)? | NL* finallyBlock)
|
||||
;
|
||||
|
||||
catchBlock
|
||||
: CATCH NL* LPAREN annotation* simpleIdentifier COLON type (NL* COMMA)? RPAREN NL* block
|
||||
;
|
||||
|
||||
finallyBlock
|
||||
: FINALLY NL* block
|
||||
;
|
||||
|
||||
jumpExpression
|
||||
: THROW NL* expression
|
||||
| (RETURN | RETURN_AT) expression?
|
||||
| CONTINUE
|
||||
| CONTINUE_AT
|
||||
| BREAK
|
||||
| BREAK_AT
|
||||
;
|
||||
|
||||
callableReference
|
||||
: receiverType? COLONCOLON NL* (simpleIdentifier | CLASS)
|
||||
;
|
||||
|
||||
assignmentAndOperator
|
||||
: ADD_ASSIGNMENT
|
||||
| SUB_ASSIGNMENT
|
||||
| MULT_ASSIGNMENT
|
||||
| DIV_ASSIGNMENT
|
||||
| MOD_ASSIGNMENT
|
||||
;
|
||||
|
||||
equalityOperator
|
||||
: EXCL_EQ
|
||||
| EXCL_EQEQ
|
||||
| EQEQ
|
||||
| EQEQEQ
|
||||
;
|
||||
|
||||
comparisonOperator
|
||||
: LANGLE
|
||||
| RANGLE
|
||||
| LE
|
||||
| GE
|
||||
;
|
||||
|
||||
inOperator
|
||||
: IN
|
||||
| NOT_IN
|
||||
;
|
||||
|
||||
isOperator
|
||||
: IS
|
||||
| NOT_IS
|
||||
;
|
||||
|
||||
additiveOperator
|
||||
: ADD
|
||||
| SUB
|
||||
;
|
||||
|
||||
multiplicativeOperator
|
||||
: MULT
|
||||
| DIV
|
||||
| MOD
|
||||
;
|
||||
|
||||
asOperator
|
||||
: AS
|
||||
| AS_SAFE
|
||||
;
|
||||
|
||||
prefixUnaryOperator
|
||||
: INCR
|
||||
| DECR
|
||||
| SUB
|
||||
| ADD
|
||||
| excl
|
||||
;
|
||||
|
||||
postfixUnaryOperator
|
||||
: INCR
|
||||
| DECR
|
||||
| EXCL_NO_WS excl
|
||||
;
|
||||
|
||||
excl
|
||||
: EXCL_NO_WS
|
||||
| EXCL_WS
|
||||
;
|
||||
|
||||
memberAccessOperator
|
||||
: NL* DOT
|
||||
| NL* safeNav
|
||||
| COLONCOLON
|
||||
;
|
||||
|
||||
safeNav
|
||||
: QUEST_NO_WS DOT
|
||||
;
|
||||
|
||||
// SECTION: modifiers
|
||||
|
||||
modifiers
|
||||
: (annotation | modifier)+
|
||||
;
|
||||
|
||||
parameterModifiers
|
||||
: (annotation | parameterModifier)+
|
||||
;
|
||||
|
||||
modifier
|
||||
: (classModifier
|
||||
| memberModifier
|
||||
| visibilityModifier
|
||||
| functionModifier
|
||||
| propertyModifier
|
||||
| inheritanceModifier
|
||||
| parameterModifier
|
||||
| platformModifier) NL*
|
||||
;
|
||||
|
||||
typeModifiers
|
||||
: typeModifier+
|
||||
;
|
||||
|
||||
typeModifier
|
||||
: annotation
|
||||
| SUSPEND NL*
|
||||
;
|
||||
|
||||
classModifier
|
||||
: ENUM
|
||||
| SEALED
|
||||
| ANNOTATION
|
||||
| DATA
|
||||
| INNER
|
||||
| VALUE
|
||||
;
|
||||
|
||||
memberModifier
|
||||
: OVERRIDE
|
||||
| LATEINIT
|
||||
;
|
||||
|
||||
visibilityModifier
|
||||
: PUBLIC
|
||||
| PRIVATE
|
||||
| INTERNAL
|
||||
| PROTECTED
|
||||
;
|
||||
|
||||
varianceModifier
|
||||
: IN
|
||||
| OUT
|
||||
;
|
||||
|
||||
typeParameterModifiers
|
||||
: typeParameterModifier+
|
||||
;
|
||||
|
||||
typeParameterModifier
|
||||
: reificationModifier NL*
|
||||
| varianceModifier NL*
|
||||
| annotation
|
||||
;
|
||||
|
||||
functionModifier
|
||||
: TAILREC
|
||||
| OPERATOR
|
||||
| INFIX
|
||||
| INLINE
|
||||
| EXTERNAL
|
||||
| SUSPEND
|
||||
;
|
||||
|
||||
propertyModifier
|
||||
: CONST
|
||||
;
|
||||
|
||||
inheritanceModifier
|
||||
: ABSTRACT
|
||||
| FINAL
|
||||
| OPEN
|
||||
;
|
||||
|
||||
parameterModifier
|
||||
: VARARG
|
||||
| NOINLINE
|
||||
| CROSSINLINE
|
||||
;
|
||||
|
||||
reificationModifier
|
||||
: REIFIED
|
||||
;
|
||||
|
||||
platformModifier
|
||||
: EXPECT
|
||||
| ACTUAL
|
||||
;
|
||||
|
||||
// SECTION: annotations
|
||||
|
||||
annotation
|
||||
: (singleAnnotation | multiAnnotation) NL*
|
||||
;
|
||||
|
||||
singleAnnotation
|
||||
: (annotationUseSiteTarget NL* | AT_NO_WS | AT_PRE_WS) unescapedAnnotation
|
||||
;
|
||||
|
||||
multiAnnotation
|
||||
: (annotationUseSiteTarget NL* | AT_NO_WS | AT_PRE_WS) LSQUARE unescapedAnnotation+ RSQUARE
|
||||
;
|
||||
|
||||
annotationUseSiteTarget
|
||||
: (AT_NO_WS | AT_PRE_WS) (FIELD | PROPERTY | GET | SET | RECEIVER | PARAM | SETPARAM | DELEGATE) NL* COLON
|
||||
;
|
||||
|
||||
unescapedAnnotation
|
||||
: constructorInvocation
|
||||
| userType
|
||||
;
|
||||
|
||||
// SECTION: identifiers
|
||||
|
||||
simpleIdentifier
|
||||
: Identifier
|
||||
| ABSTRACT
|
||||
| ANNOTATION
|
||||
| BY
|
||||
| CATCH
|
||||
| COMPANION
|
||||
| CONSTRUCTOR
|
||||
| CROSSINLINE
|
||||
| DATA
|
||||
| DYNAMIC
|
||||
| ENUM
|
||||
| EXTERNAL
|
||||
| FINAL
|
||||
| FINALLY
|
||||
| GET
|
||||
| IMPORT
|
||||
| INFIX
|
||||
| INIT
|
||||
| INLINE
|
||||
| INNER
|
||||
| INTERNAL
|
||||
| LATEINIT
|
||||
| NOINLINE
|
||||
| OPEN
|
||||
| OPERATOR
|
||||
| OUT
|
||||
| OVERRIDE
|
||||
| PRIVATE
|
||||
| PROTECTED
|
||||
| PUBLIC
|
||||
| REIFIED
|
||||
| SEALED
|
||||
| TAILREC
|
||||
| SET
|
||||
| VARARG
|
||||
| WHERE
|
||||
| FIELD
|
||||
| PROPERTY
|
||||
| RECEIVER
|
||||
| PARAM
|
||||
| SETPARAM
|
||||
| DELEGATE
|
||||
| FILE
|
||||
| EXPECT
|
||||
| ACTUAL
|
||||
| CONST
|
||||
| SUSPEND
|
||||
| VALUE
|
||||
;
|
||||
|
||||
identifier
|
||||
: simpleIdentifier (NL* DOT simpleIdentifier)*
|
||||
;
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,290 @@
|
||||
ShebangLine=1
|
||||
DelimitedComment=2
|
||||
LineComment=3
|
||||
WS=4
|
||||
NL=5
|
||||
RESERVED=6
|
||||
DOT=7
|
||||
COMMA=8
|
||||
LPAREN=9
|
||||
RPAREN=10
|
||||
LSQUARE=11
|
||||
RSQUARE=12
|
||||
LCURL=13
|
||||
RCURL=14
|
||||
MULT=15
|
||||
MOD=16
|
||||
DIV=17
|
||||
ADD=18
|
||||
SUB=19
|
||||
INCR=20
|
||||
DECR=21
|
||||
CONJ=22
|
||||
DISJ=23
|
||||
EXCL_WS=24
|
||||
EXCL_NO_WS=25
|
||||
COLON=26
|
||||
SEMICOLON=27
|
||||
ASSIGNMENT=28
|
||||
ADD_ASSIGNMENT=29
|
||||
SUB_ASSIGNMENT=30
|
||||
MULT_ASSIGNMENT=31
|
||||
DIV_ASSIGNMENT=32
|
||||
MOD_ASSIGNMENT=33
|
||||
ARROW=34
|
||||
DOUBLE_ARROW=35
|
||||
RANGE=36
|
||||
COLONCOLON=37
|
||||
DOUBLE_SEMICOLON=38
|
||||
HASH=39
|
||||
AT_NO_WS=40
|
||||
AT_POST_WS=41
|
||||
AT_PRE_WS=42
|
||||
AT_BOTH_WS=43
|
||||
QUEST_WS=44
|
||||
QUEST_NO_WS=45
|
||||
LANGLE=46
|
||||
RANGLE=47
|
||||
LE=48
|
||||
GE=49
|
||||
EXCL_EQ=50
|
||||
EXCL_EQEQ=51
|
||||
AS_SAFE=52
|
||||
EQEQ=53
|
||||
EQEQEQ=54
|
||||
SINGLE_QUOTE=55
|
||||
RETURN_AT=56
|
||||
CONTINUE_AT=57
|
||||
BREAK_AT=58
|
||||
THIS_AT=59
|
||||
SUPER_AT=60
|
||||
FILE=61
|
||||
FIELD=62
|
||||
PROPERTY=63
|
||||
GET=64
|
||||
SET=65
|
||||
RECEIVER=66
|
||||
PARAM=67
|
||||
SETPARAM=68
|
||||
DELEGATE=69
|
||||
PACKAGE=70
|
||||
IMPORT=71
|
||||
CLASS=72
|
||||
INTERFACE=73
|
||||
FUN=74
|
||||
OBJECT=75
|
||||
VAL=76
|
||||
VAR=77
|
||||
TYPE_ALIAS=78
|
||||
CONSTRUCTOR=79
|
||||
BY=80
|
||||
COMPANION=81
|
||||
INIT=82
|
||||
THIS=83
|
||||
SUPER=84
|
||||
TYPEOF=85
|
||||
WHERE=86
|
||||
IF=87
|
||||
ELSE=88
|
||||
WHEN=89
|
||||
TRY=90
|
||||
CATCH=91
|
||||
FINALLY=92
|
||||
FOR=93
|
||||
DO=94
|
||||
WHILE=95
|
||||
THROW=96
|
||||
RETURN=97
|
||||
CONTINUE=98
|
||||
BREAK=99
|
||||
AS=100
|
||||
IS=101
|
||||
IN=102
|
||||
NOT_IS=103
|
||||
NOT_IN=104
|
||||
OUT=105
|
||||
DYNAMIC=106
|
||||
PUBLIC=107
|
||||
PRIVATE=108
|
||||
PROTECTED=109
|
||||
INTERNAL=110
|
||||
ENUM=111
|
||||
SEALED=112
|
||||
ANNOTATION=113
|
||||
DATA=114
|
||||
INNER=115
|
||||
VALUE=116
|
||||
TAILREC=117
|
||||
OPERATOR=118
|
||||
INLINE=119
|
||||
INFIX=120
|
||||
EXTERNAL=121
|
||||
SUSPEND=122
|
||||
OVERRIDE=123
|
||||
ABSTRACT=124
|
||||
FINAL=125
|
||||
OPEN=126
|
||||
CONST=127
|
||||
LATEINIT=128
|
||||
VARARG=129
|
||||
NOINLINE=130
|
||||
CROSSINLINE=131
|
||||
REIFIED=132
|
||||
EXPECT=133
|
||||
ACTUAL=134
|
||||
RealLiteral=135
|
||||
FloatLiteral=136
|
||||
DoubleLiteral=137
|
||||
IntegerLiteral=138
|
||||
HexLiteral=139
|
||||
BinLiteral=140
|
||||
UnsignedLiteral=141
|
||||
LongLiteral=142
|
||||
BooleanLiteral=143
|
||||
NullLiteral=144
|
||||
CharacterLiteral=145
|
||||
Identifier=146
|
||||
IdentifierOrSoftKey=147
|
||||
FieldIdentifier=148
|
||||
QUOTE_OPEN=149
|
||||
TRIPLE_QUOTE_OPEN=150
|
||||
UNICODE_CLASS_LL=151
|
||||
UNICODE_CLASS_LM=152
|
||||
UNICODE_CLASS_LO=153
|
||||
UNICODE_CLASS_LT=154
|
||||
UNICODE_CLASS_LU=155
|
||||
UNICODE_CLASS_ND=156
|
||||
UNICODE_CLASS_NL=157
|
||||
QUOTE_CLOSE=158
|
||||
LineStrRef=159
|
||||
LineStrText=160
|
||||
LineStrEscapedChar=161
|
||||
LineStrExprStart=162
|
||||
TRIPLE_QUOTE_CLOSE=163
|
||||
MultiLineStringQuote=164
|
||||
MultiLineStrRef=165
|
||||
MultiLineStrText=166
|
||||
MultiLineStrExprStart=167
|
||||
Inside_Comment=168
|
||||
Inside_WS=169
|
||||
Inside_NL=170
|
||||
ErrorCharacter=171
|
||||
'...'=6
|
||||
'.'=7
|
||||
','=8
|
||||
'('=9
|
||||
')'=10
|
||||
'['=11
|
||||
']'=12
|
||||
'{'=13
|
||||
'}'=14
|
||||
'*'=15
|
||||
'%'=16
|
||||
'/'=17
|
||||
'+'=18
|
||||
'-'=19
|
||||
'++'=20
|
||||
'--'=21
|
||||
'&&'=22
|
||||
'||'=23
|
||||
'!'=25
|
||||
':'=26
|
||||
';'=27
|
||||
'='=28
|
||||
'+='=29
|
||||
'-='=30
|
||||
'*='=31
|
||||
'/='=32
|
||||
'%='=33
|
||||
'->'=34
|
||||
'=>'=35
|
||||
'..'=36
|
||||
'::'=37
|
||||
';;'=38
|
||||
'#'=39
|
||||
'@'=40
|
||||
'?'=45
|
||||
'<'=46
|
||||
'>'=47
|
||||
'<='=48
|
||||
'>='=49
|
||||
'!='=50
|
||||
'!=='=51
|
||||
'as?'=52
|
||||
'=='=53
|
||||
'==='=54
|
||||
'\''=55
|
||||
'file'=61
|
||||
'field'=62
|
||||
'property'=63
|
||||
'get'=64
|
||||
'set'=65
|
||||
'receiver'=66
|
||||
'param'=67
|
||||
'setparam'=68
|
||||
'delegate'=69
|
||||
'package'=70
|
||||
'import'=71
|
||||
'class'=72
|
||||
'interface'=73
|
||||
'fun'=74
|
||||
'object'=75
|
||||
'val'=76
|
||||
'var'=77
|
||||
'typealias'=78
|
||||
'constructor'=79
|
||||
'by'=80
|
||||
'companion'=81
|
||||
'init'=82
|
||||
'this'=83
|
||||
'super'=84
|
||||
'typeof'=85
|
||||
'where'=86
|
||||
'if'=87
|
||||
'else'=88
|
||||
'when'=89
|
||||
'try'=90
|
||||
'catch'=91
|
||||
'finally'=92
|
||||
'for'=93
|
||||
'do'=94
|
||||
'while'=95
|
||||
'throw'=96
|
||||
'return'=97
|
||||
'continue'=98
|
||||
'break'=99
|
||||
'as'=100
|
||||
'is'=101
|
||||
'in'=102
|
||||
'out'=105
|
||||
'dynamic'=106
|
||||
'public'=107
|
||||
'private'=108
|
||||
'protected'=109
|
||||
'internal'=110
|
||||
'enum'=111
|
||||
'sealed'=112
|
||||
'annotation'=113
|
||||
'data'=114
|
||||
'inner'=115
|
||||
'value'=116
|
||||
'tailrec'=117
|
||||
'operator'=118
|
||||
'inline'=119
|
||||
'infix'=120
|
||||
'external'=121
|
||||
'suspend'=122
|
||||
'override'=123
|
||||
'abstract'=124
|
||||
'final'=125
|
||||
'open'=126
|
||||
'const'=127
|
||||
'lateinit'=128
|
||||
'vararg'=129
|
||||
'noinline'=130
|
||||
'crossinline'=131
|
||||
'reified'=132
|
||||
'expect'=133
|
||||
'actual'=134
|
||||
'null'=144
|
||||
'"""'=150
|
||||
+2115
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
@@ -0,0 +1,384 @@
|
||||
// Generated from UnicodeClasses.g4 by ANTLR 4.9.2
|
||||
package com.itsaky.androidide.lexers.kotlin;
|
||||
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"})
|
||||
public class UnicodeClasses extends Lexer {
|
||||
static { RuntimeMetaData.checkVersion("4.9.2", RuntimeMetaData.VERSION); }
|
||||
|
||||
protected static final DFA[] _decisionToDFA;
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
UNICODE_CLASS_LL=1, UNICODE_CLASS_LM=2, UNICODE_CLASS_LO=3, UNICODE_CLASS_LT=4,
|
||||
UNICODE_CLASS_LU=5, UNICODE_CLASS_ND=6, UNICODE_CLASS_NL=7;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
};
|
||||
|
||||
public static String[] modeNames = {
|
||||
"DEFAULT_MODE"
|
||||
};
|
||||
|
||||
private static String[] makeRuleNames() {
|
||||
return new String[] {
|
||||
"UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", "UNICODE_CLASS_LT",
|
||||
"UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL"
|
||||
};
|
||||
}
|
||||
public static final String[] ruleNames = makeRuleNames();
|
||||
|
||||
private static String[] makeLiteralNames() {
|
||||
return new String[] {
|
||||
};
|
||||
}
|
||||
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
||||
private static String[] makeSymbolicNames() {
|
||||
return new String[] {
|
||||
null, "UNICODE_CLASS_LL", "UNICODE_CLASS_LM", "UNICODE_CLASS_LO", "UNICODE_CLASS_LT",
|
||||
"UNICODE_CLASS_LU", "UNICODE_CLASS_ND", "UNICODE_CLASS_NL"
|
||||
};
|
||||
}
|
||||
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 UnicodeClasses(CharStream input) {
|
||||
super(input);
|
||||
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getGrammarFileName() { return "UnicodeClasses.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; }
|
||||
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\t\37\b\1\4\2\t\2"+
|
||||
"\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\3\2\3\2\3\3\3\3\3\4\3"+
|
||||
"\4\3\5\3\5\3\6\3\6\3\7\3\7\3\b\3\b\2\2\t\3\3\5\4\7\5\t\6\13\7\r\b\17\t"+
|
||||
"\3\2\t\u0248\2c|\u00b7\u00b7\u00e1\u00f8\u00fa\u0101\u0103\u0103\u0105"+
|
||||
"\u0105\u0107\u0107\u0109\u0109\u010b\u010b\u010d\u010d\u010f\u010f\u0111"+
|
||||
"\u0111\u0113\u0113\u0115\u0115\u0117\u0117\u0119\u0119\u011b\u011b\u011d"+
|
||||
"\u011d\u011f\u011f\u0121\u0121\u0123\u0123\u0125\u0125\u0127\u0127\u0129"+
|
||||
"\u0129\u012b\u012b\u012d\u012d\u012f\u012f\u0131\u0131\u0133\u0133\u0135"+
|
||||
"\u0135\u0137\u0137\u0139\u013a\u013c\u013c\u013e\u013e\u0140\u0140\u0142"+
|
||||
"\u0142\u0144\u0144\u0146\u0146\u0148\u0148\u014a\u014b\u014d\u014d\u014f"+
|
||||
"\u014f\u0151\u0151\u0153\u0153\u0155\u0155\u0157\u0157\u0159\u0159\u015b"+
|
||||
"\u015b\u015d\u015d\u015f\u015f\u0161\u0161\u0163\u0163\u0165\u0165\u0167"+
|
||||
"\u0167\u0169\u0169\u016b\u016b\u016d\u016d\u016f\u016f\u0171\u0171\u0173"+
|
||||
"\u0173\u0175\u0175\u0177\u0177\u0179\u0179\u017c\u017c\u017e\u017e\u0180"+
|
||||
"\u0182\u0185\u0185\u0187\u0187\u018a\u018a\u018e\u018f\u0194\u0194\u0197"+
|
||||
"\u0197\u019b\u019d\u01a0\u01a0\u01a3\u01a3\u01a5\u01a5\u01a7\u01a7\u01aa"+
|
||||
"\u01aa\u01ac\u01ad\u01af\u01af\u01b2\u01b2\u01b6\u01b6\u01b8\u01b8\u01bb"+
|
||||
"\u01bc\u01bf\u01c1\u01c8\u01c8\u01cb\u01cb\u01ce\u01ce\u01d0\u01d0\u01d2"+
|
||||
"\u01d2\u01d4\u01d4\u01d6\u01d6\u01d8\u01d8\u01da\u01da\u01dc\u01dc\u01de"+
|
||||
"\u01df\u01e1\u01e1\u01e3\u01e3\u01e5\u01e5\u01e7\u01e7\u01e9\u01e9\u01eb"+
|
||||
"\u01eb\u01ed\u01ed\u01ef\u01ef\u01f1\u01f2\u01f5\u01f5\u01f7\u01f7\u01fb"+
|
||||
"\u01fb\u01fd\u01fd\u01ff\u01ff\u0201\u0201\u0203\u0203\u0205\u0205\u0207"+
|
||||
"\u0207\u0209\u0209\u020b\u020b\u020d\u020d\u020f\u020f\u0211\u0211\u0213"+
|
||||
"\u0213\u0215\u0215\u0217\u0217\u0219\u0219\u021b\u021b\u021d\u021d\u021f"+
|
||||
"\u021f\u0221\u0221\u0223\u0223\u0225\u0225\u0227\u0227\u0229\u0229\u022b"+
|
||||
"\u022b\u022d\u022d\u022f\u022f\u0231\u0231\u0233\u0233\u0235\u023b\u023e"+
|
||||
"\u023e\u0241\u0242\u0244\u0244\u0249\u0249\u024b\u024b\u024d\u024d\u024f"+
|
||||
"\u024f\u0251\u0295\u0297\u02b1\u0373\u0373\u0375\u0375\u0379\u0379\u037d"+
|
||||
"\u037f\u0392\u0392\u03ae\u03d0\u03d2\u03d3\u03d7\u03d9\u03db\u03db\u03dd"+
|
||||
"\u03dd\u03df\u03df\u03e1\u03e1\u03e3\u03e3\u03e5\u03e5\u03e7\u03e7\u03e9"+
|
||||
"\u03e9\u03eb\u03eb\u03ed\u03ed\u03ef\u03ef\u03f1\u03f5\u03f7\u03f7\u03fa"+
|
||||
"\u03fa\u03fd\u03fe\u0432\u0461\u0463\u0463\u0465\u0465\u0467\u0467\u0469"+
|
||||
"\u0469\u046b\u046b\u046d\u046d\u046f\u046f\u0471\u0471\u0473\u0473\u0475"+
|
||||
"\u0475\u0477\u0477\u0479\u0479\u047b\u047b\u047d\u047d\u047f\u047f\u0481"+
|
||||
"\u0481\u0483\u0483\u048d\u048d\u048f\u048f\u0491\u0491\u0493\u0493\u0495"+
|
||||
"\u0495\u0497\u0497\u0499\u0499\u049b\u049b\u049d\u049d\u049f\u049f\u04a1"+
|
||||
"\u04a1\u04a3\u04a3\u04a5\u04a5\u04a7\u04a7\u04a9\u04a9\u04ab\u04ab\u04ad"+
|
||||
"\u04ad\u04af\u04af\u04b1\u04b1\u04b3\u04b3\u04b5\u04b5\u04b7\u04b7\u04b9"+
|
||||
"\u04b9\u04bb\u04bb\u04bd\u04bd\u04bf\u04bf\u04c1\u04c1\u04c4\u04c4\u04c6"+
|
||||
"\u04c6\u04c8\u04c8\u04ca\u04ca\u04cc\u04cc\u04ce\u04ce\u04d0\u04d1\u04d3"+
|
||||
"\u04d3\u04d5\u04d5\u04d7\u04d7\u04d9\u04d9\u04db\u04db\u04dd\u04dd\u04df"+
|
||||
"\u04df\u04e1\u04e1\u04e3\u04e3\u04e5\u04e5\u04e7\u04e7\u04e9\u04e9\u04eb"+
|
||||
"\u04eb\u04ed\u04ed\u04ef\u04ef\u04f1\u04f1\u04f3\u04f3\u04f5\u04f5\u04f7"+
|
||||
"\u04f7\u04f9\u04f9\u04fb\u04fb\u04fd\u04fd\u04ff\u04ff\u0501\u0501\u0503"+
|
||||
"\u0503\u0505\u0505\u0507\u0507\u0509\u0509\u050b\u050b\u050d\u050d\u050f"+
|
||||
"\u050f\u0511\u0511\u0513\u0513\u0515\u0515\u0517\u0517\u0519\u0519\u051b"+
|
||||
"\u051b\u051d\u051d\u051f\u051f\u0521\u0521\u0523\u0523\u0525\u0525\u0527"+
|
||||
"\u0527\u0529\u0529\u0563\u0589\u1d02\u1d2d\u1d6d\u1d79\u1d7b\u1d9c\u1e03"+
|
||||
"\u1e03\u1e05\u1e05\u1e07\u1e07\u1e09\u1e09\u1e0b\u1e0b\u1e0d\u1e0d\u1e0f"+
|
||||
"\u1e0f\u1e11\u1e11\u1e13\u1e13\u1e15\u1e15\u1e17\u1e17\u1e19\u1e19\u1e1b"+
|
||||
"\u1e1b\u1e1d\u1e1d\u1e1f\u1e1f\u1e21\u1e21\u1e23\u1e23\u1e25\u1e25\u1e27"+
|
||||
"\u1e27\u1e29\u1e29\u1e2b\u1e2b\u1e2d\u1e2d\u1e2f\u1e2f\u1e31\u1e31\u1e33"+
|
||||
"\u1e33\u1e35\u1e35\u1e37\u1e37\u1e39\u1e39\u1e3b\u1e3b\u1e3d\u1e3d\u1e3f"+
|
||||
"\u1e3f\u1e41\u1e41\u1e43\u1e43\u1e45\u1e45\u1e47\u1e47\u1e49\u1e49\u1e4b"+
|
||||
"\u1e4b\u1e4d\u1e4d\u1e4f\u1e4f\u1e51\u1e51\u1e53\u1e53\u1e55\u1e55\u1e57"+
|
||||
"\u1e57\u1e59\u1e59\u1e5b\u1e5b\u1e5d\u1e5d\u1e5f\u1e5f\u1e61\u1e61\u1e63"+
|
||||
"\u1e63\u1e65\u1e65\u1e67\u1e67\u1e69\u1e69\u1e6b\u1e6b\u1e6d\u1e6d\u1e6f"+
|
||||
"\u1e6f\u1e71\u1e71\u1e73\u1e73\u1e75\u1e75\u1e77\u1e77\u1e79\u1e79\u1e7b"+
|
||||
"\u1e7b\u1e7d\u1e7d\u1e7f\u1e7f\u1e81\u1e81\u1e83\u1e83\u1e85\u1e85\u1e87"+
|
||||
"\u1e87\u1e89\u1e89\u1e8b\u1e8b\u1e8d\u1e8d\u1e8f\u1e8f\u1e91\u1e91\u1e93"+
|
||||
"\u1e93\u1e95\u1e95\u1e97\u1e9f\u1ea1\u1ea1\u1ea3\u1ea3\u1ea5\u1ea5\u1ea7"+
|
||||
"\u1ea7\u1ea9\u1ea9\u1eab\u1eab\u1ead\u1ead\u1eaf\u1eaf\u1eb1\u1eb1\u1eb3"+
|
||||
"\u1eb3\u1eb5\u1eb5\u1eb7\u1eb7\u1eb9\u1eb9\u1ebb\u1ebb\u1ebd\u1ebd\u1ebf"+
|
||||
"\u1ebf\u1ec1\u1ec1\u1ec3\u1ec3\u1ec5\u1ec5\u1ec7\u1ec7\u1ec9\u1ec9\u1ecb"+
|
||||
"\u1ecb\u1ecd\u1ecd\u1ecf\u1ecf\u1ed1\u1ed1\u1ed3\u1ed3\u1ed5\u1ed5\u1ed7"+
|
||||
"\u1ed7\u1ed9\u1ed9\u1edb\u1edb\u1edd\u1edd\u1edf\u1edf\u1ee1\u1ee1\u1ee3"+
|
||||
"\u1ee3\u1ee5\u1ee5\u1ee7\u1ee7\u1ee9\u1ee9\u1eeb\u1eeb\u1eed\u1eed\u1eef"+
|
||||
"\u1eef\u1ef1\u1ef1\u1ef3\u1ef3\u1ef5\u1ef5\u1ef7\u1ef7\u1ef9\u1ef9\u1efb"+
|
||||
"\u1efb\u1efd\u1efd\u1eff\u1eff\u1f01\u1f09\u1f12\u1f17\u1f22\u1f29\u1f32"+
|
||||
"\u1f39\u1f42\u1f47\u1f52\u1f59\u1f62\u1f69\u1f72\u1f7f\u1f82\u1f89\u1f92"+
|
||||
"\u1f99\u1fa2\u1fa9\u1fb2\u1fb6\u1fb8\u1fb9\u1fc0\u1fc0\u1fc4\u1fc6\u1fc8"+
|
||||
"\u1fc9\u1fd2\u1fd5\u1fd8\u1fd9\u1fe2\u1fe9\u1ff4\u1ff6\u1ff8\u1ff9\u210c"+
|
||||
"\u210c\u2110\u2111\u2115\u2115\u2131\u2131\u2136\u2136\u213b\u213b\u213e"+
|
||||
"\u213f\u2148\u214b\u2150\u2150\u2186\u2186\u2c32\u2c60\u2c63\u2c63\u2c67"+
|
||||
"\u2c68\u2c6a\u2c6a\u2c6c\u2c6c\u2c6e\u2c6e\u2c73\u2c73\u2c75\u2c76\u2c78"+
|
||||
"\u2c7d\u2c83\u2c83\u2c85\u2c85\u2c87\u2c87\u2c89\u2c89\u2c8b\u2c8b\u2c8d"+
|
||||
"\u2c8d\u2c8f\u2c8f\u2c91\u2c91\u2c93\u2c93\u2c95\u2c95\u2c97\u2c97\u2c99"+
|
||||
"\u2c99\u2c9b\u2c9b\u2c9d\u2c9d\u2c9f\u2c9f\u2ca1\u2ca1\u2ca3\u2ca3\u2ca5"+
|
||||
"\u2ca5\u2ca7\u2ca7\u2ca9\u2ca9\u2cab\u2cab\u2cad\u2cad\u2caf\u2caf\u2cb1"+
|
||||
"\u2cb1\u2cb3\u2cb3\u2cb5\u2cb5\u2cb7\u2cb7\u2cb9\u2cb9\u2cbb\u2cbb\u2cbd"+
|
||||
"\u2cbd\u2cbf\u2cbf\u2cc1\u2cc1\u2cc3\u2cc3\u2cc5\u2cc5\u2cc7\u2cc7\u2cc9"+
|
||||
"\u2cc9\u2ccb\u2ccb\u2ccd\u2ccd\u2ccf\u2ccf\u2cd1\u2cd1\u2cd3\u2cd3\u2cd5"+
|
||||
"\u2cd5\u2cd7\u2cd7\u2cd9\u2cd9\u2cdb\u2cdb\u2cdd\u2cdd\u2cdf\u2cdf\u2ce1"+
|
||||
"\u2ce1\u2ce3\u2ce3\u2ce5\u2ce6\u2cee\u2cee\u2cf0\u2cf0\u2cf5\u2cf5\u2d02"+
|
||||
"\u2d27\u2d29\u2d29\u2d2f\u2d2f\ua643\ua643\ua645\ua645\ua647\ua647\ua649"+
|
||||
"\ua649\ua64b\ua64b\ua64d\ua64d\ua64f\ua64f\ua651\ua651\ua653\ua653\ua655"+
|
||||
"\ua655\ua657\ua657\ua659\ua659\ua65b\ua65b\ua65d\ua65d\ua65f\ua65f\ua661"+
|
||||
"\ua661\ua663\ua663\ua665\ua665\ua667\ua667\ua669\ua669\ua66b\ua66b\ua66d"+
|
||||
"\ua66d\ua66f\ua66f\ua683\ua683\ua685\ua685\ua687\ua687\ua689\ua689\ua68b"+
|
||||
"\ua68b\ua68d\ua68d\ua68f\ua68f\ua691\ua691\ua693\ua693\ua695\ua695\ua697"+
|
||||
"\ua697\ua699\ua699\ua725\ua725\ua727\ua727\ua729\ua729\ua72b\ua72b\ua72d"+
|
||||
"\ua72d\ua72f\ua72f\ua731\ua733\ua735\ua735\ua737\ua737\ua739\ua739\ua73b"+
|
||||
"\ua73b\ua73d\ua73d\ua73f\ua73f\ua741\ua741\ua743\ua743\ua745\ua745\ua747"+
|
||||
"\ua747\ua749\ua749\ua74b\ua74b\ua74d\ua74d\ua74f\ua74f\ua751\ua751\ua753"+
|
||||
"\ua753\ua755\ua755\ua757\ua757\ua759\ua759\ua75b\ua75b\ua75d\ua75d\ua75f"+
|
||||
"\ua75f\ua761\ua761\ua763\ua763\ua765\ua765\ua767\ua767\ua769\ua769\ua76b"+
|
||||
"\ua76b\ua76d\ua76d\ua76f\ua76f\ua771\ua771\ua773\ua77a\ua77c\ua77c\ua77e"+
|
||||
"\ua77e\ua781\ua781\ua783\ua783\ua785\ua785\ua787\ua787\ua789\ua789\ua78e"+
|
||||
"\ua78e\ua790\ua790\ua793\ua793\ua795\ua795\ua7a3\ua7a3\ua7a5\ua7a5\ua7a7"+
|
||||
"\ua7a7\ua7a9\ua7a9\ua7ab\ua7ab\ua7fc\ua7fc\ufb02\ufb08\ufb15\ufb19\uff43"+
|
||||
"\uff5c\65\2\u02b2\u02c3\u02c8\u02d3\u02e2\u02e6\u02ee\u02ee\u02f0\u02f0"+
|
||||
"\u0376\u0376\u037c\u037c\u055b\u055b\u0642\u0642\u06e7\u06e8\u07f6\u07f7"+
|
||||
"\u07fc\u07fc\u081c\u081c\u0826\u0826\u082a\u082a\u0973\u0973\u0e48\u0e48"+
|
||||
"\u0ec8\u0ec8\u10fe\u10fe\u17d9\u17d9\u1845\u1845\u1aa9\u1aa9\u1c7a\u1c7f"+
|
||||
"\u1d2e\u1d6c\u1d7a\u1d7a\u1d9d\u1dc1\u2073\u2073\u2081\u2081\u2092\u209e"+
|
||||
"\u2c7e\u2c7f\u2d71\u2d71\u2e31\u2e31\u3007\u3007\u3033\u3037\u303d\u303d"+
|
||||
"\u309f\u30a0\u30fe\u3100\ua017\ua017\ua4fa\ua4ff\ua60e\ua60e\ua681\ua681"+
|
||||
"\ua719\ua721\ua772\ua772\ua78a\ua78a\ua7fa\ua7fb\ua9d1\ua9d1\uaa72\uaa72"+
|
||||
"\uaadf\uaadf\uaaf5\uaaf6\uff72\uff72\uffa0\uffa1\u0123\2\u00ac\u00ac\u00bc"+
|
||||
"\u00bc\u01bd\u01bd\u01c2\u01c5\u0296\u0296\u05d2\u05ec\u05f2\u05f4\u0622"+
|
||||
"\u0641\u0643\u064c\u0670\u0671\u0673\u06d5\u06d7\u06d7\u06f0\u06f1\u06fc"+
|
||||
"\u06fe\u0701\u0701\u0712\u0712\u0714\u0731\u074f\u07a7\u07b3\u07b3\u07cc"+
|
||||
"\u07ec\u0802\u0817\u0842\u085a\u08a2\u08a2\u08a4\u08ae\u0906\u093b\u093f"+
|
||||
"\u093f\u0952\u0952\u095a\u0963\u0974\u0979\u097b\u0981\u0987\u098e\u0991"+
|
||||
"\u0992\u0995\u09aa\u09ac\u09b2\u09b4\u09b4\u09b8\u09bb\u09bf\u09bf\u09d0"+
|
||||
"\u09d0\u09de\u09df\u09e1\u09e3\u09f2\u09f3\u0a07\u0a0c\u0a11\u0a12\u0a15"+
|
||||
"\u0a2a\u0a2c\u0a32\u0a34\u0a35\u0a37\u0a38\u0a3a\u0a3b\u0a5b\u0a5e\u0a60"+
|
||||
"\u0a60\u0a74\u0a76\u0a87\u0a8f\u0a91\u0a93\u0a95\u0aaa\u0aac\u0ab2\u0ab4"+
|
||||
"\u0ab5\u0ab7\u0abb\u0abf\u0abf\u0ad2\u0ad2\u0ae2\u0ae3\u0b07\u0b0e\u0b11"+
|
||||
"\u0b12\u0b15\u0b2a\u0b2c\u0b32\u0b34\u0b35\u0b37\u0b3b\u0b3f\u0b3f\u0b5e"+
|
||||
"\u0b5f\u0b61\u0b63\u0b73\u0b73\u0b85\u0b85\u0b87\u0b8c\u0b90\u0b92\u0b94"+
|
||||
"\u0b97\u0b9b\u0b9c\u0b9e\u0b9e\u0ba0\u0ba1\u0ba5\u0ba6\u0baa\u0bac\u0bb0"+
|
||||
"\u0bbb\u0bd2\u0bd2\u0c07\u0c0e\u0c10\u0c12\u0c14\u0c2a\u0c2c\u0c35\u0c37"+
|
||||
"\u0c3b\u0c3f\u0c3f\u0c5a\u0c5b\u0c62\u0c63\u0c87\u0c8e\u0c90\u0c92\u0c94"+
|
||||
"\u0caa\u0cac\u0cb5\u0cb7\u0cbb\u0cbf\u0cbf\u0ce0\u0ce0\u0ce2\u0ce3\u0cf3"+
|
||||
"\u0cf4\u0d07\u0d0e\u0d10\u0d12\u0d14\u0d3c\u0d3f\u0d3f\u0d50\u0d50\u0d62"+
|
||||
"\u0d63\u0d7c\u0d81\u0d87\u0d98\u0d9c\u0db3\u0db5\u0dbd\u0dbf\u0dbf\u0dc2"+
|
||||
"\u0dc8\u0e03\u0e32\u0e34\u0e35\u0e42\u0e47\u0e83\u0e84\u0e86\u0e86\u0e89"+
|
||||
"\u0e8a\u0e8c\u0e8c\u0e8f\u0e8f\u0e96\u0e99\u0e9b\u0ea1\u0ea3\u0ea5\u0ea7"+
|
||||
"\u0ea7\u0ea9\u0ea9\u0eac\u0ead\u0eaf\u0eb2\u0eb4\u0eb5\u0ebf\u0ebf\u0ec2"+
|
||||
"\u0ec6\u0ede\u0ee1\u0f02\u0f02\u0f42\u0f49\u0f4b\u0f6e\u0f8a\u0f8e\u1002"+
|
||||
"\u102c\u1041\u1041\u1052\u1057\u105c\u105f\u1063\u1063\u1067\u1068\u1070"+
|
||||
"\u1072\u1077\u1083\u1090\u1090\u10d2\u10fc\u10ff\u124a\u124c\u124f\u1252"+
|
||||
"\u1258\u125a\u125a\u125c\u125f\u1262\u128a\u128c\u128f\u1292\u12b2\u12b4"+
|
||||
"\u12b7\u12ba\u12c0\u12c2\u12c2\u12c4\u12c7\u12ca\u12d8\u12da\u1312\u1314"+
|
||||
"\u1317\u131a\u135c\u1382\u1391\u13a2\u13f6\u1403\u166e\u1671\u1681\u1683"+
|
||||
"\u169c\u16a2\u16ec\u1702\u170e\u1710\u1713\u1722\u1733\u1742\u1753\u1762"+
|
||||
"\u176e\u1770\u1772\u1782\u17b5\u17de\u17de\u1822\u1844\u1846\u1879\u1882"+
|
||||
"\u18aa\u18ac\u18ac\u18b2\u18f7\u1902\u191e\u1952\u196f\u1972\u1976\u1982"+
|
||||
"\u19ad\u19c3\u19c9\u1a02\u1a18\u1a22\u1a56\u1b07\u1b35\u1b47\u1b4d\u1b85"+
|
||||
"\u1ba2\u1bb0\u1bb1\u1bbc\u1be7\u1c02\u1c25\u1c4f\u1c51\u1c5c\u1c79\u1ceb"+
|
||||
"\u1cee\u1cf0\u1cf3\u1cf7\u1cf8\u2137\u213a\u2d32\u2d69\u2d82\u2d98\u2da2"+
|
||||
"\u2da8\u2daa\u2db0\u2db2\u2db8\u2dba\u2dc0\u2dc2\u2dc8\u2dca\u2dd0\u2dd2"+
|
||||
"\u2dd8\u2dda\u2de0\u3008\u3008\u303e\u303e\u3043\u3098\u30a1\u30a1\u30a3"+
|
||||
"\u30fc\u3101\u3101\u3107\u312f\u3133\u3190\u31a2\u31bc\u31f2\u3201\u3402"+
|
||||
"\u3402\u4db7\u4db7\u4e02\u4e02\u9fce\u9fce\ua002\ua016\ua018\ua48e\ua4d2"+
|
||||
"\ua4f9\ua502\ua60d\ua612\ua621\ua62c\ua62d\ua670\ua670\ua6a2\ua6e7\ua7fd"+
|
||||
"\ua803\ua805\ua807\ua809\ua80c\ua80e\ua824\ua842\ua875\ua884\ua8b5\ua8f4"+
|
||||
"\ua8f9\ua8fd\ua8fd\ua90c\ua927\ua932\ua948\ua962\ua97e\ua986\ua9b4\uaa02"+
|
||||
"\uaa2a\uaa42\uaa44\uaa46\uaa4d\uaa62\uaa71\uaa73\uaa78\uaa7c\uaa7c\uaa82"+
|
||||
"\uaab1\uaab3\uaab3\uaab7\uaab8\uaabb\uaabf\uaac2\uaac2\uaac4\uaac4\uaadd"+
|
||||
"\uaade\uaae2\uaaec\uaaf4\uaaf4\uab03\uab08\uab0b\uab10\uab13\uab18\uab22"+
|
||||
"\uab28\uab2a\uab30\uabc2\uabe4\uac02\uac02\ud7a5\ud7a5\ud7b2\ud7c8\ud7cd"+
|
||||
"\ud7fd\uf902\ufa6f\ufa72\ufadb\ufb1f\ufb1f\ufb21\ufb2a\ufb2c\ufb38\ufb3a"+
|
||||
"\ufb3e\ufb40\ufb40\ufb42\ufb43\ufb45\ufb46\ufb48\ufbb3\ufbd5\ufd3f\ufd52"+
|
||||
"\ufd91\ufd94\ufdc9\ufdf2\ufdfd\ufe72\ufe76\ufe78\ufefe\uff68\uff71\uff73"+
|
||||
"\uff9f\uffa2\uffc0\uffc4\uffc9\uffcc\uffd1\uffd4\uffd9\uffdc\uffde\f\2"+
|
||||
"\u01c7\u01c7\u01ca\u01ca\u01cd\u01cd\u01f4\u01f4\u1f8a\u1f91\u1f9a\u1fa1"+
|
||||
"\u1faa\u1fb1\u1fbe\u1fbe\u1fce\u1fce\u1ffe\u1ffe\u0242\2C\\\u00c2\u00d8"+
|
||||
"\u00da\u00e0\u0102\u0102\u0104\u0104\u0106\u0106\u0108\u0108\u010a\u010a"+
|
||||
"\u010c\u010c\u010e\u010e\u0110\u0110\u0112\u0112\u0114\u0114\u0116\u0116"+
|
||||
"\u0118\u0118\u011a\u011a\u011c\u011c\u011e\u011e\u0120\u0120\u0122\u0122"+
|
||||
"\u0124\u0124\u0126\u0126\u0128\u0128\u012a\u012a\u012c\u012c\u012e\u012e"+
|
||||
"\u0130\u0130\u0132\u0132\u0134\u0134\u0136\u0136\u0138\u0138\u013b\u013b"+
|
||||
"\u013d\u013d\u013f\u013f\u0141\u0141\u0143\u0143\u0145\u0145\u0147\u0147"+
|
||||
"\u0149\u0149\u014c\u014c\u014e\u014e\u0150\u0150\u0152\u0152\u0154\u0154"+
|
||||
"\u0156\u0156\u0158\u0158\u015a\u015a\u015c\u015c\u015e\u015e\u0160\u0160"+
|
||||
"\u0162\u0162\u0164\u0164\u0166\u0166\u0168\u0168\u016a\u016a\u016c\u016c"+
|
||||
"\u016e\u016e\u0170\u0170\u0172\u0172\u0174\u0174\u0176\u0176\u0178\u0178"+
|
||||
"\u017a\u017b\u017d\u017d\u017f\u017f\u0183\u0184\u0186\u0186\u0188\u0189"+
|
||||
"\u018b\u018d\u0190\u0193\u0195\u0196\u0198\u019a\u019e\u019f\u01a1\u01a2"+
|
||||
"\u01a4\u01a4\u01a6\u01a6\u01a8\u01a9\u01ab\u01ab\u01ae\u01ae\u01b0\u01b1"+
|
||||
"\u01b3\u01b5\u01b7\u01b7\u01b9\u01ba\u01be\u01be\u01c6\u01c6\u01c9\u01c9"+
|
||||
"\u01cc\u01cc\u01cf\u01cf\u01d1\u01d1\u01d3\u01d3\u01d5\u01d5\u01d7\u01d7"+
|
||||
"\u01d9\u01d9\u01db\u01db\u01dd\u01dd\u01e0\u01e0\u01e2\u01e2\u01e4\u01e4"+
|
||||
"\u01e6\u01e6\u01e8\u01e8\u01ea\u01ea\u01ec\u01ec\u01ee\u01ee\u01f0\u01f0"+
|
||||
"\u01f3\u01f3\u01f6\u01f6\u01f8\u01fa\u01fc\u01fc\u01fe\u01fe\u0200\u0200"+
|
||||
"\u0202\u0202\u0204\u0204\u0206\u0206\u0208\u0208\u020a\u020a\u020c\u020c"+
|
||||
"\u020e\u020e\u0210\u0210\u0212\u0212\u0214\u0214\u0216\u0216\u0218\u0218"+
|
||||
"\u021a\u021a\u021c\u021c\u021e\u021e\u0220\u0220\u0222\u0222\u0224\u0224"+
|
||||
"\u0226\u0226\u0228\u0228\u022a\u022a\u022c\u022c\u022e\u022e\u0230\u0230"+
|
||||
"\u0232\u0232\u0234\u0234\u023c\u023d\u023f\u0240\u0243\u0243\u0245\u0248"+
|
||||
"\u024a\u024a\u024c\u024c\u024e\u024e\u0250\u0250\u0372\u0372\u0374\u0374"+
|
||||
"\u0378\u0378\u0388\u0388\u038a\u038c\u038e\u038e\u0390\u0391\u0393\u03a3"+
|
||||
"\u03a5\u03ad\u03d1\u03d1\u03d4\u03d6\u03da\u03da\u03dc\u03dc\u03de\u03de"+
|
||||
"\u03e0\u03e0\u03e2\u03e2\u03e4\u03e4\u03e6\u03e6\u03e8\u03e8\u03ea\u03ea"+
|
||||
"\u03ec\u03ec\u03ee\u03ee\u03f0\u03f0\u03f6\u03f6\u03f9\u03f9\u03fb\u03fc"+
|
||||
"\u03ff\u0431\u0462\u0462\u0464\u0464\u0466\u0466\u0468\u0468\u046a\u046a"+
|
||||
"\u046c\u046c\u046e\u046e\u0470\u0470\u0472\u0472\u0474\u0474\u0476\u0476"+
|
||||
"\u0478\u0478\u047a\u047a\u047c\u047c\u047e\u047e\u0480\u0480\u0482\u0482"+
|
||||
"\u048c\u048c\u048e\u048e\u0490\u0490\u0492\u0492\u0494\u0494\u0496\u0496"+
|
||||
"\u0498\u0498\u049a\u049a\u049c\u049c\u049e\u049e\u04a0\u04a0\u04a2\u04a2"+
|
||||
"\u04a4\u04a4\u04a6\u04a6\u04a8\u04a8\u04aa\u04aa\u04ac\u04ac\u04ae\u04ae"+
|
||||
"\u04b0\u04b0\u04b2\u04b2\u04b4\u04b4\u04b6\u04b6\u04b8\u04b8\u04ba\u04ba"+
|
||||
"\u04bc\u04bc\u04be\u04be\u04c0\u04c0\u04c2\u04c3\u04c5\u04c5\u04c7\u04c7"+
|
||||
"\u04c9\u04c9\u04cb\u04cb\u04cd\u04cd\u04cf\u04cf\u04d2\u04d2\u04d4\u04d4"+
|
||||
"\u04d6\u04d6\u04d8\u04d8\u04da\u04da\u04dc\u04dc\u04de\u04de\u04e0\u04e0"+
|
||||
"\u04e2\u04e2\u04e4\u04e4\u04e6\u04e6\u04e8\u04e8\u04ea\u04ea\u04ec\u04ec"+
|
||||
"\u04ee\u04ee\u04f0\u04f0\u04f2\u04f2\u04f4\u04f4\u04f6\u04f6\u04f8\u04f8"+
|
||||
"\u04fa\u04fa\u04fc\u04fc\u04fe\u04fe\u0500\u0500\u0502\u0502\u0504\u0504"+
|
||||
"\u0506\u0506\u0508\u0508\u050a\u050a\u050c\u050c\u050e\u050e\u0510\u0510"+
|
||||
"\u0512\u0512\u0514\u0514\u0516\u0516\u0518\u0518\u051a\u051a\u051c\u051c"+
|
||||
"\u051e\u051e\u0520\u0520\u0522\u0522\u0524\u0524\u0526\u0526\u0528\u0528"+
|
||||
"\u0533\u0558\u10a2\u10c7\u10c9\u10c9\u10cf\u10cf\u1e02\u1e02\u1e04\u1e04"+
|
||||
"\u1e06\u1e06\u1e08\u1e08\u1e0a\u1e0a\u1e0c\u1e0c\u1e0e\u1e0e\u1e10\u1e10"+
|
||||
"\u1e12\u1e12\u1e14\u1e14\u1e16\u1e16\u1e18\u1e18\u1e1a\u1e1a\u1e1c\u1e1c"+
|
||||
"\u1e1e\u1e1e\u1e20\u1e20\u1e22\u1e22\u1e24\u1e24\u1e26\u1e26\u1e28\u1e28"+
|
||||
"\u1e2a\u1e2a\u1e2c\u1e2c\u1e2e\u1e2e\u1e30\u1e30\u1e32\u1e32\u1e34\u1e34"+
|
||||
"\u1e36\u1e36\u1e38\u1e38\u1e3a\u1e3a\u1e3c\u1e3c\u1e3e\u1e3e\u1e40\u1e40"+
|
||||
"\u1e42\u1e42\u1e44\u1e44\u1e46\u1e46\u1e48\u1e48\u1e4a\u1e4a\u1e4c\u1e4c"+
|
||||
"\u1e4e\u1e4e\u1e50\u1e50\u1e52\u1e52\u1e54\u1e54\u1e56\u1e56\u1e58\u1e58"+
|
||||
"\u1e5a\u1e5a\u1e5c\u1e5c\u1e5e\u1e5e\u1e60\u1e60\u1e62\u1e62\u1e64\u1e64"+
|
||||
"\u1e66\u1e66\u1e68\u1e68\u1e6a\u1e6a\u1e6c\u1e6c\u1e6e\u1e6e\u1e70\u1e70"+
|
||||
"\u1e72\u1e72\u1e74\u1e74\u1e76\u1e76\u1e78\u1e78\u1e7a\u1e7a\u1e7c\u1e7c"+
|
||||
"\u1e7e\u1e7e\u1e80\u1e80\u1e82\u1e82\u1e84\u1e84\u1e86\u1e86\u1e88\u1e88"+
|
||||
"\u1e8a\u1e8a\u1e8c\u1e8c\u1e8e\u1e8e\u1e90\u1e90\u1e92\u1e92\u1e94\u1e94"+
|
||||
"\u1e96\u1e96\u1ea0\u1ea0\u1ea2\u1ea2\u1ea4\u1ea4\u1ea6\u1ea6\u1ea8\u1ea8"+
|
||||
"\u1eaa\u1eaa\u1eac\u1eac\u1eae\u1eae\u1eb0\u1eb0\u1eb2\u1eb2\u1eb4\u1eb4"+
|
||||
"\u1eb6\u1eb6\u1eb8\u1eb8\u1eba\u1eba\u1ebc\u1ebc\u1ebe\u1ebe\u1ec0\u1ec0"+
|
||||
"\u1ec2\u1ec2\u1ec4\u1ec4\u1ec6\u1ec6\u1ec8\u1ec8\u1eca\u1eca\u1ecc\u1ecc"+
|
||||
"\u1ece\u1ece\u1ed0\u1ed0\u1ed2\u1ed2\u1ed4\u1ed4\u1ed6\u1ed6\u1ed8\u1ed8"+
|
||||
"\u1eda\u1eda\u1edc\u1edc\u1ede\u1ede\u1ee0\u1ee0\u1ee2\u1ee2\u1ee4\u1ee4"+
|
||||
"\u1ee6\u1ee6\u1ee8\u1ee8\u1eea\u1eea\u1eec\u1eec\u1eee\u1eee\u1ef0\u1ef0"+
|
||||
"\u1ef2\u1ef2\u1ef4\u1ef4\u1ef6\u1ef6\u1ef8\u1ef8\u1efa\u1efa\u1efc\u1efc"+
|
||||
"\u1efe\u1efe\u1f00\u1f00\u1f0a\u1f11\u1f1a\u1f1f\u1f2a\u1f31\u1f3a\u1f41"+
|
||||
"\u1f4a\u1f4f\u1f5b\u1f5b\u1f5d\u1f5d\u1f5f\u1f5f\u1f61\u1f61\u1f6a\u1f71"+
|
||||
"\u1fba\u1fbd\u1fca\u1fcd\u1fda\u1fdd\u1fea\u1fee\u1ffa\u1ffd\u2104\u2104"+
|
||||
"\u2109\u2109\u210d\u210f\u2112\u2114\u2117\u2117\u211b\u211f\u2126\u2126"+
|
||||
"\u2128\u2128\u212a\u212a\u212c\u212f\u2132\u2135\u2140\u2141\u2147\u2147"+
|
||||
"\u2185\u2185\u2c02\u2c30\u2c62\u2c62\u2c64\u2c66\u2c69\u2c69\u2c6b\u2c6b"+
|
||||
"\u2c6d\u2c6d\u2c6f\u2c72\u2c74\u2c74\u2c77\u2c77\u2c80\u2c82\u2c84\u2c84"+
|
||||
"\u2c86\u2c86\u2c88\u2c88\u2c8a\u2c8a\u2c8c\u2c8c\u2c8e\u2c8e\u2c90\u2c90"+
|
||||
"\u2c92\u2c92\u2c94\u2c94\u2c96\u2c96\u2c98\u2c98\u2c9a\u2c9a\u2c9c\u2c9c"+
|
||||
"\u2c9e\u2c9e\u2ca0\u2ca0\u2ca2\u2ca2\u2ca4\u2ca4\u2ca6\u2ca6\u2ca8\u2ca8"+
|
||||
"\u2caa\u2caa\u2cac\u2cac\u2cae\u2cae\u2cb0\u2cb0\u2cb2\u2cb2\u2cb4\u2cb4"+
|
||||
"\u2cb6\u2cb6\u2cb8\u2cb8\u2cba\u2cba\u2cbc\u2cbc\u2cbe\u2cbe\u2cc0\u2cc0"+
|
||||
"\u2cc2\u2cc2\u2cc4\u2cc4\u2cc6\u2cc6\u2cc8\u2cc8\u2cca\u2cca\u2ccc\u2ccc"+
|
||||
"\u2cce\u2cce\u2cd0\u2cd0\u2cd2\u2cd2\u2cd4\u2cd4\u2cd6\u2cd6\u2cd8\u2cd8"+
|
||||
"\u2cda\u2cda\u2cdc\u2cdc\u2cde\u2cde\u2ce0\u2ce0\u2ce2\u2ce2\u2ce4\u2ce4"+
|
||||
"\u2ced\u2ced\u2cef\u2cef\u2cf4\u2cf4\ua642\ua642\ua644\ua644\ua646\ua646"+
|
||||
"\ua648\ua648\ua64a\ua64a\ua64c\ua64c\ua64e\ua64e\ua650\ua650\ua652\ua652"+
|
||||
"\ua654\ua654\ua656\ua656\ua658\ua658\ua65a\ua65a\ua65c\ua65c\ua65e\ua65e"+
|
||||
"\ua660\ua660\ua662\ua662\ua664\ua664\ua666\ua666\ua668\ua668\ua66a\ua66a"+
|
||||
"\ua66c\ua66c\ua66e\ua66e\ua682\ua682\ua684\ua684\ua686\ua686\ua688\ua688"+
|
||||
"\ua68a\ua68a\ua68c\ua68c\ua68e\ua68e\ua690\ua690\ua692\ua692\ua694\ua694"+
|
||||
"\ua696\ua696\ua698\ua698\ua724\ua724\ua726\ua726\ua728\ua728\ua72a\ua72a"+
|
||||
"\ua72c\ua72c\ua72e\ua72e\ua730\ua730\ua734\ua734\ua736\ua736\ua738\ua738"+
|
||||
"\ua73a\ua73a\ua73c\ua73c\ua73e\ua73e\ua740\ua740\ua742\ua742\ua744\ua744"+
|
||||
"\ua746\ua746\ua748\ua748\ua74a\ua74a\ua74c\ua74c\ua74e\ua74e\ua750\ua750"+
|
||||
"\ua752\ua752\ua754\ua754\ua756\ua756\ua758\ua758\ua75a\ua75a\ua75c\ua75c"+
|
||||
"\ua75e\ua75e\ua760\ua760\ua762\ua762\ua764\ua764\ua766\ua766\ua768\ua768"+
|
||||
"\ua76a\ua76a\ua76c\ua76c\ua76e\ua76e\ua770\ua770\ua77b\ua77b\ua77d\ua77d"+
|
||||
"\ua77f\ua780\ua782\ua782\ua784\ua784\ua786\ua786\ua788\ua788\ua78d\ua78d"+
|
||||
"\ua78f\ua78f\ua792\ua792\ua794\ua794\ua7a2\ua7a2\ua7a4\ua7a4\ua7a6\ua7a6"+
|
||||
"\ua7a8\ua7a8\ua7aa\ua7aa\ua7ac\ua7ac\uff23\uff3c%\2\62;\u0662\u066b\u06f2"+
|
||||
"\u06fb\u07c2\u07cb\u0968\u0971\u09e8\u09f1\u0a68\u0a71\u0ae8\u0af1\u0b68"+
|
||||
"\u0b71\u0be8\u0bf1\u0c68\u0c71\u0ce8\u0cf1\u0d68\u0d71\u0e52\u0e5b\u0ed2"+
|
||||
"\u0edb\u0f22\u0f2b\u1042\u104b\u1092\u109b\u17e2\u17eb\u1812\u181b\u1948"+
|
||||
"\u1951\u19d2\u19db\u1a82\u1a8b\u1a92\u1a9b\u1b52\u1b5b\u1bb2\u1bbb\u1c42"+
|
||||
"\u1c4b\u1c52\u1c5b\ua622\ua62b\ua8d2\ua8db\ua902\ua90b\ua9d2\ua9db\uaa52"+
|
||||
"\uaa5b\uabf2\uabfb\uff12\uff1b\t\2\u16f0\u16f2\u2162\u2184\u2187\u218a"+
|
||||
"\u3009\u3009\u3023\u302b\u303a\u303c\ua6e8\ua6f1\2\36\2\3\3\2\2\2\2\5"+
|
||||
"\3\2\2\2\2\7\3\2\2\2\2\t\3\2\2\2\2\13\3\2\2\2\2\r\3\2\2\2\2\17\3\2\2\2"+
|
||||
"\3\21\3\2\2\2\5\23\3\2\2\2\7\25\3\2\2\2\t\27\3\2\2\2\13\31\3\2\2\2\r\33"+
|
||||
"\3\2\2\2\17\35\3\2\2\2\21\22\t\2\2\2\22\4\3\2\2\2\23\24\t\3\2\2\24\6\3"+
|
||||
"\2\2\2\25\26\t\4\2\2\26\b\3\2\2\2\27\30\t\5\2\2\30\n\3\2\2\2\31\32\t\6"+
|
||||
"\2\2\32\f\3\2\2\2\33\34\t\7\2\2\34\16\3\2\2\2\35\36\t\b\2\2\36\20\3\2"+
|
||||
"\2\2\3\2\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
||||
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
||||
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
||||
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
UNICODE_CLASS_LL=1
|
||||
UNICODE_CLASS_LM=2
|
||||
UNICODE_CLASS_LO=3
|
||||
UNICODE_CLASS_LT=4
|
||||
UNICODE_CLASS_LU=5
|
||||
UNICODE_CLASS_ND=6
|
||||
UNICODE_CLASS_NL=7
|
||||
Reference in New Issue
Block a user