The default implementation does nothing.
*/ - @Override public void enterProgram(SoftwareRequirementsParser.ProgramContext ctx) { } + @Override public void enterWinx(WinxParser.WinxContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitProgram(SoftwareRequirementsParser.ProgramContext ctx) { } + @Override public void exitWinx(WinxParser.WinxContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { } + @Override public void enterBody(WinxParser.BodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { } + @Override public void exitBody(WinxParser.BodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { } + @Override public void enterPackage(WinxParser.PackageContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { } + @Override public void exitPackage(WinxParser.PackageContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { } + @Override public void enterInterface(WinxParser.InterfaceContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { } + @Override public void exitInterface(WinxParser.InterfaceContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { } + @Override public void enterSpecification(WinxParser.SpecificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { } + @Override public void exitSpecification(WinxParser.SpecificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterPredicate(SoftwareRequirementsParser.PredicateContext ctx) { } + @Override public void enterInterface_body(WinxParser.Interface_bodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitPredicate(SoftwareRequirementsParser.PredicateContext ctx) { } + @Override public void exitInterface_body(WinxParser.Interface_bodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterExpression(SoftwareRequirementsParser.ExpressionContext ctx) { } + @Override public void enterSpecification_body(WinxParser.Specification_bodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitExpression(SoftwareRequirementsParser.ExpressionContext ctx) { } + @Override public void exitSpecification_body(WinxParser.Specification_bodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterTerm(SoftwareRequirementsParser.TermContext ctx) { } + @Override public void enterRequirementSpec(WinxParser.RequirementSpecContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitTerm(SoftwareRequirementsParser.TermContext ctx) { } + @Override public void exitRequirementSpec(WinxParser.RequirementSpecContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterLogical_op(SoftwareRequirementsParser.Logical_opContext ctx) { } + @Override public void enterReq_specification(WinxParser.Req_specificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitLogical_op(SoftwareRequirementsParser.Logical_opContext ctx) { } + @Override public void exitReq_specification(WinxParser.Req_specificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { } + @Override public void enterResult_specification(WinxParser.Result_specificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { } + @Override public void exitResult_specification(WinxParser.Result_specificationContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { } + @Override public void enterLogical_op(WinxParser.Logical_opContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { } + @Override public void exitLogical_op(WinxParser.Logical_opContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { } + @Override public void enterFunctionSpec(WinxParser.FunctionSpecContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { } + @Override public void exitFunctionSpec(WinxParser.FunctionSpecContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { } + @Override public void enterFunctionBody(WinxParser.FunctionBodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { } + @Override public void exitFunctionBody(WinxParser.FunctionBodyContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { } + @Override public void enterInput_types(WinxParser.Input_typesContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { } + @Override public void exitInput_types(WinxParser.Input_typesContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterVariable(SoftwareRequirementsParser.VariableContext ctx) { } + @Override public void enterReturn_types(WinxParser.Return_typesContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitVariable(SoftwareRequirementsParser.VariableContext ctx) { } + @Override public void exitReturn_types(WinxParser.Return_typesContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterImportance(SoftwareRequirementsParser.ImportanceContext ctx) { } + @Override public void enterSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitImportance(SoftwareRequirementsParser.ImportanceContext ctx) { } + @Override public void exitSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterType(SoftwareRequirementsParser.TypeContext ctx) { } + @Override public void enterVariable(WinxParser.VariableContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitType(SoftwareRequirementsParser.TypeContext ctx) { } + @Override public void exitVariable(WinxParser.VariableContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { } + @Override public void enterImportance(WinxParser.ImportanceContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { } + @Override public void exitImportance(WinxParser.ImportanceContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void enterDescription(SoftwareRequirementsParser.DescriptionContext ctx) { } + @Override public void enterType(WinxParser.TypeContext ctx) { } /** * {@inheritDoc} * *The default implementation does nothing.
*/ - @Override public void exitDescription(SoftwareRequirementsParser.DescriptionContext ctx) { } + @Override public void exitType(WinxParser.TypeContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterAccess_modifiers(WinxParser.Access_modifiersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitAccess_modifiers(WinxParser.Access_modifiersContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void enterDescription(WinxParser.DescriptionContext ctx) { } + /** + * {@inheritDoc} + * + *The default implementation does nothing.
+ */ + @Override public void exitDescription(WinxParser.DescriptionContext ctx) { } /** * {@inheritDoc} diff --git a/src/main/java/org/lumijiez/parser/SoftwareRequirementsBaseVisitor.java b/src/main/java/org/lumijiez/parser/WinxBaseVisitor.java similarity index 55% rename from src/main/java/org/lumijiez/parser/SoftwareRequirementsBaseVisitor.java rename to src/main/java/org/lumijiez/parser/WinxBaseVisitor.java index 0a27449..4fa9abc 100644 --- a/src/main/java/org/lumijiez/parser/SoftwareRequirementsBaseVisitor.java +++ b/src/main/java/org/lumijiez/parser/WinxBaseVisitor.java @@ -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 SoftwareRequirementsBaseVisitorThe default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitProgram(SoftwareRequirementsParser.ProgramContext ctx) { return visitChildren(ctx); } + @Override public T visitWinx(WinxParser.WinxContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitProgram_body(SoftwareRequirementsParser.Program_bodyContext ctx) { return visitChildren(ctx); } + @Override public T visitBody(WinxParser.BodyContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitRequirementSpec(SoftwareRequirementsParser.RequirementSpecContext ctx) { return visitChildren(ctx); } + @Override public T visitPackage(WinxParser.PackageContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitReq_specification(SoftwareRequirementsParser.Req_specificationContext ctx) { return visitChildren(ctx); } + @Override public T visitInterface(WinxParser.InterfaceContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitResult_specification(SoftwareRequirementsParser.Result_specificationContext ctx) { return visitChildren(ctx); } + @Override public T visitSpecification(WinxParser.SpecificationContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitPredicate(SoftwareRequirementsParser.PredicateContext ctx) { return visitChildren(ctx); } + @Override public T visitInterface_body(WinxParser.Interface_bodyContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitExpression(SoftwareRequirementsParser.ExpressionContext ctx) { return visitChildren(ctx); } + @Override public T visitSpecification_body(WinxParser.Specification_bodyContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitTerm(SoftwareRequirementsParser.TermContext ctx) { return visitChildren(ctx); } + @Override public T visitRequirementSpec(WinxParser.RequirementSpecContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @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} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitFunctionSpec(SoftwareRequirementsParser.FunctionSpecContext ctx) { return visitChildren(ctx); } + @Override public T visitResult_specification(WinxParser.Result_specificationContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitFunctionBody(SoftwareRequirementsParser.FunctionBodyContext ctx) { return visitChildren(ctx); } + @Override public T visitLogical_op(WinxParser.Logical_opContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitInput_types(SoftwareRequirementsParser.Input_typesContext ctx) { return visitChildren(ctx); } + @Override public T visitFunctionSpec(WinxParser.FunctionSpecContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitReturn_types(SoftwareRequirementsParser.Return_typesContext ctx) { return visitChildren(ctx); } + @Override public T visitFunctionBody(WinxParser.FunctionBodyContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitSpecification(SoftwareRequirementsParser.SpecificationContext ctx) { return visitChildren(ctx); } + @Override public T visitInput_types(WinxParser.Input_typesContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitVariable(SoftwareRequirementsParser.VariableContext ctx) { return visitChildren(ctx); } + @Override public T visitReturn_types(WinxParser.Return_typesContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitImportance(SoftwareRequirementsParser.ImportanceContext ctx) { return visitChildren(ctx); } + @Override public T visitSpecificationEntry(WinxParser.SpecificationEntryContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitType(SoftwareRequirementsParser.TypeContext ctx) { return visitChildren(ctx); } + @Override public T visitVariable(WinxParser.VariableContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitAccess_modifiers(SoftwareRequirementsParser.Access_modifiersContext ctx) { return visitChildren(ctx); } + @Override public T visitImportance(WinxParser.ImportanceContext ctx) { return visitChildren(ctx); } /** * {@inheritDoc} * *The default implementation returns the result of calling * {@link #visitChildren} on {@code ctx}.
*/ - @Override public T visitDescription(SoftwareRequirementsParser.DescriptionContext ctx) { return visitChildren(ctx); } + @Override public T visitType(WinxParser.TypeContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.
+ */ + @Override public T visitAccess_modifiers(WinxParser.Access_modifiersContext ctx) { return visitChildren(ctx); } + /** + * {@inheritDoc} + * + *The default implementation returns the result of calling + * {@link #visitChildren} on {@code ctx}.
+ */ + @Override public T visitDescription(WinxParser.DescriptionContext ctx) { return visitChildren(ctx); } } \ No newline at end of file diff --git a/src/main/java/org/lumijiez/parser/WinxLexer.interp b/src/main/java/org/lumijiez/parser/WinxLexer.interp new file mode 100644 index 0000000..a548240 --- /dev/null +++ b/src/main/java/org/lumijiez/parser/WinxLexer.interp @@ -0,0 +1,131 @@ +token literal names: +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 +'(' +')' +':' +';' +',' +'{' +'}' +'~' +'!' + +token symbolic names: +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 + +rule names: +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 + +channel names: +DEFAULT_TOKEN_CHANNEL +HIDDEN + +mode names: +DEFAULT_MODE + +atn: +[4, 0, 38, 312, 6, -1, 2, 0, 7, 0, 2, 1, 7, 1, 2, 2, 7, 2, 2, 3, 7, 3, 2, 4, 7, 4, 2, 5, 7, 5, 2, 6, 7, 6, 2, 7, 7, 7, 2, 8, 7, 8, 2, 9, 7, 9, 2, 10, 7, 10, 2, 11, 7, 11, 2, 12, 7, 12, 2, 13, 7, 13, 2, 14, 7, 14, 2, 15, 7, 15, 2, 16, 7, 16, 2, 17, 7, 17, 2, 18, 7, 18, 2, 19, 7, 19, 2, 20, 7, 20, 2, 21, 7, 21, 2, 22, 7, 22, 2, 23, 7, 23, 2, 24, 7, 24, 2, 25, 7, 25, 2, 26, 7, 26, 2, 27, 7, 27, 2, 28, 7, 28, 2, 29, 7, 29, 2, 30, 7, 30, 2, 31, 7, 31, 2, 32, 7, 32, 2, 33, 7, 33, 2, 34, 7, 34, 2, 35, 7, 35, 2, 36, 7, 36, 2, 37, 7, 37, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 3, 1, 4, 1, 4, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 5, 1, 6, 1, 6, 1, 6, 1, 6, 1, 7, 1, 7, 1, 7, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 8, 1, 9, 1, 9, 1, 9, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 11, 1, 12, 1, 12, 1, 12, 1, 12, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 13, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 14, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 15, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 16, 1, 17, 1, 17, 1, 17, 1, 17, 1, 17, 1, 18, 1, 18, 1, 18, 1, 18, 1, 18, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 19, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 20, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 21, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 22, 1, 23, 4, 23, 241, 8, 23, 11, 23, 12, 23, 242, 1, 24, 1, 24, 5, 24, 247, 8, 24, 10, 24, 12, 24, 250, 9, 24, 1, 24, 1, 24, 1, 25, 1, 25, 5, 25, 256, 8, 25, 10, 25, 12, 25, 259, 9, 25, 1, 25, 1, 25, 1, 26, 4, 26, 264, 8, 26, 11, 26, 12, 26, 265, 1, 26, 1, 26, 1, 27, 4, 27, 271, 8, 27, 11, 27, 12, 27, 272, 1, 28, 4, 28, 276, 8, 28, 11, 28, 12, 28, 277, 1, 28, 1, 28, 5, 28, 282, 8, 28, 10, 28, 12, 28, 285, 9, 28, 1, 28, 1, 28, 4, 28, 289, 8, 28, 11, 28, 12, 28, 290, 3, 28, 293, 8, 28, 1, 29, 1, 29, 1, 30, 1, 30, 1, 31, 1, 31, 1, 32, 1, 32, 1, 33, 1, 33, 1, 34, 1, 34, 1, 35, 1, 35, 1, 36, 1, 36, 1, 37, 1, 37, 1, 257, 0, 38, 1, 1, 3, 2, 5, 3, 7, 4, 9, 5, 11, 6, 13, 7, 15, 8, 17, 9, 19, 10, 21, 11, 23, 12, 25, 13, 27, 14, 29, 15, 31, 16, 33, 17, 35, 18, 37, 19, 39, 20, 41, 21, 43, 22, 45, 23, 47, 24, 49, 25, 51, 26, 53, 27, 55, 28, 57, 29, 59, 30, 61, 31, 63, 32, 65, 33, 67, 34, 69, 35, 71, 36, 73, 37, 75, 38, 1, 0, 5, 2, 0, 65, 90, 97, 122, 1, 0, 34, 34, 1, 0, 126, 126, 3, 0, 9, 10, 13, 13, 32, 32, 1, 0, 48, 57, 320, 0, 1, 1, 0, 0, 0, 0, 3, 1, 0, 0, 0, 0, 5, 1, 0, 0, 0, 0, 7, 1, 0, 0, 0, 0, 9, 1, 0, 0, 0, 0, 11, 1, 0, 0, 0, 0, 13, 1, 0, 0, 0, 0, 15, 1, 0, 0, 0, 0, 17, 1, 0, 0, 0, 0, 19, 1, 0, 0, 0, 0, 21, 1, 0, 0, 0, 0, 23, 1, 0, 0, 0, 0, 25, 1, 0, 0, 0, 0, 27, 1, 0, 0, 0, 0, 29, 1, 0, 0, 0, 0, 31, 1, 0, 0, 0, 0, 33, 1, 0, 0, 0, 0, 35, 1, 0, 0, 0, 0, 37, 1, 0, 0, 0, 0, 39, 1, 0, 0, 0, 0, 41, 1, 0, 0, 0, 0, 43, 1, 0, 0, 0, 0, 45, 1, 0, 0, 0, 0, 47, 1, 0, 0, 0, 0, 49, 1, 0, 0, 0, 0, 51, 1, 0, 0, 0, 0, 53, 1, 0, 0, 0, 0, 55, 1, 0, 0, 0, 0, 57, 1, 0, 0, 0, 0, 59, 1, 0, 0, 0, 0, 61, 1, 0, 0, 0, 0, 63, 1, 0, 0, 0, 0, 65, 1, 0, 0, 0, 0, 67, 1, 0, 0, 0, 0, 69, 1, 0, 0, 0, 0, 71, 1, 0, 0, 0, 0, 73, 1, 0, 0, 0, 0, 75, 1, 0, 0, 0, 1, 77, 1, 0, 0, 0, 3, 85, 1, 0, 0, 0, 5, 95, 1, 0, 0, 0, 7, 109, 1, 0, 0, 0, 9, 120, 1, 0, 0, 0, 11, 122, 1, 0, 0, 0, 13, 129, 1, 0, 0, 0, 15, 133, 1, 0, 0, 0, 17, 136, 1, 0, 0, 0, 19, 143, 1, 0, 0, 0, 21, 146, 1, 0, 0, 0, 23, 155, 1, 0, 0, 0, 25, 164, 1, 0, 0, 0, 27, 168, 1, 0, 0, 0, 29, 174, 1, 0, 0, 0, 31, 181, 1, 0, 0, 0, 33, 188, 1, 0, 0, 0, 35, 196, 1, 0, 0, 0, 37, 201, 1, 0, 0, 0, 39, 206, 1, 0, 0, 0, 41, 213, 1, 0, 0, 0, 43, 223, 1, 0, 0, 0, 45, 231, 1, 0, 0, 0, 47, 240, 1, 0, 0, 0, 49, 244, 1, 0, 0, 0, 51, 253, 1, 0, 0, 0, 53, 263, 1, 0, 0, 0, 55, 270, 1, 0, 0, 0, 57, 292, 1, 0, 0, 0, 59, 294, 1, 0, 0, 0, 61, 296, 1, 0, 0, 0, 63, 298, 1, 0, 0, 0, 65, 300, 1, 0, 0, 0, 67, 302, 1, 0, 0, 0, 69, 304, 1, 0, 0, 0, 71, 306, 1, 0, 0, 0, 73, 308, 1, 0, 0, 0, 75, 310, 1, 0, 0, 0, 77, 78, 5, 112, 0, 0, 78, 79, 5, 97, 0, 0, 79, 80, 5, 99, 0, 0, 80, 81, 5, 107, 0, 0, 81, 82, 5, 97, 0, 0, 82, 83, 5, 103, 0, 0, 83, 84, 5, 101, 0, 0, 84, 2, 1, 0, 0, 0, 85, 86, 5, 105, 0, 0, 86, 87, 5, 110, 0, 0, 87, 88, 5, 116, 0, 0, 88, 89, 5, 101, 0, 0, 89, 90, 5, 114, 0, 0, 90, 91, 5, 102, 0, 0, 91, 92, 5, 97, 0, 0, 92, 93, 5, 99, 0, 0, 93, 94, 5, 101, 0, 0, 94, 4, 1, 0, 0, 0, 95, 96, 5, 115, 0, 0, 96, 97, 5, 112, 0, 0, 97, 98, 5, 101, 0, 0, 98, 99, 5, 99, 0, 0, 99, 100, 5, 105, 0, 0, 100, 101, 5, 102, 0, 0, 101, 102, 5, 105, 0, 0, 102, 103, 5, 99, 0, 0, 103, 104, 5, 97, 0, 0, 104, 105, 5, 116, 0, 0, 105, 106, 5, 105, 0, 0, 106, 107, 5, 111, 0, 0, 107, 108, 5, 110, 0, 0, 108, 6, 1, 0, 0, 0, 109, 110, 5, 105, 0, 0, 110, 111, 5, 109, 0, 0, 111, 112, 5, 112, 0, 0, 112, 113, 5, 108, 0, 0, 113, 114, 5, 101, 0, 0, 114, 115, 5, 109, 0, 0, 115, 116, 5, 101, 0, 0, 116, 117, 5, 110, 0, 0, 117, 118, 5, 116, 0, 0, 118, 119, 5, 115, 0, 0, 119, 8, 1, 0, 0, 0, 120, 121, 5, 64, 0, 0, 121, 10, 1, 0, 0, 0, 122, 123, 5, 114, 0, 0, 123, 124, 5, 101, 0, 0, 124, 125, 5, 115, 0, 0, 125, 126, 5, 117, 0, 0, 126, 127, 5, 108, 0, 0, 127, 128, 5, 116, 0, 0, 128, 12, 1, 0, 0, 0, 129, 130, 5, 65, 0, 0, 130, 131, 5, 78, 0, 0, 131, 132, 5, 68, 0, 0, 132, 14, 1, 0, 0, 0, 133, 134, 5, 79, 0, 0, 134, 135, 5, 82, 0, 0, 135, 16, 1, 0, 0, 0, 136, 137, 5, 114, 0, 0, 137, 138, 5, 101, 0, 0, 138, 139, 5, 116, 0, 0, 139, 140, 5, 117, 0, 0, 140, 141, 5, 114, 0, 0, 141, 142, 5, 110, 0, 0, 142, 18, 1, 0, 0, 0, 143, 144, 5, 91, 0, 0, 144, 145, 5, 93, 0, 0, 145, 20, 1, 0, 0, 0, 146, 147, 5, 99, 0, 0, 147, 148, 5, 114, 0, 0, 148, 149, 5, 105, 0, 0, 149, 150, 5, 116, 0, 0, 150, 151, 5, 105, 0, 0, 151, 152, 5, 99, 0, 0, 152, 153, 5, 97, 0, 0, 153, 154, 5, 108, 0, 0, 154, 22, 1, 0, 0, 0, 155, 156, 5, 111, 0, 0, 156, 157, 5, 112, 0, 0, 157, 158, 5, 116, 0, 0, 158, 159, 5, 105, 0, 0, 159, 160, 5, 111, 0, 0, 160, 161, 5, 110, 0, 0, 161, 162, 5, 97, 0, 0, 162, 163, 5, 108, 0, 0, 163, 24, 1, 0, 0, 0, 164, 165, 5, 73, 0, 0, 165, 166, 5, 78, 0, 0, 166, 167, 5, 84, 0, 0, 167, 26, 1, 0, 0, 0, 168, 169, 5, 70, 0, 0, 169, 170, 5, 76, 0, 0, 170, 171, 5, 79, 0, 0, 171, 172, 5, 65, 0, 0, 172, 173, 5, 84, 0, 0, 173, 28, 1, 0, 0, 0, 174, 175, 5, 68, 0, 0, 175, 176, 5, 79, 0, 0, 176, 177, 5, 85, 0, 0, 177, 178, 5, 66, 0, 0, 178, 179, 5, 76, 0, 0, 179, 180, 5, 69, 0, 0, 180, 30, 1, 0, 0, 0, 181, 182, 5, 83, 0, 0, 182, 183, 5, 84, 0, 0, 183, 184, 5, 82, 0, 0, 184, 185, 5, 73, 0, 0, 185, 186, 5, 78, 0, 0, 186, 187, 5, 71, 0, 0, 187, 32, 1, 0, 0, 0, 188, 189, 5, 66, 0, 0, 189, 190, 5, 79, 0, 0, 190, 191, 5, 79, 0, 0, 191, 192, 5, 76, 0, 0, 192, 193, 5, 69, 0, 0, 193, 194, 5, 65, 0, 0, 194, 195, 5, 78, 0, 0, 195, 34, 1, 0, 0, 0, 196, 197, 5, 67, 0, 0, 197, 198, 5, 72, 0, 0, 198, 199, 5, 65, 0, 0, 199, 200, 5, 82, 0, 0, 200, 36, 1, 0, 0, 0, 201, 202, 5, 86, 0, 0, 202, 203, 5, 79, 0, 0, 203, 204, 5, 73, 0, 0, 204, 205, 5, 68, 0, 0, 205, 38, 1, 0, 0, 0, 206, 207, 5, 112, 0, 0, 207, 208, 5, 117, 0, 0, 208, 209, 5, 98, 0, 0, 209, 210, 5, 108, 0, 0, 210, 211, 5, 105, 0, 0, 211, 212, 5, 99, 0, 0, 212, 40, 1, 0, 0, 0, 213, 214, 5, 112, 0, 0, 214, 215, 5, 114, 0, 0, 215, 216, 5, 111, 0, 0, 216, 217, 5, 116, 0, 0, 217, 218, 5, 101, 0, 0, 218, 219, 5, 99, 0, 0, 219, 220, 5, 116, 0, 0, 220, 221, 5, 101, 0, 0, 221, 222, 5, 100, 0, 0, 222, 42, 1, 0, 0, 0, 223, 224, 5, 112, 0, 0, 224, 225, 5, 114, 0, 0, 225, 226, 5, 105, 0, 0, 226, 227, 5, 118, 0, 0, 227, 228, 5, 97, 0, 0, 228, 229, 5, 116, 0, 0, 229, 230, 5, 101, 0, 0, 230, 44, 1, 0, 0, 0, 231, 232, 5, 100, 0, 0, 232, 233, 5, 101, 0, 0, 233, 234, 5, 102, 0, 0, 234, 235, 5, 97, 0, 0, 235, 236, 5, 117, 0, 0, 236, 237, 5, 108, 0, 0, 237, 238, 5, 116, 0, 0, 238, 46, 1, 0, 0, 0, 239, 241, 7, 0, 0, 0, 240, 239, 1, 0, 0, 0, 241, 242, 1, 0, 0, 0, 242, 240, 1, 0, 0, 0, 242, 243, 1, 0, 0, 0, 243, 48, 1, 0, 0, 0, 244, 248, 5, 34, 0, 0, 245, 247, 8, 1, 0, 0, 246, 245, 1, 0, 0, 0, 247, 250, 1, 0, 0, 0, 248, 246, 1, 0, 0, 0, 248, 249, 1, 0, 0, 0, 249, 251, 1, 0, 0, 0, 250, 248, 1, 0, 0, 0, 251, 252, 5, 34, 0, 0, 252, 50, 1, 0, 0, 0, 253, 257, 5, 126, 0, 0, 254, 256, 8, 2, 0, 0, 255, 254, 1, 0, 0, 0, 256, 259, 1, 0, 0, 0, 257, 258, 1, 0, 0, 0, 257, 255, 1, 0, 0, 0, 258, 260, 1, 0, 0, 0, 259, 257, 1, 0, 0, 0, 260, 261, 5, 126, 0, 0, 261, 52, 1, 0, 0, 0, 262, 264, 7, 3, 0, 0, 263, 262, 1, 0, 0, 0, 264, 265, 1, 0, 0, 0, 265, 263, 1, 0, 0, 0, 265, 266, 1, 0, 0, 0, 266, 267, 1, 0, 0, 0, 267, 268, 6, 26, 0, 0, 268, 54, 1, 0, 0, 0, 269, 271, 7, 4, 0, 0, 270, 269, 1, 0, 0, 0, 271, 272, 1, 0, 0, 0, 272, 270, 1, 0, 0, 0, 272, 273, 1, 0, 0, 0, 273, 56, 1, 0, 0, 0, 274, 276, 7, 4, 0, 0, 275, 274, 1, 0, 0, 0, 276, 277, 1, 0, 0, 0, 277, 275, 1, 0, 0, 0, 277, 278, 1, 0, 0, 0, 278, 279, 1, 0, 0, 0, 279, 283, 5, 46, 0, 0, 280, 282, 7, 4, 0, 0, 281, 280, 1, 0, 0, 0, 282, 285, 1, 0, 0, 0, 283, 281, 1, 0, 0, 0, 283, 284, 1, 0, 0, 0, 284, 293, 1, 0, 0, 0, 285, 283, 1, 0, 0, 0, 286, 288, 5, 46, 0, 0, 287, 289, 7, 4, 0, 0, 288, 287, 1, 0, 0, 0, 289, 290, 1, 0, 0, 0, 290, 288, 1, 0, 0, 0, 290, 291, 1, 0, 0, 0, 291, 293, 1, 0, 0, 0, 292, 275, 1, 0, 0, 0, 292, 286, 1, 0, 0, 0, 293, 58, 1, 0, 0, 0, 294, 295, 5, 40, 0, 0, 295, 60, 1, 0, 0, 0, 296, 297, 5, 41, 0, 0, 297, 62, 1, 0, 0, 0, 298, 299, 5, 58, 0, 0, 299, 64, 1, 0, 0, 0, 300, 301, 5, 59, 0, 0, 301, 66, 1, 0, 0, 0, 302, 303, 5, 44, 0, 0, 303, 68, 1, 0, 0, 0, 304, 305, 5, 123, 0, 0, 305, 70, 1, 0, 0, 0, 306, 307, 5, 125, 0, 0, 307, 72, 1, 0, 0, 0, 308, 309, 5, 126, 0, 0, 309, 74, 1, 0, 0, 0, 310, 311, 5, 33, 0, 0, 311, 76, 1, 0, 0, 0, 10, 0, 242, 248, 257, 265, 272, 277, 283, 290, 292, 1, 6, 0, 0] \ No newline at end of file diff --git a/src/main/java/org/lumijiez/parser/WinxLexer.java b/src/main/java/org/lumijiez/parser/WinxLexer.java new file mode 100644 index 0000000..8c2897f --- /dev/null +++ b/src/main/java/org/lumijiez/parser/WinxLexer.java @@ -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] = "