Winx! Now with interfaces and packages

This commit is contained in:
2024-03-06 22:59:44 +02:00
parent e3c436ff30
commit b5a3ca157c
23 changed files with 3090 additions and 2684 deletions

10
.idea/misc.xml generated
View File

@@ -13,6 +13,16 @@
<option name="language" value="" />
<option name="generateVisitor" value="true" />
</PerGrammarGenerationSettings>
<PerGrammarGenerationSettings>
<option name="fileName" value="$PROJECT_DIR$/src/grammars/Winx.g4" />
<option name="autoGen" value="true" />
<option name="outputDir" value="D:\Source\JavaProjects\dsl-formal-requirements\src\main\java" />
<option name="libDir" value="" />
<option name="encoding" value="" />
<option name="pkg" value="org.lumijiez.parser" />
<option name="language" value="" />
<option name="generateVisitor" value="true" />
</PerGrammarGenerationSettings>
</list>
</option>
</component>

View File

@@ -1,100 +0,0 @@
grammar SoftwareRequirements;
// Loser rules
ID : [a-zA-Z]+ ;
STRING : '"' ~'"'* '"' ;
DESCRIPTION : '~' ~[~]*? '~' ;
WS : [ \t\r\n]+ -> skip ;
INT : [0-9]+ ;
FLOAT : [0-9]+ '.' [0-9]* | '.' [0-9]+ ;
// Puturos rules
program : description?
'package' ID
'{'
program_body
'}'
;
program_body : (requirementSpec | functionSpec)+ ;
requirementSpec : description?
importance?
ID '{'
req_specification*
result_specification*
'}' ;
req_specification : importance? '@' ID (logical_op ID)* ';';
result_specification : 'result' importance? ID ';';
predicate : expression '=>' expression ;
expression : term (logical_op term)* ;
term : '{' expression '}'
| STRING;
logical_op : '&&' | '||' ;
// Function Specification
functionSpec : description?
importance?
access_modifiers?
ID'(' input_types? ')'
functionBody
;
functionBody : '{'
specification*
return_types
'}'
;
input_types : variable (',' variable)*;
return_types : 'return' variable (',' variable)* ';' ;
specification : '@' ID ':'
STRING
';'
;
// General Rules
variable : type '[]'? ID;
importance : 'critical' | 'optional' ;
type : 'INT'
| 'FLOAT'
| 'DOUBLE'
| 'STRING'
| 'BOOLEAN'
| 'CHAR'
| 'VOID'
;
access_modifiers : 'public'
| 'protected'
| 'private'
| 'default'
;
description : DESCRIPTION;
// Symballs
LPAREN : '(' ;
RPAREN : ')' ;
COLON : ':' ;
SEMICOLON : ';' ;
COMMA : ',' ;
LBRACE : '{' ;
RBRACE : '}' ;
TILDE : '~' ;
EXCLAM : '!' ;

111
src/grammars/Winx.g4 Normal file
View File

@@ -0,0 +1,111 @@
grammar Winx;
// Lexer rules
ID : [a-zA-Z]+ ;
STRING : '"' ~'"'* '"' ;
DESCRIPTION : '~' ~[~]*? '~' ;
WS : [ \t\r\n]+ -> skip ;
INT : [0-9]+ ;
FLOAT : [0-9]+ '.' [0-9]* | '.' [0-9]+ ;
// Parser rules
winx : (package | DESCRIPTION)+;
body : (
interface
| specification
| DESCRIPTION
)+ ;
// Hierarchies
package : 'package' ID '{' body '}' ;
interface : importance?
access_modifiers?
'interface'
ID '{' interface_body '}' ;
specification : 'specification'
ID ('implements' ID)*
'{' specification_body '}' ;
interface_body : (requirementSpec | functionSpec)+ ;
specification_body : (requirementSpec | functionSpec)+ ;
// Non-functional Requirements
requirementSpec : description?
importance?
ID '{'
req_specification*
result_specification*
'}' ;
req_specification : importance? '@' ID (logical_op ID)* ';' ;
result_specification : 'result' importance? ID ';' ;
logical_op : 'AND' | 'OR' ;
// Functional Requirements
functionSpec : description?
importance?
access_modifiers?
ID'(' input_types? ')'
('implements' ID)*
functionBody
;
functionBody : '{'
specificationEntry*
return_types
'}'
;
input_types : variable (',' variable)* ;
return_types : 'return' variable (',' variable)* ';' ;
specificationEntry : '@' ID ':'
STRING
';'
;
// General Rules
variable : type '[]'? ID;
importance : 'critical' | 'optional' ;
type : 'INT'
| 'FLOAT'
| 'DOUBLE'
| 'STRING'
| 'BOOLEAN'
| 'CHAR'
| 'VOID'
;
access_modifiers : 'public'
| 'protected'
| 'private'
| 'default'
;
description : DESCRIPTION;
// Symballs
LPAREN : '(' ;
RPAREN : ')' ;
COLON : ':' ;
SEMICOLON : ';' ;
COMMA : ',' ;
LBRACE : '{' ;
RBRACE : '}' ;
TILDE : '~' ;
EXCLAM : '!' ;

View File

@@ -4,9 +4,9 @@ import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;
import org.antlr.v4.runtime.tree.ParseTreeWalker;
import org.lumijiez.parser.SoftwareRequirementsBaseListener;
import org.lumijiez.parser.SoftwareRequirementsLexer;
import org.lumijiez.parser.SoftwareRequirementsParser;
import org.lumijiez.parser.WinxBaseListener;
import org.lumijiez.parser.WinxLexer;
import org.lumijiez.parser.WinxParser;
import java.io.IOException;
import java.net.URISyntaxException;
@@ -19,18 +19,18 @@ public class Main {
String input = new String(Files.readAllBytes(Path.of(Objects.requireNonNull(Main.class.getResource("/TestProgram.txt")).toURI())));
CharStream inputStream = CharStreams.fromString(input);
SoftwareRequirementsLexer lexer = new SoftwareRequirementsLexer(inputStream);
WinxLexer lexer = new WinxLexer(inputStream);
CommonTokenStream tokenStream = new CommonTokenStream(lexer);
SoftwareRequirementsParser parser = new SoftwareRequirementsParser(tokenStream);
WinxParser parser = new WinxParser(tokenStream);
ParseTreeWalker walker = new ParseTreeWalker();
SoftwareReqParseTree listener = new SoftwareReqParseTree();
walker.walk(listener, parser.program());
walker.walk(listener, parser.winx());
}
static class SoftwareReqParseTree extends SoftwareRequirementsBaseListener {
static class SoftwareReqParseTree extends WinxBaseListener {
@Override
public void enterProgram(SoftwareRequirementsParser.ProgramContext ctx) {
public void enterWinx(WinxParser.WinxContext ctx) {
System.out.println("Parsed: " + ctx.getText());
}
}

File diff suppressed because one or more lines are too long

View File

@@ -1,66 +0,0 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
ID=22
STRING=23
DESCRIPTION=24
WS=25
INT=26
FLOAT=27
LPAREN=28
RPAREN=29
COLON=30
SEMICOLON=31
COMMA=32
LBRACE=33
RBRACE=34
TILDE=35
EXCLAM=36
'package'=1
'@'=2
'result'=3
'=>'=4
'&&'=5
'||'=6
'return'=7
'[]'=8
'critical'=9
'optional'=10
'INT'=11
'FLOAT'=12
'DOUBLE'=13
'STRING'=14
'BOOLEAN'=15
'CHAR'=16
'VOID'=17
'public'=18
'protected'=19
'private'=20
'default'=21
'('=28
')'=29
':'=30
';'=31
','=32
'{'=33
'}'=34
'~'=35
'!'=36

File diff suppressed because one or more lines are too long

View File

@@ -1,300 +0,0 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/SoftwareRequirements.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
public class SoftwareRequirementsLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
T__17=18, T__18=19, T__19=20, T__20=21, ID=22, STRING=23, DESCRIPTION=24,
WS=25, INT=26, FLOAT=27, LPAREN=28, RPAREN=29, COLON=30, SEMICOLON=31,
COMMA=32, LBRACE=33, RBRACE=34, TILDE=35, EXCLAM=36;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
public static String[] modeNames = {
"DEFAULT_MODE"
};
private static String[] makeRuleNames() {
return new String[] {
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
"T__17", "T__18", "T__19", "T__20", "ID", "STRING", "DESCRIPTION", "WS",
"INT", "FLOAT", "LPAREN", "RPAREN", "COLON", "SEMICOLON", "COMMA", "LBRACE",
"RBRACE", "TILDE", "EXCLAM"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "'package'", "'@'", "'result'", "'=>'", "'&&'", "'||'", "'return'",
"'[]'", "'critical'", "'optional'", "'INT'", "'FLOAT'", "'DOUBLE'", "'STRING'",
"'BOOLEAN'", "'CHAR'", "'VOID'", "'public'", "'protected'", "'private'",
"'default'", null, null, null, null, null, null, "'('", "')'", "':'",
"';'", "','", "'{'", "'}'", "'~'", "'!'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, "ID", "STRING",
"DESCRIPTION", "WS", "INT", "FLOAT", "LPAREN", "RPAREN", "COLON", "SEMICOLON",
"COMMA", "LBRACE", "RBRACE", "TILDE", "EXCLAM"
};
}
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 SoftwareRequirementsLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "SoftwareRequirements.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 =
"\u0004\u0000$\u0113\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
"\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
"\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
"\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
"\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
"\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
"\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
"\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
"\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
"\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
"\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
"!\u0002\"\u0007\"\u0002#\u0007#\u0001\u0000\u0001\u0000\u0001\u0000\u0001"+
"\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0001\u0001"+
"\u0001\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001"+
"\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001"+
"\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001"+
"\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001\u0006\u0001"+
"\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001\b\u0001\b\u0001\b"+
"\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0001\t\u0001"+
"\t\u0001\t\u0001\t\u0001\t\u0001\t\u0001\n\u0001\n\u0001\n\u0001\n\u0001"+
"\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001"+
"\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001\r\u0001"+
"\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e"+
"\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f"+
"\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010\u0001\u0010"+
"\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011"+
"\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0012\u0001\u0012"+
"\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012"+
"\u0001\u0012\u0001\u0012\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013"+
"\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0014\u0001\u0014"+
"\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+
"\u0001\u0015\u0004\u0015\u00cc\b\u0015\u000b\u0015\f\u0015\u00cd\u0001"+
"\u0016\u0001\u0016\u0005\u0016\u00d2\b\u0016\n\u0016\f\u0016\u00d5\t\u0016"+
"\u0001\u0016\u0001\u0016\u0001\u0017\u0001\u0017\u0005\u0017\u00db\b\u0017"+
"\n\u0017\f\u0017\u00de\t\u0017\u0001\u0017\u0001\u0017\u0001\u0018\u0004"+
"\u0018\u00e3\b\u0018\u000b\u0018\f\u0018\u00e4\u0001\u0018\u0001\u0018"+
"\u0001\u0019\u0004\u0019\u00ea\b\u0019\u000b\u0019\f\u0019\u00eb\u0001"+
"\u001a\u0004\u001a\u00ef\b\u001a\u000b\u001a\f\u001a\u00f0\u0001\u001a"+
"\u0001\u001a\u0005\u001a\u00f5\b\u001a\n\u001a\f\u001a\u00f8\t\u001a\u0001"+
"\u001a\u0001\u001a\u0004\u001a\u00fc\b\u001a\u000b\u001a\f\u001a\u00fd"+
"\u0003\u001a\u0100\b\u001a\u0001\u001b\u0001\u001b\u0001\u001c\u0001\u001c"+
"\u0001\u001d\u0001\u001d\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f"+
"\u0001 \u0001 \u0001!\u0001!\u0001\"\u0001\"\u0001#\u0001#\u0001\u00dc"+
"\u0000$\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005\u000b"+
"\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019\r\u001b"+
"\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015+\u0016"+
"-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f? A!C\""+
"E#G$\u0001\u0000\u0005\u0002\u0000AZaz\u0001\u0000\"\"\u0001\u0000~~\u0003"+
"\u0000\t\n\r\r \u0001\u000009\u011b\u0000\u0001\u0001\u0000\u0000\u0000"+
"\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000\u0000\u0000"+
"\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000\u0000\u0000"+
"\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000\u0000\u000f"+
"\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000\u0000\u0013"+
"\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000\u0000\u0017"+
"\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000\u0000\u001b"+
"\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000\u0000\u001f"+
"\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000#\u0001\u0000"+
"\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001\u0000\u0000"+
"\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000\u0000\u0000"+
"-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u00001\u0001"+
"\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001\u0000\u0000"+
"\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000\u0000\u0000"+
";\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000?\u0001"+
"\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001\u0000\u0000"+
"\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000\u0000\u0001"+
"I\u0001\u0000\u0000\u0000\u0003Q\u0001\u0000\u0000\u0000\u0005S\u0001"+
"\u0000\u0000\u0000\u0007Z\u0001\u0000\u0000\u0000\t]\u0001\u0000\u0000"+
"\u0000\u000b`\u0001\u0000\u0000\u0000\rc\u0001\u0000\u0000\u0000\u000f"+
"j\u0001\u0000\u0000\u0000\u0011m\u0001\u0000\u0000\u0000\u0013v\u0001"+
"\u0000\u0000\u0000\u0015\u007f\u0001\u0000\u0000\u0000\u0017\u0083\u0001"+
"\u0000\u0000\u0000\u0019\u0089\u0001\u0000\u0000\u0000\u001b\u0090\u0001"+
"\u0000\u0000\u0000\u001d\u0097\u0001\u0000\u0000\u0000\u001f\u009f\u0001"+
"\u0000\u0000\u0000!\u00a4\u0001\u0000\u0000\u0000#\u00a9\u0001\u0000\u0000"+
"\u0000%\u00b0\u0001\u0000\u0000\u0000\'\u00ba\u0001\u0000\u0000\u0000"+
")\u00c2\u0001\u0000\u0000\u0000+\u00cb\u0001\u0000\u0000\u0000-\u00cf"+
"\u0001\u0000\u0000\u0000/\u00d8\u0001\u0000\u0000\u00001\u00e2\u0001\u0000"+
"\u0000\u00003\u00e9\u0001\u0000\u0000\u00005\u00ff\u0001\u0000\u0000\u0000"+
"7\u0101\u0001\u0000\u0000\u00009\u0103\u0001\u0000\u0000\u0000;\u0105"+
"\u0001\u0000\u0000\u0000=\u0107\u0001\u0000\u0000\u0000?\u0109\u0001\u0000"+
"\u0000\u0000A\u010b\u0001\u0000\u0000\u0000C\u010d\u0001\u0000\u0000\u0000"+
"E\u010f\u0001\u0000\u0000\u0000G\u0111\u0001\u0000\u0000\u0000IJ\u0005"+
"p\u0000\u0000JK\u0005a\u0000\u0000KL\u0005c\u0000\u0000LM\u0005k\u0000"+
"\u0000MN\u0005a\u0000\u0000NO\u0005g\u0000\u0000OP\u0005e\u0000\u0000"+
"P\u0002\u0001\u0000\u0000\u0000QR\u0005@\u0000\u0000R\u0004\u0001\u0000"+
"\u0000\u0000ST\u0005r\u0000\u0000TU\u0005e\u0000\u0000UV\u0005s\u0000"+
"\u0000VW\u0005u\u0000\u0000WX\u0005l\u0000\u0000XY\u0005t\u0000\u0000"+
"Y\u0006\u0001\u0000\u0000\u0000Z[\u0005=\u0000\u0000[\\\u0005>\u0000\u0000"+
"\\\b\u0001\u0000\u0000\u0000]^\u0005&\u0000\u0000^_\u0005&\u0000\u0000"+
"_\n\u0001\u0000\u0000\u0000`a\u0005|\u0000\u0000ab\u0005|\u0000\u0000"+
"b\f\u0001\u0000\u0000\u0000cd\u0005r\u0000\u0000de\u0005e\u0000\u0000"+
"ef\u0005t\u0000\u0000fg\u0005u\u0000\u0000gh\u0005r\u0000\u0000hi\u0005"+
"n\u0000\u0000i\u000e\u0001\u0000\u0000\u0000jk\u0005[\u0000\u0000kl\u0005"+
"]\u0000\u0000l\u0010\u0001\u0000\u0000\u0000mn\u0005c\u0000\u0000no\u0005"+
"r\u0000\u0000op\u0005i\u0000\u0000pq\u0005t\u0000\u0000qr\u0005i\u0000"+
"\u0000rs\u0005c\u0000\u0000st\u0005a\u0000\u0000tu\u0005l\u0000\u0000"+
"u\u0012\u0001\u0000\u0000\u0000vw\u0005o\u0000\u0000wx\u0005p\u0000\u0000"+
"xy\u0005t\u0000\u0000yz\u0005i\u0000\u0000z{\u0005o\u0000\u0000{|\u0005"+
"n\u0000\u0000|}\u0005a\u0000\u0000}~\u0005l\u0000\u0000~\u0014\u0001\u0000"+
"\u0000\u0000\u007f\u0080\u0005I\u0000\u0000\u0080\u0081\u0005N\u0000\u0000"+
"\u0081\u0082\u0005T\u0000\u0000\u0082\u0016\u0001\u0000\u0000\u0000\u0083"+
"\u0084\u0005F\u0000\u0000\u0084\u0085\u0005L\u0000\u0000\u0085\u0086\u0005"+
"O\u0000\u0000\u0086\u0087\u0005A\u0000\u0000\u0087\u0088\u0005T\u0000"+
"\u0000\u0088\u0018\u0001\u0000\u0000\u0000\u0089\u008a\u0005D\u0000\u0000"+
"\u008a\u008b\u0005O\u0000\u0000\u008b\u008c\u0005U\u0000\u0000\u008c\u008d"+
"\u0005B\u0000\u0000\u008d\u008e\u0005L\u0000\u0000\u008e\u008f\u0005E"+
"\u0000\u0000\u008f\u001a\u0001\u0000\u0000\u0000\u0090\u0091\u0005S\u0000"+
"\u0000\u0091\u0092\u0005T\u0000\u0000\u0092\u0093\u0005R\u0000\u0000\u0093"+
"\u0094\u0005I\u0000\u0000\u0094\u0095\u0005N\u0000\u0000\u0095\u0096\u0005"+
"G\u0000\u0000\u0096\u001c\u0001\u0000\u0000\u0000\u0097\u0098\u0005B\u0000"+
"\u0000\u0098\u0099\u0005O\u0000\u0000\u0099\u009a\u0005O\u0000\u0000\u009a"+
"\u009b\u0005L\u0000\u0000\u009b\u009c\u0005E\u0000\u0000\u009c\u009d\u0005"+
"A\u0000\u0000\u009d\u009e\u0005N\u0000\u0000\u009e\u001e\u0001\u0000\u0000"+
"\u0000\u009f\u00a0\u0005C\u0000\u0000\u00a0\u00a1\u0005H\u0000\u0000\u00a1"+
"\u00a2\u0005A\u0000\u0000\u00a2\u00a3\u0005R\u0000\u0000\u00a3 \u0001"+
"\u0000\u0000\u0000\u00a4\u00a5\u0005V\u0000\u0000\u00a5\u00a6\u0005O\u0000"+
"\u0000\u00a6\u00a7\u0005I\u0000\u0000\u00a7\u00a8\u0005D\u0000\u0000\u00a8"+
"\"\u0001\u0000\u0000\u0000\u00a9\u00aa\u0005p\u0000\u0000\u00aa\u00ab"+
"\u0005u\u0000\u0000\u00ab\u00ac\u0005b\u0000\u0000\u00ac\u00ad\u0005l"+
"\u0000\u0000\u00ad\u00ae\u0005i\u0000\u0000\u00ae\u00af\u0005c\u0000\u0000"+
"\u00af$\u0001\u0000\u0000\u0000\u00b0\u00b1\u0005p\u0000\u0000\u00b1\u00b2"+
"\u0005r\u0000\u0000\u00b2\u00b3\u0005o\u0000\u0000\u00b3\u00b4\u0005t"+
"\u0000\u0000\u00b4\u00b5\u0005e\u0000\u0000\u00b5\u00b6\u0005c\u0000\u0000"+
"\u00b6\u00b7\u0005t\u0000\u0000\u00b7\u00b8\u0005e\u0000\u0000\u00b8\u00b9"+
"\u0005d\u0000\u0000\u00b9&\u0001\u0000\u0000\u0000\u00ba\u00bb\u0005p"+
"\u0000\u0000\u00bb\u00bc\u0005r\u0000\u0000\u00bc\u00bd\u0005i\u0000\u0000"+
"\u00bd\u00be\u0005v\u0000\u0000\u00be\u00bf\u0005a\u0000\u0000\u00bf\u00c0"+
"\u0005t\u0000\u0000\u00c0\u00c1\u0005e\u0000\u0000\u00c1(\u0001\u0000"+
"\u0000\u0000\u00c2\u00c3\u0005d\u0000\u0000\u00c3\u00c4\u0005e\u0000\u0000"+
"\u00c4\u00c5\u0005f\u0000\u0000\u00c5\u00c6\u0005a\u0000\u0000\u00c6\u00c7"+
"\u0005u\u0000\u0000\u00c7\u00c8\u0005l\u0000\u0000\u00c8\u00c9\u0005t"+
"\u0000\u0000\u00c9*\u0001\u0000\u0000\u0000\u00ca\u00cc\u0007\u0000\u0000"+
"\u0000\u00cb\u00ca\u0001\u0000\u0000\u0000\u00cc\u00cd\u0001\u0000\u0000"+
"\u0000\u00cd\u00cb\u0001\u0000\u0000\u0000\u00cd\u00ce\u0001\u0000\u0000"+
"\u0000\u00ce,\u0001\u0000\u0000\u0000\u00cf\u00d3\u0005\"\u0000\u0000"+
"\u00d0\u00d2\b\u0001\u0000\u0000\u00d1\u00d0\u0001\u0000\u0000\u0000\u00d2"+
"\u00d5\u0001\u0000\u0000\u0000\u00d3\u00d1\u0001\u0000\u0000\u0000\u00d3"+
"\u00d4\u0001\u0000\u0000\u0000\u00d4\u00d6\u0001\u0000\u0000\u0000\u00d5"+
"\u00d3\u0001\u0000\u0000\u0000\u00d6\u00d7\u0005\"\u0000\u0000\u00d7."+
"\u0001\u0000\u0000\u0000\u00d8\u00dc\u0005~\u0000\u0000\u00d9\u00db\b"+
"\u0002\u0000\u0000\u00da\u00d9\u0001\u0000\u0000\u0000\u00db\u00de\u0001"+
"\u0000\u0000\u0000\u00dc\u00dd\u0001\u0000\u0000\u0000\u00dc\u00da\u0001"+
"\u0000\u0000\u0000\u00dd\u00df\u0001\u0000\u0000\u0000\u00de\u00dc\u0001"+
"\u0000\u0000\u0000\u00df\u00e0\u0005~\u0000\u0000\u00e00\u0001\u0000\u0000"+
"\u0000\u00e1\u00e3\u0007\u0003\u0000\u0000\u00e2\u00e1\u0001\u0000\u0000"+
"\u0000\u00e3\u00e4\u0001\u0000\u0000\u0000\u00e4\u00e2\u0001\u0000\u0000"+
"\u0000\u00e4\u00e5\u0001\u0000\u0000\u0000\u00e5\u00e6\u0001\u0000\u0000"+
"\u0000\u00e6\u00e7\u0006\u0018\u0000\u0000\u00e72\u0001\u0000\u0000\u0000"+
"\u00e8\u00ea\u0007\u0004\u0000\u0000\u00e9\u00e8\u0001\u0000\u0000\u0000"+
"\u00ea\u00eb\u0001\u0000\u0000\u0000\u00eb\u00e9\u0001\u0000\u0000\u0000"+
"\u00eb\u00ec\u0001\u0000\u0000\u0000\u00ec4\u0001\u0000\u0000\u0000\u00ed"+
"\u00ef\u0007\u0004\u0000\u0000\u00ee\u00ed\u0001\u0000\u0000\u0000\u00ef"+
"\u00f0\u0001\u0000\u0000\u0000\u00f0\u00ee\u0001\u0000\u0000\u0000\u00f0"+
"\u00f1\u0001\u0000\u0000\u0000\u00f1\u00f2\u0001\u0000\u0000\u0000\u00f2"+
"\u00f6\u0005.\u0000\u0000\u00f3\u00f5\u0007\u0004\u0000\u0000\u00f4\u00f3"+
"\u0001\u0000\u0000\u0000\u00f5\u00f8\u0001\u0000\u0000\u0000\u00f6\u00f4"+
"\u0001\u0000\u0000\u0000\u00f6\u00f7\u0001\u0000\u0000\u0000\u00f7\u0100"+
"\u0001\u0000\u0000\u0000\u00f8\u00f6\u0001\u0000\u0000\u0000\u00f9\u00fb"+
"\u0005.\u0000\u0000\u00fa\u00fc\u0007\u0004\u0000\u0000\u00fb\u00fa\u0001"+
"\u0000\u0000\u0000\u00fc\u00fd\u0001\u0000\u0000\u0000\u00fd\u00fb\u0001"+
"\u0000\u0000\u0000\u00fd\u00fe\u0001\u0000\u0000\u0000\u00fe\u0100\u0001"+
"\u0000\u0000\u0000\u00ff\u00ee\u0001\u0000\u0000\u0000\u00ff\u00f9\u0001"+
"\u0000\u0000\u0000\u01006\u0001\u0000\u0000\u0000\u0101\u0102\u0005(\u0000"+
"\u0000\u01028\u0001\u0000\u0000\u0000\u0103\u0104\u0005)\u0000\u0000\u0104"+
":\u0001\u0000\u0000\u0000\u0105\u0106\u0005:\u0000\u0000\u0106<\u0001"+
"\u0000\u0000\u0000\u0107\u0108\u0005;\u0000\u0000\u0108>\u0001\u0000\u0000"+
"\u0000\u0109\u010a\u0005,\u0000\u0000\u010a@\u0001\u0000\u0000\u0000\u010b"+
"\u010c\u0005{\u0000\u0000\u010cB\u0001\u0000\u0000\u0000\u010d\u010e\u0005"+
"}\u0000\u0000\u010eD\u0001\u0000\u0000\u0000\u010f\u0110\u0005~\u0000"+
"\u0000\u0110F\u0001\u0000\u0000\u0000\u0111\u0112\u0005!\u0000\u0000\u0112"+
"H\u0001\u0000\u0000\u0000\n\u0000\u00cd\u00d3\u00dc\u00e4\u00eb\u00f0"+
"\u00f6\u00fd\u00ff\u0001\u0006\u0000\u0000";
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);
}
}
}

View File

@@ -1,66 +0,0 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
ID=22
STRING=23
DESCRIPTION=24
WS=25
INT=26
FLOAT=27
LPAREN=28
RPAREN=29
COLON=30
SEMICOLON=31
COMMA=32
LBRACE=33
RBRACE=34
TILDE=35
EXCLAM=36
'package'=1
'@'=2
'result'=3
'=>'=4
'&&'=5
'||'=6
'return'=7
'[]'=8
'critical'=9
'optional'=10
'INT'=11
'FLOAT'=12
'DOUBLE'=13
'STRING'=14
'BOOLEAN'=15
'CHAR'=16
'VOID'=17
'public'=18
'protected'=19
'private'=20
'default'=21
'('=28
')'=29
':'=30
';'=31
','=32
'{'=33
'}'=34
'~'=35
'!'=36

View File

@@ -1,200 +0,0 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/SoftwareRequirements.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link SoftwareRequirementsParser}.
*/
public interface SoftwareRequirementsListener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#program}.
* @param ctx the parse tree
*/
void enterProgram(SoftwareRequirementsParser.ProgramContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#program}.
* @param ctx the parse tree
*/
void exitProgram(SoftwareRequirementsParser.ProgramContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#program_body}.
* @param ctx the parse tree
*/
void enterProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#program_body}.
* @param ctx the parse tree
*/
void exitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#requirementSpec}.
* @param ctx the parse tree
*/
void enterRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#requirementSpec}.
* @param ctx the parse tree
*/
void exitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#req_specification}.
* @param ctx the parse tree
*/
void enterReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#req_specification}.
* @param ctx the parse tree
*/
void exitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#result_specification}.
* @param ctx the parse tree
*/
void enterResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#result_specification}.
* @param ctx the parse tree
*/
void exitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#predicate}.
* @param ctx the parse tree
*/
void enterPredicate(SoftwareRequirementsParser.PredicateContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#predicate}.
* @param ctx the parse tree
*/
void exitPredicate(SoftwareRequirementsParser.PredicateContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#expression}.
* @param ctx the parse tree
*/
void enterExpression(SoftwareRequirementsParser.ExpressionContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#expression}.
* @param ctx the parse tree
*/
void exitExpression(SoftwareRequirementsParser.ExpressionContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#term}.
* @param ctx the parse tree
*/
void enterTerm(SoftwareRequirementsParser.TermContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#term}.
* @param ctx the parse tree
*/
void exitTerm(SoftwareRequirementsParser.TermContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#logical_op}.
* @param ctx the parse tree
*/
void enterLogical_op(SoftwareRequirementsParser.Logical_opContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#logical_op}.
* @param ctx the parse tree
*/
void exitLogical_op(SoftwareRequirementsParser.Logical_opContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#functionSpec}.
* @param ctx the parse tree
*/
void enterFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#functionSpec}.
* @param ctx the parse tree
*/
void exitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#functionBody}.
* @param ctx the parse tree
*/
void enterFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#functionBody}.
* @param ctx the parse tree
*/
void exitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#input_types}.
* @param ctx the parse tree
*/
void enterInput_types(SoftwareRequirementsParser.Input_typesContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#input_types}.
* @param ctx the parse tree
*/
void exitInput_types(SoftwareRequirementsParser.Input_typesContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#return_types}.
* @param ctx the parse tree
*/
void enterReturn_types(SoftwareRequirementsParser.Return_typesContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#return_types}.
* @param ctx the parse tree
*/
void exitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#specification}.
* @param ctx the parse tree
*/
void enterSpecification(SoftwareRequirementsParser.SpecificationContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#specification}.
* @param ctx the parse tree
*/
void exitSpecification(SoftwareRequirementsParser.SpecificationContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#variable}.
* @param ctx the parse tree
*/
void enterVariable(SoftwareRequirementsParser.VariableContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#variable}.
* @param ctx the parse tree
*/
void exitVariable(SoftwareRequirementsParser.VariableContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#importance}.
* @param ctx the parse tree
*/
void enterImportance(SoftwareRequirementsParser.ImportanceContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#importance}.
* @param ctx the parse tree
*/
void exitImportance(SoftwareRequirementsParser.ImportanceContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#type}.
* @param ctx the parse tree
*/
void enterType(SoftwareRequirementsParser.TypeContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#type}.
* @param ctx the parse tree
*/
void exitType(SoftwareRequirementsParser.TypeContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#access_modifiers}.
* @param ctx the parse tree
*/
void enterAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#access_modifiers}.
* @param ctx the parse tree
*/
void exitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx);
/**
* Enter a parse tree produced by {@link SoftwareRequirementsParser#description}.
* @param ctx the parse tree
*/
void enterDescription(SoftwareRequirementsParser.DescriptionContext ctx);
/**
* Exit a parse tree produced by {@link SoftwareRequirementsParser#description}.
* @param ctx the parse tree
*/
void exitDescription(SoftwareRequirementsParser.DescriptionContext ctx);
}

View File

@@ -1,127 +0,0 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/SoftwareRequirements.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link SoftwareRequirementsParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface SoftwareRequirementsVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#program}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitProgram(SoftwareRequirementsParser.ProgramContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#program_body}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#requirementSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#req_specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#result_specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#predicate}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPredicate(SoftwareRequirementsParser.PredicateContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#expression}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitExpression(SoftwareRequirementsParser.ExpressionContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#term}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitTerm(SoftwareRequirementsParser.TermContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#logical_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLogical_op(SoftwareRequirementsParser.Logical_opContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#functionSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#functionBody}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#input_types}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInput_types(SoftwareRequirementsParser.Input_typesContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#return_types}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSpecification(SoftwareRequirementsParser.SpecificationContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#variable}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVariable(SoftwareRequirementsParser.VariableContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#importance}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitImportance(SoftwareRequirementsParser.ImportanceContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#type}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitType(SoftwareRequirementsParser.TypeContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#access_modifiers}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx);
/**
* Visit a parse tree produced by {@link SoftwareRequirementsParser#description}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDescription(SoftwareRequirementsParser.DescriptionContext ctx);
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,70 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
ID=24
STRING=25
DESCRIPTION=26
WS=27
INT=28
FLOAT=29
LPAREN=30
RPAREN=31
COLON=32
SEMICOLON=33
COMMA=34
LBRACE=35
RBRACE=36
TILDE=37
EXCLAM=38
'package'=1
'interface'=2
'specification'=3
'implements'=4
'@'=5
'result'=6
'AND'=7
'OR'=8
'return'=9
'[]'=10
'critical'=11
'optional'=12
'INT'=13
'FLOAT'=14
'DOUBLE'=15
'STRING'=16
'BOOLEAN'=17
'CHAR'=18
'VOID'=19
'public'=20
'protected'=21
'private'=22
'default'=23
'('=30
')'=31
':'=32
';'=33
','=34
'{'=35
'}'=36
'~'=37
'!'=38

View File

@@ -1,4 +1,4 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/SoftwareRequirements.g4 by ANTLR 4.13.1
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/Winx.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.ParserRuleContext;
@@ -6,240 +6,264 @@ import org.antlr.v4.runtime.tree.ErrorNode;
import org.antlr.v4.runtime.tree.TerminalNode;
/**
* This class provides an empty implementation of {@link SoftwareRequirementsListener},
* This class provides an empty implementation of {@link WinxListener},
* which can be extended to create a listener which only needs to handle a subset
* of the available methods.
*/
@SuppressWarnings("CheckReturnValue")
public class SoftwareRequirementsBaseListener implements SoftwareRequirementsListener {
public class WinxBaseListener implements WinxListener {
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterProgram(SoftwareRequirementsParser.ProgramContext ctx) { }
@Override public void enterWinx(WinxParser.WinxContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitProgram(SoftwareRequirementsParser.ProgramContext ctx) { }
@Override public void exitWinx(WinxParser.WinxContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { }
@Override public void enterBody(WinxParser.BodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { }
@Override public void exitBody(WinxParser.BodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { }
@Override public void enterPackage(WinxParser.PackageContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { }
@Override public void exitPackage(WinxParser.PackageContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { }
@Override public void enterInterface(WinxParser.InterfaceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { }
@Override public void exitInterface(WinxParser.InterfaceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { }
@Override public void enterSpecification(WinxParser.SpecificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { }
@Override public void exitSpecification(WinxParser.SpecificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterPredicate(SoftwareRequirementsParser.PredicateContext ctx) { }
@Override public void enterInterface_body(WinxParser.Interface_bodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitPredicate(SoftwareRequirementsParser.PredicateContext ctx) { }
@Override public void exitInterface_body(WinxParser.Interface_bodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterExpression(SoftwareRequirementsParser.ExpressionContext ctx) { }
@Override public void enterSpecification_body(WinxParser.Specification_bodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitExpression(SoftwareRequirementsParser.ExpressionContext ctx) { }
@Override public void exitSpecification_body(WinxParser.Specification_bodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterTerm(SoftwareRequirementsParser.TermContext ctx) { }
@Override public void enterRequirementSpec(WinxParser.RequirementSpecContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitTerm(SoftwareRequirementsParser.TermContext ctx) { }
@Override public void exitRequirementSpec(WinxParser.RequirementSpecContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterLogical_op(SoftwareRequirementsParser.Logical_opContext ctx) { }
@Override public void enterReq_specification(WinxParser.Req_specificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitLogical_op(SoftwareRequirementsParser.Logical_opContext ctx) { }
@Override public void exitReq_specification(WinxParser.Req_specificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { }
@Override public void enterResult_specification(WinxParser.Result_specificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { }
@Override public void exitResult_specification(WinxParser.Result_specificationContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { }
@Override public void enterLogical_op(WinxParser.Logical_opContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { }
@Override public void exitLogical_op(WinxParser.Logical_opContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { }
@Override public void enterFunctionSpec(WinxParser.FunctionSpecContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { }
@Override public void exitFunctionSpec(WinxParser.FunctionSpecContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { }
@Override public void enterFunctionBody(WinxParser.FunctionBodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { }
@Override public void exitFunctionBody(WinxParser.FunctionBodyContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { }
@Override public void enterInput_types(WinxParser.Input_typesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { }
@Override public void exitInput_types(WinxParser.Input_typesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterVariable(SoftwareRequirementsParser.VariableContext ctx) { }
@Override public void enterReturn_types(WinxParser.Return_typesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitVariable(SoftwareRequirementsParser.VariableContext ctx) { }
@Override public void exitReturn_types(WinxParser.Return_typesContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterImportance(SoftwareRequirementsParser.ImportanceContext ctx) { }
@Override public void enterSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitImportance(SoftwareRequirementsParser.ImportanceContext ctx) { }
@Override public void exitSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterType(SoftwareRequirementsParser.TypeContext ctx) { }
@Override public void enterVariable(WinxParser.VariableContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitType(SoftwareRequirementsParser.TypeContext ctx) { }
@Override public void exitVariable(WinxParser.VariableContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { }
@Override public void enterImportance(WinxParser.ImportanceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { }
@Override public void exitImportance(WinxParser.ImportanceContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDescription(SoftwareRequirementsParser.DescriptionContext ctx) { }
@Override public void enterType(WinxParser.TypeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDescription(SoftwareRequirementsParser.DescriptionContext ctx) { }
@Override public void exitType(WinxParser.TypeContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterAccess_modifiers(WinxParser.Access_modifiersContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitAccess_modifiers(WinxParser.Access_modifiersContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void enterDescription(WinxParser.DescriptionContext ctx) { }
/**
* {@inheritDoc}
*
* <p>The default implementation does nothing.</p>
*/
@Override public void exitDescription(WinxParser.DescriptionContext ctx) { }
/**
* {@inheritDoc}

View File

@@ -1,9 +1,9 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/SoftwareRequirements.g4 by ANTLR 4.13.1
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/Winx.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
/**
* This class provides an empty implementation of {@link SoftwareRequirementsVisitor},
* This class provides an empty implementation of {@link WinxVisitor},
* which can be extended to create a visitor which only needs to handle a subset
* of the available methods.
*
@@ -11,138 +11,152 @@ import org.antlr.v4.runtime.tree.AbstractParseTreeVisitor;
* operations with no return type.
*/
@SuppressWarnings("CheckReturnValue")
public class SoftwareRequirementsBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements SoftwareRequirementsVisitor<T> {
public class WinxBaseVisitor<T> extends AbstractParseTreeVisitor<T> implements WinxVisitor<T> {
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitProgram(SoftwareRequirementsParser.ProgramContext ctx) { return visitChildren(ctx); }
@Override public T visitWinx(WinxParser.WinxContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { return visitChildren(ctx); }
@Override public T visitBody(WinxParser.BodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { return visitChildren(ctx); }
@Override public T visitPackage(WinxParser.PackageContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { return visitChildren(ctx); }
@Override public T visitInterface(WinxParser.InterfaceContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { return visitChildren(ctx); }
@Override public T visitSpecification(WinxParser.SpecificationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitPredicate(SoftwareRequirementsParser.PredicateContext ctx) { return visitChildren(ctx); }
@Override public T visitInterface_body(WinxParser.Interface_bodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitExpression(SoftwareRequirementsParser.ExpressionContext ctx) { return visitChildren(ctx); }
@Override public T visitSpecification_body(WinxParser.Specification_bodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitTerm(SoftwareRequirementsParser.TermContext ctx) { return visitChildren(ctx); }
@Override public T visitRequirementSpec(WinxParser.RequirementSpecContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitLogical_op(SoftwareRequirementsParser.Logical_opContext ctx) { return visitChildren(ctx); }
@Override public T visitReq_specification(WinxParser.Req_specificationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { return visitChildren(ctx); }
@Override public T visitResult_specification(WinxParser.Result_specificationContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { return visitChildren(ctx); }
@Override public T visitLogical_op(WinxParser.Logical_opContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { return visitChildren(ctx); }
@Override public T visitFunctionSpec(WinxParser.FunctionSpecContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { return visitChildren(ctx); }
@Override public T visitFunctionBody(WinxParser.FunctionBodyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { return visitChildren(ctx); }
@Override public T visitInput_types(WinxParser.Input_typesContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitVariable(SoftwareRequirementsParser.VariableContext ctx) { return visitChildren(ctx); }
@Override public T visitReturn_types(WinxParser.Return_typesContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitImportance(SoftwareRequirementsParser.ImportanceContext ctx) { return visitChildren(ctx); }
@Override public T visitSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitType(SoftwareRequirementsParser.TypeContext ctx) { return visitChildren(ctx); }
@Override public T visitVariable(WinxParser.VariableContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { return visitChildren(ctx); }
@Override public T visitImportance(WinxParser.ImportanceContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitDescription(SoftwareRequirementsParser.DescriptionContext ctx) { return visitChildren(ctx); }
@Override public T visitType(WinxParser.TypeContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitAccess_modifiers(WinxParser.Access_modifiersContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitDescription(WinxParser.DescriptionContext ctx) { return visitChildren(ctx); }
}

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,324 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/Winx.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.Lexer;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.Token;
import org.antlr.v4.runtime.TokenStream;
import org.antlr.v4.runtime.*;
import org.antlr.v4.runtime.atn.*;
import org.antlr.v4.runtime.dfa.DFA;
import org.antlr.v4.runtime.misc.*;
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue", "this-escape"})
public class WinxLexer extends Lexer {
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
protected static final DFA[] _decisionToDFA;
protected static final PredictionContextCache _sharedContextCache =
new PredictionContextCache();
public static final int
T__0=1, T__1=2, T__2=3, T__3=4, T__4=5, T__5=6, T__6=7, T__7=8, T__8=9,
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
T__17=18, T__18=19, T__19=20, T__20=21, T__21=22, T__22=23, ID=24, STRING=25,
DESCRIPTION=26, WS=27, INT=28, FLOAT=29, LPAREN=30, RPAREN=31, COLON=32,
SEMICOLON=33, COMMA=34, LBRACE=35, RBRACE=36, TILDE=37, EXCLAM=38;
public static String[] channelNames = {
"DEFAULT_TOKEN_CHANNEL", "HIDDEN"
};
public static String[] modeNames = {
"DEFAULT_MODE"
};
private static String[] makeRuleNames() {
return new String[] {
"T__0", "T__1", "T__2", "T__3", "T__4", "T__5", "T__6", "T__7", "T__8",
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
"T__17", "T__18", "T__19", "T__20", "T__21", "T__22", "ID", "STRING",
"DESCRIPTION", "WS", "INT", "FLOAT", "LPAREN", "RPAREN", "COLON", "SEMICOLON",
"COMMA", "LBRACE", "RBRACE", "TILDE", "EXCLAM"
};
}
public static final String[] ruleNames = makeRuleNames();
private static String[] makeLiteralNames() {
return new String[] {
null, "'package'", "'interface'", "'specification'", "'implements'",
"'@'", "'result'", "'AND'", "'OR'", "'return'", "'[]'", "'critical'",
"'optional'", "'INT'", "'FLOAT'", "'DOUBLE'", "'STRING'", "'BOOLEAN'",
"'CHAR'", "'VOID'", "'public'", "'protected'", "'private'", "'default'",
null, null, null, null, null, null, "'('", "')'", "':'", "';'", "','",
"'{'", "'}'", "'~'", "'!'"
};
}
private static final String[] _LITERAL_NAMES = makeLiteralNames();
private static String[] makeSymbolicNames() {
return new String[] {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, null, null, null, null, null, null, null,
"ID", "STRING", "DESCRIPTION", "WS", "INT", "FLOAT", "LPAREN", "RPAREN",
"COLON", "SEMICOLON", "COMMA", "LBRACE", "RBRACE", "TILDE", "EXCLAM"
};
}
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 WinxLexer(CharStream input) {
super(input);
_interp = new LexerATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
}
@Override
public String getGrammarFileName() { return "Winx.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 =
"\u0004\u0000&\u0138\u0006\uffff\uffff\u0002\u0000\u0007\u0000\u0002\u0001"+
"\u0007\u0001\u0002\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004"+
"\u0007\u0004\u0002\u0005\u0007\u0005\u0002\u0006\u0007\u0006\u0002\u0007"+
"\u0007\u0007\u0002\b\u0007\b\u0002\t\u0007\t\u0002\n\u0007\n\u0002\u000b"+
"\u0007\u000b\u0002\f\u0007\f\u0002\r\u0007\r\u0002\u000e\u0007\u000e\u0002"+
"\u000f\u0007\u000f\u0002\u0010\u0007\u0010\u0002\u0011\u0007\u0011\u0002"+
"\u0012\u0007\u0012\u0002\u0013\u0007\u0013\u0002\u0014\u0007\u0014\u0002"+
"\u0015\u0007\u0015\u0002\u0016\u0007\u0016\u0002\u0017\u0007\u0017\u0002"+
"\u0018\u0007\u0018\u0002\u0019\u0007\u0019\u0002\u001a\u0007\u001a\u0002"+
"\u001b\u0007\u001b\u0002\u001c\u0007\u001c\u0002\u001d\u0007\u001d\u0002"+
"\u001e\u0007\u001e\u0002\u001f\u0007\u001f\u0002 \u0007 \u0002!\u0007"+
"!\u0002\"\u0007\"\u0002#\u0007#\u0002$\u0007$\u0002%\u0007%\u0001\u0000"+
"\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000\u0001\u0000"+
"\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001"+
"\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002"+
"\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+
"\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0002"+
"\u0001\u0002\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
"\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003\u0001\u0003"+
"\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005"+
"\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0006\u0001\u0006\u0001\u0006"+
"\u0001\u0006\u0001\u0007\u0001\u0007\u0001\u0007\u0001\b\u0001\b\u0001"+
"\b\u0001\b\u0001\b\u0001\b\u0001\b\u0001\t\u0001\t\u0001\t\u0001\n\u0001"+
"\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\n\u0001\u000b"+
"\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b\u0001\u000b"+
"\u0001\u000b\u0001\u000b\u0001\f\u0001\f\u0001\f\u0001\f\u0001\r\u0001"+
"\r\u0001\r\u0001\r\u0001\r\u0001\r\u0001\u000e\u0001\u000e\u0001\u000e"+
"\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000e\u0001\u000f\u0001\u000f"+
"\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u000f\u0001\u0010"+
"\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010\u0001\u0010"+
"\u0001\u0010\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011\u0001\u0011"+
"\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0012\u0001\u0013"+
"\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013\u0001\u0013"+
"\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014"+
"\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0014\u0001\u0015\u0001\u0015"+
"\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015\u0001\u0015"+
"\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016\u0001\u0016"+
"\u0001\u0016\u0001\u0016\u0001\u0017\u0004\u0017\u00f1\b\u0017\u000b\u0017"+
"\f\u0017\u00f2\u0001\u0018\u0001\u0018\u0005\u0018\u00f7\b\u0018\n\u0018"+
"\f\u0018\u00fa\t\u0018\u0001\u0018\u0001\u0018\u0001\u0019\u0001\u0019"+
"\u0005\u0019\u0100\b\u0019\n\u0019\f\u0019\u0103\t\u0019\u0001\u0019\u0001"+
"\u0019\u0001\u001a\u0004\u001a\u0108\b\u001a\u000b\u001a\f\u001a\u0109"+
"\u0001\u001a\u0001\u001a\u0001\u001b\u0004\u001b\u010f\b\u001b\u000b\u001b"+
"\f\u001b\u0110\u0001\u001c\u0004\u001c\u0114\b\u001c\u000b\u001c\f\u001c"+
"\u0115\u0001\u001c\u0001\u001c\u0005\u001c\u011a\b\u001c\n\u001c\f\u001c"+
"\u011d\t\u001c\u0001\u001c\u0001\u001c\u0004\u001c\u0121\b\u001c\u000b"+
"\u001c\f\u001c\u0122\u0003\u001c\u0125\b\u001c\u0001\u001d\u0001\u001d"+
"\u0001\u001e\u0001\u001e\u0001\u001f\u0001\u001f\u0001 \u0001 \u0001!"+
"\u0001!\u0001\"\u0001\"\u0001#\u0001#\u0001$\u0001$\u0001%\u0001%\u0001"+
"\u0101\u0000&\u0001\u0001\u0003\u0002\u0005\u0003\u0007\u0004\t\u0005"+
"\u000b\u0006\r\u0007\u000f\b\u0011\t\u0013\n\u0015\u000b\u0017\f\u0019"+
"\r\u001b\u000e\u001d\u000f\u001f\u0010!\u0011#\u0012%\u0013\'\u0014)\u0015"+
"+\u0016-\u0017/\u00181\u00193\u001a5\u001b7\u001c9\u001d;\u001e=\u001f"+
"? A!C\"E#G$I%K&\u0001\u0000\u0005\u0002\u0000AZaz\u0001\u0000\"\"\u0001"+
"\u0000~~\u0003\u0000\t\n\r\r \u0001\u000009\u0140\u0000\u0001\u0001\u0000"+
"\u0000\u0000\u0000\u0003\u0001\u0000\u0000\u0000\u0000\u0005\u0001\u0000"+
"\u0000\u0000\u0000\u0007\u0001\u0000\u0000\u0000\u0000\t\u0001\u0000\u0000"+
"\u0000\u0000\u000b\u0001\u0000\u0000\u0000\u0000\r\u0001\u0000\u0000\u0000"+
"\u0000\u000f\u0001\u0000\u0000\u0000\u0000\u0011\u0001\u0000\u0000\u0000"+
"\u0000\u0013\u0001\u0000\u0000\u0000\u0000\u0015\u0001\u0000\u0000\u0000"+
"\u0000\u0017\u0001\u0000\u0000\u0000\u0000\u0019\u0001\u0000\u0000\u0000"+
"\u0000\u001b\u0001\u0000\u0000\u0000\u0000\u001d\u0001\u0000\u0000\u0000"+
"\u0000\u001f\u0001\u0000\u0000\u0000\u0000!\u0001\u0000\u0000\u0000\u0000"+
"#\u0001\u0000\u0000\u0000\u0000%\u0001\u0000\u0000\u0000\u0000\'\u0001"+
"\u0000\u0000\u0000\u0000)\u0001\u0000\u0000\u0000\u0000+\u0001\u0000\u0000"+
"\u0000\u0000-\u0001\u0000\u0000\u0000\u0000/\u0001\u0000\u0000\u0000\u0000"+
"1\u0001\u0000\u0000\u0000\u00003\u0001\u0000\u0000\u0000\u00005\u0001"+
"\u0000\u0000\u0000\u00007\u0001\u0000\u0000\u0000\u00009\u0001\u0000\u0000"+
"\u0000\u0000;\u0001\u0000\u0000\u0000\u0000=\u0001\u0000\u0000\u0000\u0000"+
"?\u0001\u0000\u0000\u0000\u0000A\u0001\u0000\u0000\u0000\u0000C\u0001"+
"\u0000\u0000\u0000\u0000E\u0001\u0000\u0000\u0000\u0000G\u0001\u0000\u0000"+
"\u0000\u0000I\u0001\u0000\u0000\u0000\u0000K\u0001\u0000\u0000\u0000\u0001"+
"M\u0001\u0000\u0000\u0000\u0003U\u0001\u0000\u0000\u0000\u0005_\u0001"+
"\u0000\u0000\u0000\u0007m\u0001\u0000\u0000\u0000\tx\u0001\u0000\u0000"+
"\u0000\u000bz\u0001\u0000\u0000\u0000\r\u0081\u0001\u0000\u0000\u0000"+
"\u000f\u0085\u0001\u0000\u0000\u0000\u0011\u0088\u0001\u0000\u0000\u0000"+
"\u0013\u008f\u0001\u0000\u0000\u0000\u0015\u0092\u0001\u0000\u0000\u0000"+
"\u0017\u009b\u0001\u0000\u0000\u0000\u0019\u00a4\u0001\u0000\u0000\u0000"+
"\u001b\u00a8\u0001\u0000\u0000\u0000\u001d\u00ae\u0001\u0000\u0000\u0000"+
"\u001f\u00b5\u0001\u0000\u0000\u0000!\u00bc\u0001\u0000\u0000\u0000#\u00c4"+
"\u0001\u0000\u0000\u0000%\u00c9\u0001\u0000\u0000\u0000\'\u00ce\u0001"+
"\u0000\u0000\u0000)\u00d5\u0001\u0000\u0000\u0000+\u00df\u0001\u0000\u0000"+
"\u0000-\u00e7\u0001\u0000\u0000\u0000/\u00f0\u0001\u0000\u0000\u00001"+
"\u00f4\u0001\u0000\u0000\u00003\u00fd\u0001\u0000\u0000\u00005\u0107\u0001"+
"\u0000\u0000\u00007\u010e\u0001\u0000\u0000\u00009\u0124\u0001\u0000\u0000"+
"\u0000;\u0126\u0001\u0000\u0000\u0000=\u0128\u0001\u0000\u0000\u0000?"+
"\u012a\u0001\u0000\u0000\u0000A\u012c\u0001\u0000\u0000\u0000C\u012e\u0001"+
"\u0000\u0000\u0000E\u0130\u0001\u0000\u0000\u0000G\u0132\u0001\u0000\u0000"+
"\u0000I\u0134\u0001\u0000\u0000\u0000K\u0136\u0001\u0000\u0000\u0000M"+
"N\u0005p\u0000\u0000NO\u0005a\u0000\u0000OP\u0005c\u0000\u0000PQ\u0005"+
"k\u0000\u0000QR\u0005a\u0000\u0000RS\u0005g\u0000\u0000ST\u0005e\u0000"+
"\u0000T\u0002\u0001\u0000\u0000\u0000UV\u0005i\u0000\u0000VW\u0005n\u0000"+
"\u0000WX\u0005t\u0000\u0000XY\u0005e\u0000\u0000YZ\u0005r\u0000\u0000"+
"Z[\u0005f\u0000\u0000[\\\u0005a\u0000\u0000\\]\u0005c\u0000\u0000]^\u0005"+
"e\u0000\u0000^\u0004\u0001\u0000\u0000\u0000_`\u0005s\u0000\u0000`a\u0005"+
"p\u0000\u0000ab\u0005e\u0000\u0000bc\u0005c\u0000\u0000cd\u0005i\u0000"+
"\u0000de\u0005f\u0000\u0000ef\u0005i\u0000\u0000fg\u0005c\u0000\u0000"+
"gh\u0005a\u0000\u0000hi\u0005t\u0000\u0000ij\u0005i\u0000\u0000jk\u0005"+
"o\u0000\u0000kl\u0005n\u0000\u0000l\u0006\u0001\u0000\u0000\u0000mn\u0005"+
"i\u0000\u0000no\u0005m\u0000\u0000op\u0005p\u0000\u0000pq\u0005l\u0000"+
"\u0000qr\u0005e\u0000\u0000rs\u0005m\u0000\u0000st\u0005e\u0000\u0000"+
"tu\u0005n\u0000\u0000uv\u0005t\u0000\u0000vw\u0005s\u0000\u0000w\b\u0001"+
"\u0000\u0000\u0000xy\u0005@\u0000\u0000y\n\u0001\u0000\u0000\u0000z{\u0005"+
"r\u0000\u0000{|\u0005e\u0000\u0000|}\u0005s\u0000\u0000}~\u0005u\u0000"+
"\u0000~\u007f\u0005l\u0000\u0000\u007f\u0080\u0005t\u0000\u0000\u0080"+
"\f\u0001\u0000\u0000\u0000\u0081\u0082\u0005A\u0000\u0000\u0082\u0083"+
"\u0005N\u0000\u0000\u0083\u0084\u0005D\u0000\u0000\u0084\u000e\u0001\u0000"+
"\u0000\u0000\u0085\u0086\u0005O\u0000\u0000\u0086\u0087\u0005R\u0000\u0000"+
"\u0087\u0010\u0001\u0000\u0000\u0000\u0088\u0089\u0005r\u0000\u0000\u0089"+
"\u008a\u0005e\u0000\u0000\u008a\u008b\u0005t\u0000\u0000\u008b\u008c\u0005"+
"u\u0000\u0000\u008c\u008d\u0005r\u0000\u0000\u008d\u008e\u0005n\u0000"+
"\u0000\u008e\u0012\u0001\u0000\u0000\u0000\u008f\u0090\u0005[\u0000\u0000"+
"\u0090\u0091\u0005]\u0000\u0000\u0091\u0014\u0001\u0000\u0000\u0000\u0092"+
"\u0093\u0005c\u0000\u0000\u0093\u0094\u0005r\u0000\u0000\u0094\u0095\u0005"+
"i\u0000\u0000\u0095\u0096\u0005t\u0000\u0000\u0096\u0097\u0005i\u0000"+
"\u0000\u0097\u0098\u0005c\u0000\u0000\u0098\u0099\u0005a\u0000\u0000\u0099"+
"\u009a\u0005l\u0000\u0000\u009a\u0016\u0001\u0000\u0000\u0000\u009b\u009c"+
"\u0005o\u0000\u0000\u009c\u009d\u0005p\u0000\u0000\u009d\u009e\u0005t"+
"\u0000\u0000\u009e\u009f\u0005i\u0000\u0000\u009f\u00a0\u0005o\u0000\u0000"+
"\u00a0\u00a1\u0005n\u0000\u0000\u00a1\u00a2\u0005a\u0000\u0000\u00a2\u00a3"+
"\u0005l\u0000\u0000\u00a3\u0018\u0001\u0000\u0000\u0000\u00a4\u00a5\u0005"+
"I\u0000\u0000\u00a5\u00a6\u0005N\u0000\u0000\u00a6\u00a7\u0005T\u0000"+
"\u0000\u00a7\u001a\u0001\u0000\u0000\u0000\u00a8\u00a9\u0005F\u0000\u0000"+
"\u00a9\u00aa\u0005L\u0000\u0000\u00aa\u00ab\u0005O\u0000\u0000\u00ab\u00ac"+
"\u0005A\u0000\u0000\u00ac\u00ad\u0005T\u0000\u0000\u00ad\u001c\u0001\u0000"+
"\u0000\u0000\u00ae\u00af\u0005D\u0000\u0000\u00af\u00b0\u0005O\u0000\u0000"+
"\u00b0\u00b1\u0005U\u0000\u0000\u00b1\u00b2\u0005B\u0000\u0000\u00b2\u00b3"+
"\u0005L\u0000\u0000\u00b3\u00b4\u0005E\u0000\u0000\u00b4\u001e\u0001\u0000"+
"\u0000\u0000\u00b5\u00b6\u0005S\u0000\u0000\u00b6\u00b7\u0005T\u0000\u0000"+
"\u00b7\u00b8\u0005R\u0000\u0000\u00b8\u00b9\u0005I\u0000\u0000\u00b9\u00ba"+
"\u0005N\u0000\u0000\u00ba\u00bb\u0005G\u0000\u0000\u00bb \u0001\u0000"+
"\u0000\u0000\u00bc\u00bd\u0005B\u0000\u0000\u00bd\u00be\u0005O\u0000\u0000"+
"\u00be\u00bf\u0005O\u0000\u0000\u00bf\u00c0\u0005L\u0000\u0000\u00c0\u00c1"+
"\u0005E\u0000\u0000\u00c1\u00c2\u0005A\u0000\u0000\u00c2\u00c3\u0005N"+
"\u0000\u0000\u00c3\"\u0001\u0000\u0000\u0000\u00c4\u00c5\u0005C\u0000"+
"\u0000\u00c5\u00c6\u0005H\u0000\u0000\u00c6\u00c7\u0005A\u0000\u0000\u00c7"+
"\u00c8\u0005R\u0000\u0000\u00c8$\u0001\u0000\u0000\u0000\u00c9\u00ca\u0005"+
"V\u0000\u0000\u00ca\u00cb\u0005O\u0000\u0000\u00cb\u00cc\u0005I\u0000"+
"\u0000\u00cc\u00cd\u0005D\u0000\u0000\u00cd&\u0001\u0000\u0000\u0000\u00ce"+
"\u00cf\u0005p\u0000\u0000\u00cf\u00d0\u0005u\u0000\u0000\u00d0\u00d1\u0005"+
"b\u0000\u0000\u00d1\u00d2\u0005l\u0000\u0000\u00d2\u00d3\u0005i\u0000"+
"\u0000\u00d3\u00d4\u0005c\u0000\u0000\u00d4(\u0001\u0000\u0000\u0000\u00d5"+
"\u00d6\u0005p\u0000\u0000\u00d6\u00d7\u0005r\u0000\u0000\u00d7\u00d8\u0005"+
"o\u0000\u0000\u00d8\u00d9\u0005t\u0000\u0000\u00d9\u00da\u0005e\u0000"+
"\u0000\u00da\u00db\u0005c\u0000\u0000\u00db\u00dc\u0005t\u0000\u0000\u00dc"+
"\u00dd\u0005e\u0000\u0000\u00dd\u00de\u0005d\u0000\u0000\u00de*\u0001"+
"\u0000\u0000\u0000\u00df\u00e0\u0005p\u0000\u0000\u00e0\u00e1\u0005r\u0000"+
"\u0000\u00e1\u00e2\u0005i\u0000\u0000\u00e2\u00e3\u0005v\u0000\u0000\u00e3"+
"\u00e4\u0005a\u0000\u0000\u00e4\u00e5\u0005t\u0000\u0000\u00e5\u00e6\u0005"+
"e\u0000\u0000\u00e6,\u0001\u0000\u0000\u0000\u00e7\u00e8\u0005d\u0000"+
"\u0000\u00e8\u00e9\u0005e\u0000\u0000\u00e9\u00ea\u0005f\u0000\u0000\u00ea"+
"\u00eb\u0005a\u0000\u0000\u00eb\u00ec\u0005u\u0000\u0000\u00ec\u00ed\u0005"+
"l\u0000\u0000\u00ed\u00ee\u0005t\u0000\u0000\u00ee.\u0001\u0000\u0000"+
"\u0000\u00ef\u00f1\u0007\u0000\u0000\u0000\u00f0\u00ef\u0001\u0000\u0000"+
"\u0000\u00f1\u00f2\u0001\u0000\u0000\u0000\u00f2\u00f0\u0001\u0000\u0000"+
"\u0000\u00f2\u00f3\u0001\u0000\u0000\u0000\u00f30\u0001\u0000\u0000\u0000"+
"\u00f4\u00f8\u0005\"\u0000\u0000\u00f5\u00f7\b\u0001\u0000\u0000\u00f6"+
"\u00f5\u0001\u0000\u0000\u0000\u00f7\u00fa\u0001\u0000\u0000\u0000\u00f8"+
"\u00f6\u0001\u0000\u0000\u0000\u00f8\u00f9\u0001\u0000\u0000\u0000\u00f9"+
"\u00fb\u0001\u0000\u0000\u0000\u00fa\u00f8\u0001\u0000\u0000\u0000\u00fb"+
"\u00fc\u0005\"\u0000\u0000\u00fc2\u0001\u0000\u0000\u0000\u00fd\u0101"+
"\u0005~\u0000\u0000\u00fe\u0100\b\u0002\u0000\u0000\u00ff\u00fe\u0001"+
"\u0000\u0000\u0000\u0100\u0103\u0001\u0000\u0000\u0000\u0101\u0102\u0001"+
"\u0000\u0000\u0000\u0101\u00ff\u0001\u0000\u0000\u0000\u0102\u0104\u0001"+
"\u0000\u0000\u0000\u0103\u0101\u0001\u0000\u0000\u0000\u0104\u0105\u0005"+
"~\u0000\u0000\u01054\u0001\u0000\u0000\u0000\u0106\u0108\u0007\u0003\u0000"+
"\u0000\u0107\u0106\u0001\u0000\u0000\u0000\u0108\u0109\u0001\u0000\u0000"+
"\u0000\u0109\u0107\u0001\u0000\u0000\u0000\u0109\u010a\u0001\u0000\u0000"+
"\u0000\u010a\u010b\u0001\u0000\u0000\u0000\u010b\u010c\u0006\u001a\u0000"+
"\u0000\u010c6\u0001\u0000\u0000\u0000\u010d\u010f\u0007\u0004\u0000\u0000"+
"\u010e\u010d\u0001\u0000\u0000\u0000\u010f\u0110\u0001\u0000\u0000\u0000"+
"\u0110\u010e\u0001\u0000\u0000\u0000\u0110\u0111\u0001\u0000\u0000\u0000"+
"\u01118\u0001\u0000\u0000\u0000\u0112\u0114\u0007\u0004\u0000\u0000\u0113"+
"\u0112\u0001\u0000\u0000\u0000\u0114\u0115\u0001\u0000\u0000\u0000\u0115"+
"\u0113\u0001\u0000\u0000\u0000\u0115\u0116\u0001\u0000\u0000\u0000\u0116"+
"\u0117\u0001\u0000\u0000\u0000\u0117\u011b\u0005.\u0000\u0000\u0118\u011a"+
"\u0007\u0004\u0000\u0000\u0119\u0118\u0001\u0000\u0000\u0000\u011a\u011d"+
"\u0001\u0000\u0000\u0000\u011b\u0119\u0001\u0000\u0000\u0000\u011b\u011c"+
"\u0001\u0000\u0000\u0000\u011c\u0125\u0001\u0000\u0000\u0000\u011d\u011b"+
"\u0001\u0000\u0000\u0000\u011e\u0120\u0005.\u0000\u0000\u011f\u0121\u0007"+
"\u0004\u0000\u0000\u0120\u011f\u0001\u0000\u0000\u0000\u0121\u0122\u0001"+
"\u0000\u0000\u0000\u0122\u0120\u0001\u0000\u0000\u0000\u0122\u0123\u0001"+
"\u0000\u0000\u0000\u0123\u0125\u0001\u0000\u0000\u0000\u0124\u0113\u0001"+
"\u0000\u0000\u0000\u0124\u011e\u0001\u0000\u0000\u0000\u0125:\u0001\u0000"+
"\u0000\u0000\u0126\u0127\u0005(\u0000\u0000\u0127<\u0001\u0000\u0000\u0000"+
"\u0128\u0129\u0005)\u0000\u0000\u0129>\u0001\u0000\u0000\u0000\u012a\u012b"+
"\u0005:\u0000\u0000\u012b@\u0001\u0000\u0000\u0000\u012c\u012d\u0005;"+
"\u0000\u0000\u012dB\u0001\u0000\u0000\u0000\u012e\u012f\u0005,\u0000\u0000"+
"\u012fD\u0001\u0000\u0000\u0000\u0130\u0131\u0005{\u0000\u0000\u0131F"+
"\u0001\u0000\u0000\u0000\u0132\u0133\u0005}\u0000\u0000\u0133H\u0001\u0000"+
"\u0000\u0000\u0134\u0135\u0005~\u0000\u0000\u0135J\u0001\u0000\u0000\u0000"+
"\u0136\u0137\u0005!\u0000\u0000\u0137L\u0001\u0000\u0000\u0000\n\u0000"+
"\u00f2\u00f8\u0101\u0109\u0110\u0115\u011b\u0122\u0124\u0001\u0006\u0000"+
"\u0000";
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);
}
}
}

View File

@@ -0,0 +1,70 @@
T__0=1
T__1=2
T__2=3
T__3=4
T__4=5
T__5=6
T__6=7
T__7=8
T__8=9
T__9=10
T__10=11
T__11=12
T__12=13
T__13=14
T__14=15
T__15=16
T__16=17
T__17=18
T__18=19
T__19=20
T__20=21
T__21=22
T__22=23
ID=24
STRING=25
DESCRIPTION=26
WS=27
INT=28
FLOAT=29
LPAREN=30
RPAREN=31
COLON=32
SEMICOLON=33
COMMA=34
LBRACE=35
RBRACE=36
TILDE=37
EXCLAM=38
'package'=1
'interface'=2
'specification'=3
'implements'=4
'@'=5
'result'=6
'AND'=7
'OR'=8
'return'=9
'[]'=10
'critical'=11
'optional'=12
'INT'=13
'FLOAT'=14
'DOUBLE'=15
'STRING'=16
'BOOLEAN'=17
'CHAR'=18
'VOID'=19
'public'=20
'protected'=21
'private'=22
'default'=23
'('=30
')'=31
':'=32
';'=33
','=34
'{'=35
'}'=36
'~'=37
'!'=38

View File

@@ -0,0 +1,220 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/Winx.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.tree.ParseTreeListener;
/**
* This interface defines a complete listener for a parse tree produced by
* {@link WinxParser}.
*/
public interface WinxListener extends ParseTreeListener {
/**
* Enter a parse tree produced by {@link WinxParser#winx}.
* @param ctx the parse tree
*/
void enterWinx(WinxParser.WinxContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#winx}.
* @param ctx the parse tree
*/
void exitWinx(WinxParser.WinxContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#body}.
* @param ctx the parse tree
*/
void enterBody(WinxParser.BodyContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#body}.
* @param ctx the parse tree
*/
void exitBody(WinxParser.BodyContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#package}.
* @param ctx the parse tree
*/
void enterPackage(WinxParser.PackageContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#package}.
* @param ctx the parse tree
*/
void exitPackage(WinxParser.PackageContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#interface}.
* @param ctx the parse tree
*/
void enterInterface(WinxParser.InterfaceContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#interface}.
* @param ctx the parse tree
*/
void exitInterface(WinxParser.InterfaceContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#specification}.
* @param ctx the parse tree
*/
void enterSpecification(WinxParser.SpecificationContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#specification}.
* @param ctx the parse tree
*/
void exitSpecification(WinxParser.SpecificationContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#interface_body}.
* @param ctx the parse tree
*/
void enterInterface_body(WinxParser.Interface_bodyContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#interface_body}.
* @param ctx the parse tree
*/
void exitInterface_body(WinxParser.Interface_bodyContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#specification_body}.
* @param ctx the parse tree
*/
void enterSpecification_body(WinxParser.Specification_bodyContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#specification_body}.
* @param ctx the parse tree
*/
void exitSpecification_body(WinxParser.Specification_bodyContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#requirementSpec}.
* @param ctx the parse tree
*/
void enterRequirementSpec(WinxParser.RequirementSpecContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#requirementSpec}.
* @param ctx the parse tree
*/
void exitRequirementSpec(WinxParser.RequirementSpecContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#req_specification}.
* @param ctx the parse tree
*/
void enterReq_specification(WinxParser.Req_specificationContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#req_specification}.
* @param ctx the parse tree
*/
void exitReq_specification(WinxParser.Req_specificationContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#result_specification}.
* @param ctx the parse tree
*/
void enterResult_specification(WinxParser.Result_specificationContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#result_specification}.
* @param ctx the parse tree
*/
void exitResult_specification(WinxParser.Result_specificationContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#logical_op}.
* @param ctx the parse tree
*/
void enterLogical_op(WinxParser.Logical_opContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#logical_op}.
* @param ctx the parse tree
*/
void exitLogical_op(WinxParser.Logical_opContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#functionSpec}.
* @param ctx the parse tree
*/
void enterFunctionSpec(WinxParser.FunctionSpecContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#functionSpec}.
* @param ctx the parse tree
*/
void exitFunctionSpec(WinxParser.FunctionSpecContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#functionBody}.
* @param ctx the parse tree
*/
void enterFunctionBody(WinxParser.FunctionBodyContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#functionBody}.
* @param ctx the parse tree
*/
void exitFunctionBody(WinxParser.FunctionBodyContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#input_types}.
* @param ctx the parse tree
*/
void enterInput_types(WinxParser.Input_typesContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#input_types}.
* @param ctx the parse tree
*/
void exitInput_types(WinxParser.Input_typesContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#return_types}.
* @param ctx the parse tree
*/
void enterReturn_types(WinxParser.Return_typesContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#return_types}.
* @param ctx the parse tree
*/
void exitReturn_types(WinxParser.Return_typesContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#specificationEntry}.
* @param ctx the parse tree
*/
void enterSpecificationEntry(WinxParser.SpecificationEntryContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#specificationEntry}.
* @param ctx the parse tree
*/
void exitSpecificationEntry(WinxParser.SpecificationEntryContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#variable}.
* @param ctx the parse tree
*/
void enterVariable(WinxParser.VariableContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#variable}.
* @param ctx the parse tree
*/
void exitVariable(WinxParser.VariableContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#importance}.
* @param ctx the parse tree
*/
void enterImportance(WinxParser.ImportanceContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#importance}.
* @param ctx the parse tree
*/
void exitImportance(WinxParser.ImportanceContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#type}.
* @param ctx the parse tree
*/
void enterType(WinxParser.TypeContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#type}.
* @param ctx the parse tree
*/
void exitType(WinxParser.TypeContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#access_modifiers}.
* @param ctx the parse tree
*/
void enterAccess_modifiers(WinxParser.Access_modifiersContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#access_modifiers}.
* @param ctx the parse tree
*/
void exitAccess_modifiers(WinxParser.Access_modifiersContext ctx);
/**
* Enter a parse tree produced by {@link WinxParser#description}.
* @param ctx the parse tree
*/
void enterDescription(WinxParser.DescriptionContext ctx);
/**
* Exit a parse tree produced by {@link WinxParser#description}.
* @param ctx the parse tree
*/
void exitDescription(WinxParser.DescriptionContext ctx);
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,139 @@
// Generated from D:/Source/JavaProjects/dsl-formal-requirements/src/grammars/Winx.g4 by ANTLR 4.13.1
package org.lumijiez.parser;
import org.antlr.v4.runtime.tree.ParseTreeVisitor;
/**
* This interface defines a complete generic visitor for a parse tree produced
* by {@link WinxParser}.
*
* @param <T> The return type of the visit operation. Use {@link Void} for
* operations with no return type.
*/
public interface WinxVisitor<T> extends ParseTreeVisitor<T> {
/**
* Visit a parse tree produced by {@link WinxParser#winx}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitWinx(WinxParser.WinxContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#body}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitBody(WinxParser.BodyContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#package}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitPackage(WinxParser.PackageContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#interface}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInterface(WinxParser.InterfaceContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSpecification(WinxParser.SpecificationContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#interface_body}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInterface_body(WinxParser.Interface_bodyContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#specification_body}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSpecification_body(WinxParser.Specification_bodyContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#requirementSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitRequirementSpec(WinxParser.RequirementSpecContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#req_specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReq_specification(WinxParser.Req_specificationContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#result_specification}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitResult_specification(WinxParser.Result_specificationContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#logical_op}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitLogical_op(WinxParser.Logical_opContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#functionSpec}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionSpec(WinxParser.FunctionSpecContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#functionBody}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitFunctionBody(WinxParser.FunctionBodyContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#input_types}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitInput_types(WinxParser.Input_typesContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#return_types}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitReturn_types(WinxParser.Return_typesContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#specificationEntry}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitSpecificationEntry(WinxParser.SpecificationEntryContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#variable}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitVariable(WinxParser.VariableContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#importance}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitImportance(WinxParser.ImportanceContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#type}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitType(WinxParser.TypeContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#access_modifiers}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitAccess_modifiers(WinxParser.Access_modifiersContext ctx);
/**
* Visit a parse tree produced by {@link WinxParser#description}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitDescription(WinxParser.DescriptionContext ctx);
}

View File

@@ -1,7 +1,23 @@
~A package defines a full set of specifications for a general set of features~
package Database {
~This is for comments, or descriptions~
critical DatabaseAccess {
~An interface holds an abstract structure to be implemented in a specification~
critical interface Database {
~This is a variably abstract functional specification~
critical public GetUserList(FLOAT[] x, STRING ag) {
@ExecTime : "10s";
@MaxReturnVals : "10s";
return INT x;
}
}
~A specification is a concrete implementation of requirement specifications~
~It might or might not implement an interface~
specification DatabaseAccess implements Database {
~This is a concrete non-functional specification~
critical DatabaseAccessMember {
optional @UserHasAdminAccess;
critical @UserIsNotBanned;
@@ -10,13 +26,13 @@ package Database {
result Clock;
}
~This is for comments, or explanations~
critical public GetUserList(FLOAT[] x, STRING ag) {
~This is a concrete functional specification, it might implement an interface~
critical public GetUserList(FLOAT[] x, STRING ag) implements DatabaseAccessImpl {
@ExecTime : "10s";
@MaxReturnVals : "10s";
return INT x;
}
}
}