mirror of
https://gitlab.com/camelot/kickc.git
synced 2024-11-27 19:50:10 +00:00
Moved test.
This commit is contained in:
parent
8885aa0fbd
commit
a3b3eadeef
@ -1,4 +1,4 @@
|
||||
package dk.camelot64.kickc.parsing;
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
|
||||
import dk.camelot64.kickc.model.CompileError;
|
||||
import org.antlr.v4.runtime.*;
|
@ -24,8 +24,8 @@ typeName
|
||||
| TYPEIDENTIFIER #typeNameTypedef
|
||||
;
|
||||
|
||||
IDENTIFIER: [a-zA-Z_]+ {!getText().equals("T")}?;
|
||||
SIMPLETYPE: 'char' | 'int';
|
||||
IDENTIFIER: [a-zA-Z_]+ {!getText().equals("T")}?;
|
||||
TYPEIDENTIFIER: [a-zA-Z_]+ {getText().equals("T")}?;
|
||||
WHITESPACE
|
||||
: [ \t\r\n]+
|
@ -1,8 +1,8 @@
|
||||
T__0=1
|
||||
T__1=2
|
||||
T__2=3
|
||||
IDENTIFIER=4
|
||||
SIMPLETYPE=5
|
||||
SIMPLETYPE=4
|
||||
IDENTIFIER=5
|
||||
TYPEIDENTIFIER=6
|
||||
WHITESPACE=7
|
||||
'('=1
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
|
||||
import org.antlr.v4.runtime.ParserRuleContext;
|
||||
import org.antlr.v4.runtime.tree.ErrorNode;
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
|
||||
|
||||
/**
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
import org.antlr.v4.runtime.Lexer;
|
||||
import org.antlr.v4.runtime.CharStream;
|
||||
import org.antlr.v4.runtime.Token;
|
||||
@ -17,7 +17,7 @@ public class TypedefLexer extends Lexer {
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0=1, T__1=2, T__2=3, IDENTIFIER=4, SIMPLETYPE=5, TYPEIDENTIFIER=6,
|
||||
T__0=1, T__1=2, T__2=3, SIMPLETYPE=4, IDENTIFIER=5, TYPEIDENTIFIER=6,
|
||||
WHITESPACE=7;
|
||||
public static String[] channelNames = {
|
||||
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
|
||||
@ -28,7 +28,7 @@ public class TypedefLexer extends Lexer {
|
||||
};
|
||||
|
||||
public static final String[] ruleNames = {
|
||||
"T__0", "T__1", "T__2", "IDENTIFIER", "SIMPLETYPE", "TYPEIDENTIFIER",
|
||||
"T__0", "T__1", "T__2", "SIMPLETYPE", "IDENTIFIER", "TYPEIDENTIFIER",
|
||||
"WHITESPACE"
|
||||
};
|
||||
|
||||
@ -36,7 +36,7 @@ public class TypedefLexer extends Lexer {
|
||||
null, "'('", "')'", "'&'"
|
||||
};
|
||||
private static final String[] _SYMBOLIC_NAMES = {
|
||||
null, null, null, null, "IDENTIFIER", "SIMPLETYPE", "TYPEIDENTIFIER",
|
||||
null, null, null, null, "SIMPLETYPE", "IDENTIFIER", "TYPEIDENTIFIER",
|
||||
"WHITESPACE"
|
||||
};
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
@ -99,7 +99,7 @@ public class TypedefLexer extends Lexer {
|
||||
@Override
|
||||
public boolean sempred(RuleContext _localctx, int ruleIndex, int predIndex) {
|
||||
switch (ruleIndex) {
|
||||
case 3:
|
||||
case 4:
|
||||
return IDENTIFIER_sempred((RuleContext)_localctx, predIndex);
|
||||
case 5:
|
||||
return TYPEIDENTIFIER_sempred((RuleContext)_localctx, predIndex);
|
||||
@ -124,19 +124,19 @@ public class TypedefLexer extends Lexer {
|
||||
public static final String _serializedATN =
|
||||
"\3\u608b\ua72a\u8133\ub9ed\u417c\u3be7\u7786\u5964\2\t\65\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\6\5\31\n\5\r\5\16\5\32\3\5\3\5\3\6\3\6\3\6\3\6\3\6\3\6\3\6\5\6"+
|
||||
"&\n\6\3\7\6\7)\n\7\r\7\16\7*\3\7\3\7\3\b\6\b\60\n\b\r\b\16\b\61\3\b\3"+
|
||||
"\b\2\2\t\3\3\5\4\7\5\t\6\13\7\r\b\17\t\3\2\4\5\2C\\aac|\5\2\13\f\17\17"+
|
||||
"\"\"\28\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\30\3"+
|
||||
"\2\2\2\13%\3\2\2\2\r(\3\2\2\2\17/\3\2\2\2\21\22\7*\2\2\22\4\3\2\2\2\23"+
|
||||
"\24\7+\2\2\24\6\3\2\2\2\25\26\7(\2\2\26\b\3\2\2\2\27\31\t\2\2\2\30\27"+
|
||||
"\3\2\2\2\31\32\3\2\2\2\32\30\3\2\2\2\32\33\3\2\2\2\33\34\3\2\2\2\34\35"+
|
||||
"\6\5\2\2\35\n\3\2\2\2\36\37\7e\2\2\37 \7j\2\2 !\7c\2\2!&\7t\2\2\"#\7k"+
|
||||
"\2\2#$\7p\2\2$&\7v\2\2%\36\3\2\2\2%\"\3\2\2\2&\f\3\2\2\2\')\t\2\2\2(\'"+
|
||||
"\3\2\2\2)*\3\2\2\2*(\3\2\2\2*+\3\2\2\2+,\3\2\2\2,-\6\7\3\2-\16\3\2\2\2"+
|
||||
".\60\t\3\2\2/.\3\2\2\2\60\61\3\2\2\2\61/\3\2\2\2\61\62\3\2\2\2\62\63\3"+
|
||||
"\2\2\2\63\64\b\b\2\2\64\20\3\2\2\2\7\2\32%*\61\3\b\2\2";
|
||||
"\4\3\5\3\5\3\5\3\5\3\5\3\5\3\5\5\5\37\n\5\3\6\6\6\"\n\6\r\6\16\6#\3\6"+
|
||||
"\3\6\3\7\6\7)\n\7\r\7\16\7*\3\7\3\7\3\b\6\b\60\n\b\r\b\16\b\61\3\b\3\b"+
|
||||
"\2\2\t\3\3\5\4\7\5\t\6\13\7\r\b\17\t\3\2\4\5\2C\\aac|\5\2\13\f\17\17\""+
|
||||
"\"\28\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\36\3\2"+
|
||||
"\2\2\13!\3\2\2\2\r(\3\2\2\2\17/\3\2\2\2\21\22\7*\2\2\22\4\3\2\2\2\23\24"+
|
||||
"\7+\2\2\24\6\3\2\2\2\25\26\7(\2\2\26\b\3\2\2\2\27\30\7e\2\2\30\31\7j\2"+
|
||||
"\2\31\32\7c\2\2\32\37\7t\2\2\33\34\7k\2\2\34\35\7p\2\2\35\37\7v\2\2\36"+
|
||||
"\27\3\2\2\2\36\33\3\2\2\2\37\n\3\2\2\2 \"\t\2\2\2! \3\2\2\2\"#\3\2\2\2"+
|
||||
"#!\3\2\2\2#$\3\2\2\2$%\3\2\2\2%&\6\6\2\2&\f\3\2\2\2\')\t\2\2\2(\'\3\2"+
|
||||
"\2\2)*\3\2\2\2*(\3\2\2\2*+\3\2\2\2+,\3\2\2\2,-\6\7\3\2-\16\3\2\2\2.\60"+
|
||||
"\t\3\2\2/.\3\2\2\2\60\61\3\2\2\2\61/\3\2\2\2\61\62\3\2\2\2\62\63\3\2\2"+
|
||||
"\2\63\64\b\b\2\2\64\20\3\2\2\2\7\2\36#*\61\3\b\2\2";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
||||
static {
|
@ -1,8 +1,8 @@
|
||||
T__0=1
|
||||
T__1=2
|
||||
T__2=3
|
||||
IDENTIFIER=4
|
||||
SIMPLETYPE=5
|
||||
SIMPLETYPE=4
|
||||
IDENTIFIER=5
|
||||
TYPEIDENTIFIER=6
|
||||
WHITESPACE=7
|
||||
'('=1
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeListener;
|
||||
|
||||
/**
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
import org.antlr.v4.runtime.atn.*;
|
||||
import org.antlr.v4.runtime.dfa.DFA;
|
||||
import org.antlr.v4.runtime.*;
|
||||
@ -17,7 +17,7 @@ public class TypedefParser extends Parser {
|
||||
protected static final PredictionContextCache _sharedContextCache =
|
||||
new PredictionContextCache();
|
||||
public static final int
|
||||
T__0=1, T__1=2, T__2=3, IDENTIFIER=4, SIMPLETYPE=5, TYPEIDENTIFIER=6,
|
||||
T__0=1, T__1=2, T__2=3, SIMPLETYPE=4, IDENTIFIER=5, TYPEIDENTIFIER=6,
|
||||
WHITESPACE=7;
|
||||
public static final int
|
||||
RULE_expr = 0, RULE_typeName = 1;
|
||||
@ -29,7 +29,7 @@ public class TypedefParser extends Parser {
|
||||
null, "'('", "')'", "'&'"
|
||||
};
|
||||
private static final String[] _SYMBOLIC_NAMES = {
|
||||
null, null, null, null, "IDENTIFIER", "SIMPLETYPE", "TYPEIDENTIFIER",
|
||||
null, null, null, null, "SIMPLETYPE", "IDENTIFIER", "TYPEIDENTIFIER",
|
||||
"WHITESPACE"
|
||||
};
|
||||
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
||||
@ -402,11 +402,11 @@ public class TypedefParser extends Parser {
|
||||
"\3\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\3\2\5\2\24\n\2\3\2"+
|
||||
"\3\2\3\2\7\2\31\n\2\f\2\16\2\34\13\2\3\3\3\3\5\3 \n\3\3\3\2\3\2\4\2\4"+
|
||||
"\2\2\2$\2\23\3\2\2\2\4\37\3\2\2\2\6\7\b\2\1\2\7\b\7\3\2\2\b\t\5\4\3\2"+
|
||||
"\t\n\7\4\2\2\n\13\5\2\2\7\13\24\3\2\2\2\f\24\7\6\2\2\r\16\7\3\2\2\16\17"+
|
||||
"\t\n\7\4\2\2\n\13\5\2\2\7\13\24\3\2\2\2\f\24\7\7\2\2\r\16\7\3\2\2\16\17"+
|
||||
"\5\2\2\2\17\20\7\4\2\2\20\24\3\2\2\2\21\22\7\5\2\2\22\24\5\2\2\4\23\6"+
|
||||
"\3\2\2\2\23\f\3\2\2\2\23\r\3\2\2\2\23\21\3\2\2\2\24\32\3\2\2\2\25\26\f"+
|
||||
"\3\2\2\26\27\7\5\2\2\27\31\5\2\2\4\30\25\3\2\2\2\31\34\3\2\2\2\32\30\3"+
|
||||
"\2\2\2\32\33\3\2\2\2\33\3\3\2\2\2\34\32\3\2\2\2\35 \7\7\2\2\36 \7\b\2"+
|
||||
"\2\2\2\32\33\3\2\2\2\33\3\3\2\2\2\34\32\3\2\2\2\35 \7\6\2\2\36 \7\b\2"+
|
||||
"\2\37\35\3\2\2\2\37\36\3\2\2\2 \5\3\2\2\2\5\23\32\37";
|
||||
public static final ATN _ATN =
|
||||
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
@ -1,5 +1,5 @@
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing;
|
||||
// Generated from /Users/jespergravgaard/c64/kickc/src/test/java/dk/camelot64/kickc/parsing/typedef/Typedef.g4 by ANTLR 4.7
|
||||
package dk.camelot64.kickc.parsing.typedef;
|
||||
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
|
||||
|
||||
/**
|
Loading…
Reference in New Issue
Block a user