blend-kit 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helper/ApiHelper.js +0 -0
- package/dist/helper/BasicHelper.js +28 -0
- package/dist/helper/CommonHelper.js +10 -0
- package/dist/helper/DataHelper.js +241 -0
- package/dist/helper/ExpressHelper.js +728 -0
- package/dist/helper/FrontEndApiHelper.js +485 -0
- package/dist/helper/FrontEndReactApiHelper.js +483 -0
- package/dist/helper/MongoHelper.js +143 -0
- package/dist/helper/RNHelper.js +560 -0
- package/dist/helper/ReactHelper.js +524 -0
- package/dist/helper/SectionHelper.js +152 -0
- package/dist/helper/fileHelper.js +127 -0
- package/dist/helper/grammarHelper/BlendApiGrammarHelper.js +48 -0
- package/dist/helper/grammarHelper/BlendBasicGrammarHelper.js +98 -0
- package/dist/helper/grammarHelper/BlendDataGrammarHelper.js +47 -0
- package/dist/helper/grammarHelper/BlendMDPGrammarHelper.js +29 -0
- package/dist/helper/grammarHelper/BlendMongoGrammarHelper.js +51 -0
- package/dist/helper/grammarHelper/BlendRNGrammarHelper.js +56 -0
- package/dist/helper/grammarHelper/BlendReactGrammarHelper.js +55 -0
- package/dist/helper/grammarHelper/GrammarErrorHelper.js +16 -0
- package/dist/index.js +159 -0
- package/dist/parser/blendApi/src/grammar/BlendApiLexer.js +201 -0
- package/dist/parser/blendApi/src/grammar/BlendApiListener.js +3 -0
- package/dist/parser/blendApi/src/grammar/BlendApiParser.js +961 -0
- package/dist/parser/blendData/src/grammar/BlendDataLexer.js +154 -0
- package/dist/parser/blendData/src/grammar/BlendDataListener.js +3 -0
- package/dist/parser/blendData/src/grammar/BlendDataParser.js +641 -0
- package/dist/parser/blendMDP/src/grammar/BlendMDPLexer.js +151 -0
- package/dist/parser/blendMDP/src/grammar/BlendMDPListener.js +3 -0
- package/dist/parser/blendMDP/src/grammar/BlendMDPParser.js +490 -0
- package/dist/parser/blendMongo/src/grammar/BlendMongoLexer.js +187 -0
- package/dist/parser/blendMongo/src/grammar/BlendMongoListener.js +3 -0
- package/dist/parser/blendMongo/src/grammar/BlendMongoParser.js +848 -0
- package/dist/parser/blendRN/src/grammar/BlendRNLexer.js +172 -0
- package/dist/parser/blendRN/src/grammar/BlendRNListener.js +3 -0
- package/dist/parser/blendRN/src/grammar/BlendRNParser.js +657 -0
- package/dist/parser/blendReact/src/grammar/BlendReactLexer.js +159 -0
- package/dist/parser/blendReact/src/grammar/BlendReactListener.js +3 -0
- package/dist/parser/blendReact/src/grammar/BlendReactParser.js +644 -0
- package/dist/parser/blendbasic/src/grammar/BlendBasicLexer.js +147 -0
- package/dist/parser/blendbasic/src/grammar/BlendBasicListener.js +3 -0
- package/dist/parser/blendbasic/src/grammar/BlendBasicParser.js +747 -0
- package/dist/src/app.js +76 -0
- package/dist/src/app.ts +54 -0
- package/dist/types/apiOperationTypes.js +13 -0
- package/dist/types/basicOperationTypes.js +2 -0
- package/dist/types/dataOperationTypes.js +2 -0
- package/dist/types/frontendOperationTypes.js +4 -0
- package/dist/types/generalTypes.js +0 -0
- package/dist/types/mongoOperationTypes.js +12 -0
- package/package.json +29 -0
- package/src/grammar/.antlr/ApiModuleLexer.interp +71 -0
- package/src/grammar/.antlr/ApiModuleLexer.java +194 -0
- package/src/grammar/.antlr/ApiModuleLexer.tokens +32 -0
- package/src/grammar/.antlr/BlendApi.interp +70 -0
- package/src/grammar/.antlr/BlendApi.tokens +44 -0
- package/src/grammar/.antlr/BlendApiLexer.interp +89 -0
- package/src/grammar/.antlr/BlendApiLexer.java +237 -0
- package/src/grammar/.antlr/BlendApiLexer.tokens +44 -0
- package/src/grammar/.antlr/BlendApiParser.java +767 -0
- package/src/grammar/.antlr/BlendBasic.interp +41 -0
- package/src/grammar/.antlr/BlendBasic.tokens +20 -0
- package/src/grammar/.antlr/BlendBasicLexer.interp +50 -0
- package/src/grammar/.antlr/BlendBasicLexer.java +179 -0
- package/src/grammar/.antlr/BlendBasicLexer.tokens +20 -0
- package/src/grammar/.antlr/BlendBasicParser.java +599 -0
- package/src/grammar/.antlr/BlendData.interp +50 -0
- package/src/grammar/.antlr/BlendData.tokens +29 -0
- package/src/grammar/.antlr/BlendDataLexer.interp +65 -0
- package/src/grammar/.antlr/BlendDataLexer.java +181 -0
- package/src/grammar/.antlr/BlendDataLexer.tokens +29 -0
- package/src/grammar/.antlr/BlendDataParser.java +520 -0
- package/src/grammar/.antlr/BlendMDP.interp +45 -0
- package/src/grammar/.antlr/BlendMDP.tokens +25 -0
- package/src/grammar/.antlr/BlendMDPLexer.interp +59 -0
- package/src/grammar/.antlr/BlendMDPLexer.java +178 -0
- package/src/grammar/.antlr/BlendMDPLexer.tokens +25 -0
- package/src/grammar/.antlr/BlendMDPParser.java +386 -0
- package/src/grammar/.antlr/BlendMongo.interp +65 -0
- package/src/grammar/.antlr/BlendMongo.tokens +41 -0
- package/src/grammar/.antlr/BlendMongoLexer.interp +83 -0
- package/src/grammar/.antlr/BlendMongoLexer.java +219 -0
- package/src/grammar/.antlr/BlendMongoLexer.tokens +41 -0
- package/src/grammar/.antlr/BlendMongoParser.java +669 -0
- package/src/grammar/.antlr/BlendRN.interp +53 -0
- package/src/grammar/.antlr/BlendRN.tokens +31 -0
- package/src/grammar/.antlr/BlendRNLexer.interp +71 -0
- package/src/grammar/.antlr/BlendRNLexer.java +202 -0
- package/src/grammar/.antlr/BlendRNLexer.tokens +31 -0
- package/src/grammar/.antlr/BlendRNParser.java +542 -0
- package/src/grammar/.antlr/BlendReact.interp +49 -0
- package/src/grammar/.antlr/BlendReact.tokens +28 -0
- package/src/grammar/.antlr/BlendReactLexer.interp +65 -0
- package/src/grammar/.antlr/BlendReactLexer.java +188 -0
- package/src/grammar/.antlr/BlendReactLexer.tokens +28 -0
- package/src/grammar/.antlr/BlendReactParser.java +530 -0
- package/src/grammar/BlendApi.g4 +26 -0
- package/src/grammar/BlendBasic.g4 +16 -0
- package/src/grammar/BlendData.g4 +24 -0
- package/src/grammar/BlendMDP.g4 +12 -0
- package/src/grammar/BlendMongo.g4 +24 -0
- package/src/grammar/BlendRN.g4 +18 -0
- package/src/grammar/BlendReact.g4 +16 -0
- package/src/helper/BasicHelper.ts +35 -0
- package/src/helper/CommonHelper.ts +5 -0
- package/src/helper/DataHelper.ts +268 -0
- package/src/helper/ExpressHelper.ts +807 -0
- package/src/helper/FrontEndApiHelper.ts +526 -0
- package/src/helper/FrontEndReactApiHelper.ts +532 -0
- package/src/helper/MongoHelper.ts +165 -0
- package/src/helper/RNHelper.ts +651 -0
- package/src/helper/ReactHelper.ts +597 -0
- package/src/helper/SectionHelper.ts +154 -0
- package/src/helper/fileHelper.ts +111 -0
- package/src/helper/grammarHelper/BlendApiGrammarHelper.ts +45 -0
- package/src/helper/grammarHelper/BlendBasicGrammarHelper.ts +101 -0
- package/src/helper/grammarHelper/BlendDataGrammarHelper.ts +49 -0
- package/src/helper/grammarHelper/BlendMDPGrammarHelper.ts +33 -0
- package/src/helper/grammarHelper/BlendMongoGrammarHelper.ts +50 -0
- package/src/helper/grammarHelper/BlendRNGrammarHelper.ts +65 -0
- package/src/helper/grammarHelper/BlendReactGrammarHelper.ts +65 -0
- package/src/helper/grammarHelper/GrammarErrorHelper.ts +13 -0
- package/src/index.ts +168 -0
- package/src/parser/blendApi/src/grammar/BlendApi.interp +70 -0
- package/src/parser/blendApi/src/grammar/BlendApi.tokens +44 -0
- package/src/parser/blendApi/src/grammar/BlendApiLexer.interp +89 -0
- package/src/parser/blendApi/src/grammar/BlendApiLexer.tokens +44 -0
- package/src/parser/blendApi/src/grammar/BlendApiLexer.ts +193 -0
- package/src/parser/blendApi/src/grammar/BlendApiListener.ts +145 -0
- package/src/parser/blendApi/src/grammar/BlendApiParser.ts +968 -0
- package/src/parser/blendData/src/grammar/BlendData.interp +50 -0
- package/src/parser/blendData/src/grammar/BlendData.tokens +29 -0
- package/src/parser/blendData/src/grammar/BlendDataLexer.interp +65 -0
- package/src/parser/blendData/src/grammar/BlendDataLexer.tokens +29 -0
- package/src/parser/blendData/src/grammar/BlendDataLexer.ts +146 -0
- package/src/parser/blendData/src/grammar/BlendDataListener.ts +97 -0
- package/src/parser/blendData/src/grammar/BlendDataParser.ts +641 -0
- package/src/parser/blendMDP/src/grammar/BlendMDP.interp +45 -0
- package/src/parser/blendMDP/src/grammar/BlendMDP.tokens +25 -0
- package/src/parser/blendMDP/src/grammar/BlendMDPLexer.interp +59 -0
- package/src/parser/blendMDP/src/grammar/BlendMDPLexer.tokens +25 -0
- package/src/parser/blendMDP/src/grammar/BlendMDPLexer.ts +143 -0
- package/src/parser/blendMDP/src/grammar/BlendMDPListener.ts +85 -0
- package/src/parser/blendMDP/src/grammar/BlendMDPParser.ts +483 -0
- package/src/parser/blendMongo/src/grammar/BlendMongo.interp +65 -0
- package/src/parser/blendMongo/src/grammar/BlendMongo.tokens +41 -0
- package/src/parser/blendMongo/src/grammar/BlendMongoLexer.interp +83 -0
- package/src/parser/blendMongo/src/grammar/BlendMongoLexer.tokens +41 -0
- package/src/parser/blendMongo/src/grammar/BlendMongoLexer.ts +179 -0
- package/src/parser/blendMongo/src/grammar/BlendMongoListener.ts +133 -0
- package/src/parser/blendMongo/src/grammar/BlendMongoParser.ts +849 -0
- package/src/parser/blendRN/src/grammar/BlendRN.interp +53 -0
- package/src/parser/blendRN/src/grammar/BlendRN.tokens +31 -0
- package/src/parser/blendRN/src/grammar/BlendRNLexer.interp +71 -0
- package/src/parser/blendRN/src/grammar/BlendRNLexer.tokens +31 -0
- package/src/parser/blendRN/src/grammar/BlendRNLexer.ts +164 -0
- package/src/parser/blendRN/src/grammar/BlendRNListener.ts +85 -0
- package/src/parser/blendRN/src/grammar/BlendRNParser.ts +659 -0
- package/src/parser/blendReact/src/grammar/BlendReact.interp +49 -0
- package/src/parser/blendReact/src/grammar/BlendReact.tokens +28 -0
- package/src/parser/blendReact/src/grammar/BlendReactLexer.interp +65 -0
- package/src/parser/blendReact/src/grammar/BlendReactLexer.tokens +28 -0
- package/src/parser/blendReact/src/grammar/BlendReactLexer.ts +151 -0
- package/src/parser/blendReact/src/grammar/BlendReactListener.ts +85 -0
- package/src/parser/blendReact/src/grammar/BlendReactParser.ts +646 -0
- package/src/parser/blendbasic/src/grammar/BlendBasic.interp +41 -0
- package/src/parser/blendbasic/src/grammar/BlendBasic.tokens +20 -0
- package/src/parser/blendbasic/src/grammar/BlendBasicLexer.interp +50 -0
- package/src/parser/blendbasic/src/grammar/BlendBasicLexer.tokens +20 -0
- package/src/parser/blendbasic/src/grammar/BlendBasicLexer.ts +139 -0
- package/src/parser/blendbasic/src/grammar/BlendBasicListener.ts +109 -0
- package/src/parser/blendbasic/src/grammar/BlendBasicParser.ts +747 -0
- package/src/types/apiOperationTypes.ts +43 -0
- package/src/types/basicOperationTypes.ts +15 -0
- package/src/types/dataOperationTypes.ts +20 -0
- package/src/types/frontendOperationTypes.ts +92 -0
- package/src/types/generalTypes.ts +0 -0
- package/src/types/mongoOperationTypes.ts +36 -0
- package/template/.env.dev +1 -0
- package/template/package.json +36 -0
- package/template/src/app.js +76 -0
- package/template/src/app.ts +54 -0
- package/template/src/config/app.config.js +0 -0
- package/template/src/config/app.config.ts +0 -0
- package/template/src/config/database.config.js +6 -0
- package/template/src/config/database.config.ts +4 -0
- package/template/src/data/interfaces.js +2 -0
- package/template/src/data/interfaces.ts +23 -0
- package/template/src/middlewares/auth.js +22 -0
- package/template/src/middlewares/auth.ts +21 -0
- package/template/src/models/Database.js +10 -0
- package/template/src/models/Database.ts +8 -0
- package/template/src/models/User/Permission.model.js +13 -0
- package/template/src/models/User/Permission.model.ts +14 -0
- package/template/src/models/User/Role.model.js +13 -0
- package/template/src/models/User/Role.model.ts +14 -0
- package/template/src/models/User/User.model.js +17 -0
- package/template/src/models/User/User.model.ts +18 -0
- package/template/src/routes/User.routes.js +47 -0
- package/template/src/routes/User.routes.ts +41 -0
- package/template/src/routes/common/common.routes.config.js +14 -0
- package/template/src/routes/common/common.routes.config.ts +15 -0
- package/template/src/services/User/User.service.js +75 -0
- package/template/src/services/User/User.service.ts +68 -0
- package/template/src/services/User/api.data.js +72 -0
- package/template/src/services/User/api.data.ts +79 -0
- package/template/src/services/User/api.interface.js +3 -0
- package/template/src/services/User/api.interface.ts +10 -0
- package/template/tsconfig.json +10 -0
- package/tsconfig.json +13 -0
|
@@ -0,0 +1,530 @@
|
|
|
1
|
+
// Generated from /Users/govindve/govi/Projects/NodeProjects/blend-cli/src/grammar/BlendReact.g4 by ANTLR 4.13.1
|
|
2
|
+
import org.antlr.v4.runtime.atn.*;
|
|
3
|
+
import org.antlr.v4.runtime.dfa.DFA;
|
|
4
|
+
import org.antlr.v4.runtime.*;
|
|
5
|
+
import org.antlr.v4.runtime.misc.*;
|
|
6
|
+
import org.antlr.v4.runtime.tree.*;
|
|
7
|
+
import java.util.List;
|
|
8
|
+
import java.util.Iterator;
|
|
9
|
+
import java.util.ArrayList;
|
|
10
|
+
|
|
11
|
+
@SuppressWarnings({"all", "warnings", "unchecked", "unused", "cast", "CheckReturnValue"})
|
|
12
|
+
public class BlendReactParser extends Parser {
|
|
13
|
+
static { RuntimeMetaData.checkVersion("4.13.1", RuntimeMetaData.VERSION); }
|
|
14
|
+
|
|
15
|
+
protected static final DFA[] _decisionToDFA;
|
|
16
|
+
protected static final PredictionContextCache _sharedContextCache =
|
|
17
|
+
new PredictionContextCache();
|
|
18
|
+
public static final int
|
|
19
|
+
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,
|
|
20
|
+
T__9=10, T__10=11, T__11=12, PATH_IDENTIFIER=13, IDENTIFIER=14, CAPITAL_IDENTIFIER=15,
|
|
21
|
+
WS=16;
|
|
22
|
+
public static final int
|
|
23
|
+
RULE_program = 0, RULE_moduleDefinition = 1, RULE_screenDefenition = 2,
|
|
24
|
+
RULE_componentDefenition = 3, RULE_layoutDefinition = 4, RULE_pageDefinition = 5;
|
|
25
|
+
private static String[] makeRuleNames() {
|
|
26
|
+
return new String[] {
|
|
27
|
+
"program", "moduleDefinition", "screenDefenition", "componentDefenition",
|
|
28
|
+
"layoutDefinition", "pageDefinition"
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
public static final String[] ruleNames = makeRuleNames();
|
|
32
|
+
|
|
33
|
+
private static String[] makeLiteralNames() {
|
|
34
|
+
return new String[] {
|
|
35
|
+
null, "'module'", "'screen'", "','", "'under'", "'component'", "'layout'",
|
|
36
|
+
"'('", "')'", "'{'", "'}'", "'page'", "'view'"
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
private static final String[] _LITERAL_NAMES = makeLiteralNames();
|
|
40
|
+
private static String[] makeSymbolicNames() {
|
|
41
|
+
return new String[] {
|
|
42
|
+
null, null, null, null, null, null, null, null, null, null, null, null,
|
|
43
|
+
null, "PATH_IDENTIFIER", "IDENTIFIER", "CAPITAL_IDENTIFIER", "WS"
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
private static final String[] _SYMBOLIC_NAMES = makeSymbolicNames();
|
|
47
|
+
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* @deprecated Use {@link #VOCABULARY} instead.
|
|
51
|
+
*/
|
|
52
|
+
@Deprecated
|
|
53
|
+
public static final String[] tokenNames;
|
|
54
|
+
static {
|
|
55
|
+
tokenNames = new String[_SYMBOLIC_NAMES.length];
|
|
56
|
+
for (int i = 0; i < tokenNames.length; i++) {
|
|
57
|
+
tokenNames[i] = VOCABULARY.getLiteralName(i);
|
|
58
|
+
if (tokenNames[i] == null) {
|
|
59
|
+
tokenNames[i] = VOCABULARY.getSymbolicName(i);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (tokenNames[i] == null) {
|
|
63
|
+
tokenNames[i] = "<INVALID>";
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@Override
|
|
69
|
+
@Deprecated
|
|
70
|
+
public String[] getTokenNames() {
|
|
71
|
+
return tokenNames;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@Override
|
|
75
|
+
|
|
76
|
+
public Vocabulary getVocabulary() {
|
|
77
|
+
return VOCABULARY;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
@Override
|
|
81
|
+
public String getGrammarFileName() { return "BlendReact.g4"; }
|
|
82
|
+
|
|
83
|
+
@Override
|
|
84
|
+
public String[] getRuleNames() { return ruleNames; }
|
|
85
|
+
|
|
86
|
+
@Override
|
|
87
|
+
public String getSerializedATN() { return _serializedATN; }
|
|
88
|
+
|
|
89
|
+
@Override
|
|
90
|
+
public ATN getATN() { return _ATN; }
|
|
91
|
+
|
|
92
|
+
public BlendReactParser(TokenStream input) {
|
|
93
|
+
super(input);
|
|
94
|
+
_interp = new ParserATNSimulator(this,_ATN,_decisionToDFA,_sharedContextCache);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@SuppressWarnings("CheckReturnValue")
|
|
98
|
+
public static class ProgramContext extends ParserRuleContext {
|
|
99
|
+
public ModuleDefinitionContext moduleDefinition() {
|
|
100
|
+
return getRuleContext(ModuleDefinitionContext.class,0);
|
|
101
|
+
}
|
|
102
|
+
public List<ComponentDefenitionContext> componentDefenition() {
|
|
103
|
+
return getRuleContexts(ComponentDefenitionContext.class);
|
|
104
|
+
}
|
|
105
|
+
public ComponentDefenitionContext componentDefenition(int i) {
|
|
106
|
+
return getRuleContext(ComponentDefenitionContext.class,i);
|
|
107
|
+
}
|
|
108
|
+
public List<ScreenDefenitionContext> screenDefenition() {
|
|
109
|
+
return getRuleContexts(ScreenDefenitionContext.class);
|
|
110
|
+
}
|
|
111
|
+
public ScreenDefenitionContext screenDefenition(int i) {
|
|
112
|
+
return getRuleContext(ScreenDefenitionContext.class,i);
|
|
113
|
+
}
|
|
114
|
+
public List<LayoutDefinitionContext> layoutDefinition() {
|
|
115
|
+
return getRuleContexts(LayoutDefinitionContext.class);
|
|
116
|
+
}
|
|
117
|
+
public LayoutDefinitionContext layoutDefinition(int i) {
|
|
118
|
+
return getRuleContext(LayoutDefinitionContext.class,i);
|
|
119
|
+
}
|
|
120
|
+
public ProgramContext(ParserRuleContext parent, int invokingState) {
|
|
121
|
+
super(parent, invokingState);
|
|
122
|
+
}
|
|
123
|
+
@Override public int getRuleIndex() { return RULE_program; }
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
public final ProgramContext program() throws RecognitionException {
|
|
127
|
+
ProgramContext _localctx = new ProgramContext(_ctx, getState());
|
|
128
|
+
enterRule(_localctx, 0, RULE_program);
|
|
129
|
+
int _la;
|
|
130
|
+
try {
|
|
131
|
+
enterOuterAlt(_localctx, 1);
|
|
132
|
+
{
|
|
133
|
+
setState(12);
|
|
134
|
+
moduleDefinition();
|
|
135
|
+
setState(16);
|
|
136
|
+
_errHandler.sync(this);
|
|
137
|
+
_la = _input.LA(1);
|
|
138
|
+
while (_la==T__4) {
|
|
139
|
+
{
|
|
140
|
+
{
|
|
141
|
+
setState(13);
|
|
142
|
+
componentDefenition();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
setState(18);
|
|
146
|
+
_errHandler.sync(this);
|
|
147
|
+
_la = _input.LA(1);
|
|
148
|
+
}
|
|
149
|
+
setState(22);
|
|
150
|
+
_errHandler.sync(this);
|
|
151
|
+
_la = _input.LA(1);
|
|
152
|
+
while (_la==T__1) {
|
|
153
|
+
{
|
|
154
|
+
{
|
|
155
|
+
setState(19);
|
|
156
|
+
screenDefenition();
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
setState(24);
|
|
160
|
+
_errHandler.sync(this);
|
|
161
|
+
_la = _input.LA(1);
|
|
162
|
+
}
|
|
163
|
+
setState(28);
|
|
164
|
+
_errHandler.sync(this);
|
|
165
|
+
_la = _input.LA(1);
|
|
166
|
+
while (_la==T__5) {
|
|
167
|
+
{
|
|
168
|
+
{
|
|
169
|
+
setState(25);
|
|
170
|
+
layoutDefinition();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
setState(30);
|
|
174
|
+
_errHandler.sync(this);
|
|
175
|
+
_la = _input.LA(1);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch (RecognitionException re) {
|
|
180
|
+
_localctx.exception = re;
|
|
181
|
+
_errHandler.reportError(this, re);
|
|
182
|
+
_errHandler.recover(this, re);
|
|
183
|
+
}
|
|
184
|
+
finally {
|
|
185
|
+
exitRule();
|
|
186
|
+
}
|
|
187
|
+
return _localctx;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
@SuppressWarnings("CheckReturnValue")
|
|
191
|
+
public static class ModuleDefinitionContext extends ParserRuleContext {
|
|
192
|
+
public TerminalNode CAPITAL_IDENTIFIER() { return getToken(BlendReactParser.CAPITAL_IDENTIFIER, 0); }
|
|
193
|
+
public ModuleDefinitionContext(ParserRuleContext parent, int invokingState) {
|
|
194
|
+
super(parent, invokingState);
|
|
195
|
+
}
|
|
196
|
+
@Override public int getRuleIndex() { return RULE_moduleDefinition; }
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
public final ModuleDefinitionContext moduleDefinition() throws RecognitionException {
|
|
200
|
+
ModuleDefinitionContext _localctx = new ModuleDefinitionContext(_ctx, getState());
|
|
201
|
+
enterRule(_localctx, 2, RULE_moduleDefinition);
|
|
202
|
+
try {
|
|
203
|
+
enterOuterAlt(_localctx, 1);
|
|
204
|
+
{
|
|
205
|
+
setState(31);
|
|
206
|
+
match(T__0);
|
|
207
|
+
setState(32);
|
|
208
|
+
match(CAPITAL_IDENTIFIER);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
catch (RecognitionException re) {
|
|
212
|
+
_localctx.exception = re;
|
|
213
|
+
_errHandler.reportError(this, re);
|
|
214
|
+
_errHandler.recover(this, re);
|
|
215
|
+
}
|
|
216
|
+
finally {
|
|
217
|
+
exitRule();
|
|
218
|
+
}
|
|
219
|
+
return _localctx;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
@SuppressWarnings("CheckReturnValue")
|
|
223
|
+
public static class ScreenDefenitionContext extends ParserRuleContext {
|
|
224
|
+
public List<TerminalNode> CAPITAL_IDENTIFIER() { return getTokens(BlendReactParser.CAPITAL_IDENTIFIER); }
|
|
225
|
+
public TerminalNode CAPITAL_IDENTIFIER(int i) {
|
|
226
|
+
return getToken(BlendReactParser.CAPITAL_IDENTIFIER, i);
|
|
227
|
+
}
|
|
228
|
+
public TerminalNode PATH_IDENTIFIER() { return getToken(BlendReactParser.PATH_IDENTIFIER, 0); }
|
|
229
|
+
public ScreenDefenitionContext(ParserRuleContext parent, int invokingState) {
|
|
230
|
+
super(parent, invokingState);
|
|
231
|
+
}
|
|
232
|
+
@Override public int getRuleIndex() { return RULE_screenDefenition; }
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
public final ScreenDefenitionContext screenDefenition() throws RecognitionException {
|
|
236
|
+
ScreenDefenitionContext _localctx = new ScreenDefenitionContext(_ctx, getState());
|
|
237
|
+
enterRule(_localctx, 4, RULE_screenDefenition);
|
|
238
|
+
int _la;
|
|
239
|
+
try {
|
|
240
|
+
enterOuterAlt(_localctx, 1);
|
|
241
|
+
{
|
|
242
|
+
setState(34);
|
|
243
|
+
match(T__1);
|
|
244
|
+
setState(35);
|
|
245
|
+
match(CAPITAL_IDENTIFIER);
|
|
246
|
+
setState(40);
|
|
247
|
+
_errHandler.sync(this);
|
|
248
|
+
_la = _input.LA(1);
|
|
249
|
+
while (_la==T__2) {
|
|
250
|
+
{
|
|
251
|
+
{
|
|
252
|
+
setState(36);
|
|
253
|
+
match(T__2);
|
|
254
|
+
setState(37);
|
|
255
|
+
match(CAPITAL_IDENTIFIER);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
setState(42);
|
|
259
|
+
_errHandler.sync(this);
|
|
260
|
+
_la = _input.LA(1);
|
|
261
|
+
}
|
|
262
|
+
setState(43);
|
|
263
|
+
match(T__3);
|
|
264
|
+
setState(44);
|
|
265
|
+
match(PATH_IDENTIFIER);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
catch (RecognitionException re) {
|
|
269
|
+
_localctx.exception = re;
|
|
270
|
+
_errHandler.reportError(this, re);
|
|
271
|
+
_errHandler.recover(this, re);
|
|
272
|
+
}
|
|
273
|
+
finally {
|
|
274
|
+
exitRule();
|
|
275
|
+
}
|
|
276
|
+
return _localctx;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
@SuppressWarnings("CheckReturnValue")
|
|
280
|
+
public static class ComponentDefenitionContext extends ParserRuleContext {
|
|
281
|
+
public List<TerminalNode> CAPITAL_IDENTIFIER() { return getTokens(BlendReactParser.CAPITAL_IDENTIFIER); }
|
|
282
|
+
public TerminalNode CAPITAL_IDENTIFIER(int i) {
|
|
283
|
+
return getToken(BlendReactParser.CAPITAL_IDENTIFIER, i);
|
|
284
|
+
}
|
|
285
|
+
public TerminalNode PATH_IDENTIFIER() { return getToken(BlendReactParser.PATH_IDENTIFIER, 0); }
|
|
286
|
+
public ComponentDefenitionContext(ParserRuleContext parent, int invokingState) {
|
|
287
|
+
super(parent, invokingState);
|
|
288
|
+
}
|
|
289
|
+
@Override public int getRuleIndex() { return RULE_componentDefenition; }
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
public final ComponentDefenitionContext componentDefenition() throws RecognitionException {
|
|
293
|
+
ComponentDefenitionContext _localctx = new ComponentDefenitionContext(_ctx, getState());
|
|
294
|
+
enterRule(_localctx, 6, RULE_componentDefenition);
|
|
295
|
+
int _la;
|
|
296
|
+
try {
|
|
297
|
+
enterOuterAlt(_localctx, 1);
|
|
298
|
+
{
|
|
299
|
+
setState(46);
|
|
300
|
+
match(T__4);
|
|
301
|
+
setState(47);
|
|
302
|
+
match(CAPITAL_IDENTIFIER);
|
|
303
|
+
setState(52);
|
|
304
|
+
_errHandler.sync(this);
|
|
305
|
+
_la = _input.LA(1);
|
|
306
|
+
while (_la==T__2) {
|
|
307
|
+
{
|
|
308
|
+
{
|
|
309
|
+
setState(48);
|
|
310
|
+
match(T__2);
|
|
311
|
+
setState(49);
|
|
312
|
+
match(CAPITAL_IDENTIFIER);
|
|
313
|
+
}
|
|
314
|
+
}
|
|
315
|
+
setState(54);
|
|
316
|
+
_errHandler.sync(this);
|
|
317
|
+
_la = _input.LA(1);
|
|
318
|
+
}
|
|
319
|
+
setState(55);
|
|
320
|
+
match(T__3);
|
|
321
|
+
setState(56);
|
|
322
|
+
match(PATH_IDENTIFIER);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
catch (RecognitionException re) {
|
|
326
|
+
_localctx.exception = re;
|
|
327
|
+
_errHandler.reportError(this, re);
|
|
328
|
+
_errHandler.recover(this, re);
|
|
329
|
+
}
|
|
330
|
+
finally {
|
|
331
|
+
exitRule();
|
|
332
|
+
}
|
|
333
|
+
return _localctx;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
@SuppressWarnings("CheckReturnValue")
|
|
337
|
+
public static class LayoutDefinitionContext extends ParserRuleContext {
|
|
338
|
+
public TerminalNode CAPITAL_IDENTIFIER() { return getToken(BlendReactParser.CAPITAL_IDENTIFIER, 0); }
|
|
339
|
+
public TerminalNode PATH_IDENTIFIER() { return getToken(BlendReactParser.PATH_IDENTIFIER, 0); }
|
|
340
|
+
public List<PageDefinitionContext> pageDefinition() {
|
|
341
|
+
return getRuleContexts(PageDefinitionContext.class);
|
|
342
|
+
}
|
|
343
|
+
public PageDefinitionContext pageDefinition(int i) {
|
|
344
|
+
return getRuleContext(PageDefinitionContext.class,i);
|
|
345
|
+
}
|
|
346
|
+
public List<LayoutDefinitionContext> layoutDefinition() {
|
|
347
|
+
return getRuleContexts(LayoutDefinitionContext.class);
|
|
348
|
+
}
|
|
349
|
+
public LayoutDefinitionContext layoutDefinition(int i) {
|
|
350
|
+
return getRuleContext(LayoutDefinitionContext.class,i);
|
|
351
|
+
}
|
|
352
|
+
public LayoutDefinitionContext(ParserRuleContext parent, int invokingState) {
|
|
353
|
+
super(parent, invokingState);
|
|
354
|
+
}
|
|
355
|
+
@Override public int getRuleIndex() { return RULE_layoutDefinition; }
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
public final LayoutDefinitionContext layoutDefinition() throws RecognitionException {
|
|
359
|
+
LayoutDefinitionContext _localctx = new LayoutDefinitionContext(_ctx, getState());
|
|
360
|
+
enterRule(_localctx, 8, RULE_layoutDefinition);
|
|
361
|
+
int _la;
|
|
362
|
+
try {
|
|
363
|
+
enterOuterAlt(_localctx, 1);
|
|
364
|
+
{
|
|
365
|
+
setState(58);
|
|
366
|
+
match(T__5);
|
|
367
|
+
setState(59);
|
|
368
|
+
match(CAPITAL_IDENTIFIER);
|
|
369
|
+
setState(60);
|
|
370
|
+
match(T__6);
|
|
371
|
+
setState(61);
|
|
372
|
+
match(PATH_IDENTIFIER);
|
|
373
|
+
setState(62);
|
|
374
|
+
match(T__7);
|
|
375
|
+
setState(63);
|
|
376
|
+
match(T__8);
|
|
377
|
+
setState(67);
|
|
378
|
+
_errHandler.sync(this);
|
|
379
|
+
_la = _input.LA(1);
|
|
380
|
+
while (_la==T__10) {
|
|
381
|
+
{
|
|
382
|
+
{
|
|
383
|
+
setState(64);
|
|
384
|
+
pageDefinition();
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
setState(69);
|
|
388
|
+
_errHandler.sync(this);
|
|
389
|
+
_la = _input.LA(1);
|
|
390
|
+
}
|
|
391
|
+
setState(73);
|
|
392
|
+
_errHandler.sync(this);
|
|
393
|
+
_la = _input.LA(1);
|
|
394
|
+
while (_la==T__5) {
|
|
395
|
+
{
|
|
396
|
+
{
|
|
397
|
+
setState(70);
|
|
398
|
+
layoutDefinition();
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
setState(75);
|
|
402
|
+
_errHandler.sync(this);
|
|
403
|
+
_la = _input.LA(1);
|
|
404
|
+
}
|
|
405
|
+
setState(76);
|
|
406
|
+
match(T__9);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
catch (RecognitionException re) {
|
|
410
|
+
_localctx.exception = re;
|
|
411
|
+
_errHandler.reportError(this, re);
|
|
412
|
+
_errHandler.recover(this, re);
|
|
413
|
+
}
|
|
414
|
+
finally {
|
|
415
|
+
exitRule();
|
|
416
|
+
}
|
|
417
|
+
return _localctx;
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
@SuppressWarnings("CheckReturnValue")
|
|
421
|
+
public static class PageDefinitionContext extends ParserRuleContext {
|
|
422
|
+
public List<TerminalNode> CAPITAL_IDENTIFIER() { return getTokens(BlendReactParser.CAPITAL_IDENTIFIER); }
|
|
423
|
+
public TerminalNode CAPITAL_IDENTIFIER(int i) {
|
|
424
|
+
return getToken(BlendReactParser.CAPITAL_IDENTIFIER, i);
|
|
425
|
+
}
|
|
426
|
+
public TerminalNode PATH_IDENTIFIER() { return getToken(BlendReactParser.PATH_IDENTIFIER, 0); }
|
|
427
|
+
public PageDefinitionContext(ParserRuleContext parent, int invokingState) {
|
|
428
|
+
super(parent, invokingState);
|
|
429
|
+
}
|
|
430
|
+
@Override public int getRuleIndex() { return RULE_pageDefinition; }
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
public final PageDefinitionContext pageDefinition() throws RecognitionException {
|
|
434
|
+
PageDefinitionContext _localctx = new PageDefinitionContext(_ctx, getState());
|
|
435
|
+
enterRule(_localctx, 10, RULE_pageDefinition);
|
|
436
|
+
try {
|
|
437
|
+
enterOuterAlt(_localctx, 1);
|
|
438
|
+
{
|
|
439
|
+
setState(78);
|
|
440
|
+
match(T__10);
|
|
441
|
+
setState(79);
|
|
442
|
+
match(CAPITAL_IDENTIFIER);
|
|
443
|
+
setState(80);
|
|
444
|
+
match(T__6);
|
|
445
|
+
setState(81);
|
|
446
|
+
match(PATH_IDENTIFIER);
|
|
447
|
+
setState(82);
|
|
448
|
+
match(T__7);
|
|
449
|
+
setState(83);
|
|
450
|
+
match(T__11);
|
|
451
|
+
setState(84);
|
|
452
|
+
match(T__6);
|
|
453
|
+
setState(85);
|
|
454
|
+
match(CAPITAL_IDENTIFIER);
|
|
455
|
+
setState(86);
|
|
456
|
+
match(T__7);
|
|
457
|
+
}
|
|
458
|
+
}
|
|
459
|
+
catch (RecognitionException re) {
|
|
460
|
+
_localctx.exception = re;
|
|
461
|
+
_errHandler.reportError(this, re);
|
|
462
|
+
_errHandler.recover(this, re);
|
|
463
|
+
}
|
|
464
|
+
finally {
|
|
465
|
+
exitRule();
|
|
466
|
+
}
|
|
467
|
+
return _localctx;
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
public static final String _serializedATN =
|
|
471
|
+
"\u0004\u0001\u0010Y\u0002\u0000\u0007\u0000\u0002\u0001\u0007\u0001\u0002"+
|
|
472
|
+
"\u0002\u0007\u0002\u0002\u0003\u0007\u0003\u0002\u0004\u0007\u0004\u0002"+
|
|
473
|
+
"\u0005\u0007\u0005\u0001\u0000\u0001\u0000\u0005\u0000\u000f\b\u0000\n"+
|
|
474
|
+
"\u0000\f\u0000\u0012\t\u0000\u0001\u0000\u0005\u0000\u0015\b\u0000\n\u0000"+
|
|
475
|
+
"\f\u0000\u0018\t\u0000\u0001\u0000\u0005\u0000\u001b\b\u0000\n\u0000\f"+
|
|
476
|
+
"\u0000\u001e\t\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0002\u0001"+
|
|
477
|
+
"\u0002\u0001\u0002\u0001\u0002\u0005\u0002\'\b\u0002\n\u0002\f\u0002*"+
|
|
478
|
+
"\t\u0002\u0001\u0002\u0001\u0002\u0001\u0002\u0001\u0003\u0001\u0003\u0001"+
|
|
479
|
+
"\u0003\u0001\u0003\u0005\u00033\b\u0003\n\u0003\f\u00036\t\u0003\u0001"+
|
|
480
|
+
"\u0003\u0001\u0003\u0001\u0003\u0001\u0004\u0001\u0004\u0001\u0004\u0001"+
|
|
481
|
+
"\u0004\u0001\u0004\u0001\u0004\u0001\u0004\u0005\u0004B\b\u0004\n\u0004"+
|
|
482
|
+
"\f\u0004E\t\u0004\u0001\u0004\u0005\u0004H\b\u0004\n\u0004\f\u0004K\t"+
|
|
483
|
+
"\u0004\u0001\u0004\u0001\u0004\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+
|
|
484
|
+
"\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001\u0005\u0001"+
|
|
485
|
+
"\u0005\u0001\u0005\u0000\u0000\u0006\u0000\u0002\u0004\u0006\b\n\u0000"+
|
|
486
|
+
"\u0000Y\u0000\f\u0001\u0000\u0000\u0000\u0002\u001f\u0001\u0000\u0000"+
|
|
487
|
+
"\u0000\u0004\"\u0001\u0000\u0000\u0000\u0006.\u0001\u0000\u0000\u0000"+
|
|
488
|
+
"\b:\u0001\u0000\u0000\u0000\nN\u0001\u0000\u0000\u0000\f\u0010\u0003\u0002"+
|
|
489
|
+
"\u0001\u0000\r\u000f\u0003\u0006\u0003\u0000\u000e\r\u0001\u0000\u0000"+
|
|
490
|
+
"\u0000\u000f\u0012\u0001\u0000\u0000\u0000\u0010\u000e\u0001\u0000\u0000"+
|
|
491
|
+
"\u0000\u0010\u0011\u0001\u0000\u0000\u0000\u0011\u0016\u0001\u0000\u0000"+
|
|
492
|
+
"\u0000\u0012\u0010\u0001\u0000\u0000\u0000\u0013\u0015\u0003\u0004\u0002"+
|
|
493
|
+
"\u0000\u0014\u0013\u0001\u0000\u0000\u0000\u0015\u0018\u0001\u0000\u0000"+
|
|
494
|
+
"\u0000\u0016\u0014\u0001\u0000\u0000\u0000\u0016\u0017\u0001\u0000\u0000"+
|
|
495
|
+
"\u0000\u0017\u001c\u0001\u0000\u0000\u0000\u0018\u0016\u0001\u0000\u0000"+
|
|
496
|
+
"\u0000\u0019\u001b\u0003\b\u0004\u0000\u001a\u0019\u0001\u0000\u0000\u0000"+
|
|
497
|
+
"\u001b\u001e\u0001\u0000\u0000\u0000\u001c\u001a\u0001\u0000\u0000\u0000"+
|
|
498
|
+
"\u001c\u001d\u0001\u0000\u0000\u0000\u001d\u0001\u0001\u0000\u0000\u0000"+
|
|
499
|
+
"\u001e\u001c\u0001\u0000\u0000\u0000\u001f \u0005\u0001\u0000\u0000 !"+
|
|
500
|
+
"\u0005\u000f\u0000\u0000!\u0003\u0001\u0000\u0000\u0000\"#\u0005\u0002"+
|
|
501
|
+
"\u0000\u0000#(\u0005\u000f\u0000\u0000$%\u0005\u0003\u0000\u0000%\'\u0005"+
|
|
502
|
+
"\u000f\u0000\u0000&$\u0001\u0000\u0000\u0000\'*\u0001\u0000\u0000\u0000"+
|
|
503
|
+
"(&\u0001\u0000\u0000\u0000()\u0001\u0000\u0000\u0000)+\u0001\u0000\u0000"+
|
|
504
|
+
"\u0000*(\u0001\u0000\u0000\u0000+,\u0005\u0004\u0000\u0000,-\u0005\r\u0000"+
|
|
505
|
+
"\u0000-\u0005\u0001\u0000\u0000\u0000./\u0005\u0005\u0000\u0000/4\u0005"+
|
|
506
|
+
"\u000f\u0000\u000001\u0005\u0003\u0000\u000013\u0005\u000f\u0000\u0000"+
|
|
507
|
+
"20\u0001\u0000\u0000\u000036\u0001\u0000\u0000\u000042\u0001\u0000\u0000"+
|
|
508
|
+
"\u000045\u0001\u0000\u0000\u000057\u0001\u0000\u0000\u000064\u0001\u0000"+
|
|
509
|
+
"\u0000\u000078\u0005\u0004\u0000\u000089\u0005\r\u0000\u00009\u0007\u0001"+
|
|
510
|
+
"\u0000\u0000\u0000:;\u0005\u0006\u0000\u0000;<\u0005\u000f\u0000\u0000"+
|
|
511
|
+
"<=\u0005\u0007\u0000\u0000=>\u0005\r\u0000\u0000>?\u0005\b\u0000\u0000"+
|
|
512
|
+
"?C\u0005\t\u0000\u0000@B\u0003\n\u0005\u0000A@\u0001\u0000\u0000\u0000"+
|
|
513
|
+
"BE\u0001\u0000\u0000\u0000CA\u0001\u0000\u0000\u0000CD\u0001\u0000\u0000"+
|
|
514
|
+
"\u0000DI\u0001\u0000\u0000\u0000EC\u0001\u0000\u0000\u0000FH\u0003\b\u0004"+
|
|
515
|
+
"\u0000GF\u0001\u0000\u0000\u0000HK\u0001\u0000\u0000\u0000IG\u0001\u0000"+
|
|
516
|
+
"\u0000\u0000IJ\u0001\u0000\u0000\u0000JL\u0001\u0000\u0000\u0000KI\u0001"+
|
|
517
|
+
"\u0000\u0000\u0000LM\u0005\n\u0000\u0000M\t\u0001\u0000\u0000\u0000NO"+
|
|
518
|
+
"\u0005\u000b\u0000\u0000OP\u0005\u000f\u0000\u0000PQ\u0005\u0007\u0000"+
|
|
519
|
+
"\u0000QR\u0005\r\u0000\u0000RS\u0005\b\u0000\u0000ST\u0005\f\u0000\u0000"+
|
|
520
|
+
"TU\u0005\u0007\u0000\u0000UV\u0005\u000f\u0000\u0000VW\u0005\b\u0000\u0000"+
|
|
521
|
+
"W\u000b\u0001\u0000\u0000\u0000\u0007\u0010\u0016\u001c(4CI";
|
|
522
|
+
public static final ATN _ATN =
|
|
523
|
+
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
|
|
524
|
+
static {
|
|
525
|
+
_decisionToDFA = new DFA[_ATN.getNumberOfDecisions()];
|
|
526
|
+
for (int i = 0; i < _ATN.getNumberOfDecisions(); i++) {
|
|
527
|
+
_decisionToDFA[i] = new DFA(_ATN.getDecisionState(i), i);
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
grammar BlendApi;
|
|
2
|
+
program: moduleDefinition sectionDefinition*;
|
|
3
|
+
sectionDefinition: 'section' CAPITAL_IDENTIFIER '{' apiDefinition* '}';
|
|
4
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
5
|
+
apiDefinition: 'api' IDENTIFIER '(' HTTP_METHOD ')' '{' authenticated? inputDefinition? outputDefinition? '}';
|
|
6
|
+
|
|
7
|
+
authenticated: 'authenticated';
|
|
8
|
+
inputDefinition: 'input(' field (',' field)* ')';
|
|
9
|
+
outputDefinition: 'output(' field (',' field)* ')' | 'output(' directOutputDefenition ')';
|
|
10
|
+
directOutputDefenition: type;
|
|
11
|
+
|
|
12
|
+
field: IDENTIFIER ':' type;
|
|
13
|
+
type: primitiveType
|
|
14
|
+
| primitiveType '[]'
|
|
15
|
+
| primitiveType '?'
|
|
16
|
+
| CAPITAL_IDENTIFIER '->' CAPITAL_IDENTIFIER
|
|
17
|
+
| CAPITAL_IDENTIFIER '->' CAPITAL_IDENTIFIER '?'
|
|
18
|
+
| CAPITAL_IDENTIFIER '->' CAPITAL_IDENTIFIER '[]';
|
|
19
|
+
|
|
20
|
+
primitiveType: 'string' | 'number' | 'boolean' | 'any' | 'object';
|
|
21
|
+
|
|
22
|
+
HTTP_METHOD: 'GET' | 'POST'|'DELETE' | 'PUT';
|
|
23
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
24
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
25
|
+
|
|
26
|
+
WS: [ \t\r\n]+ -> skip;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
grammar BlendBasic;
|
|
2
|
+
sections: section+;
|
|
3
|
+
section: 'section' IDENTIFIER '{' module* '}';
|
|
4
|
+
module: dataModule
|
|
5
|
+
| expressModule
|
|
6
|
+
| rnModule
|
|
7
|
+
| mongoModule
|
|
8
|
+
| reactModule;
|
|
9
|
+
dataModule: 'data-module' IDENTIFIER (',' IDENTIFIER)* ;
|
|
10
|
+
expressModule: 'express-module' IDENTIFIER (',' IDENTIFIER)* ;
|
|
11
|
+
rnModule: 'rn-module' IDENTIFIER (',' IDENTIFIER)* ;
|
|
12
|
+
reactModule: 'react-module' IDENTIFIER (',' IDENTIFIER)* ;
|
|
13
|
+
mongoModule: 'mongo-module' IDENTIFIER (',' IDENTIFIER)* ;
|
|
14
|
+
IDENTIFIER: [a-zA-Z_][a-zA-Z0-9_]*;
|
|
15
|
+
WS: [ \t\r\n]+ -> skip;
|
|
16
|
+
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
grammar BlendData;
|
|
2
|
+
|
|
3
|
+
program: moduleDefinition dataDefinition+ EOF;
|
|
4
|
+
|
|
5
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
6
|
+
|
|
7
|
+
dataDefinition: 'data' CAPITAL_IDENTIFIER '(' field (',' field)* ')';
|
|
8
|
+
|
|
9
|
+
field: IDENTIFIER ':' type;
|
|
10
|
+
|
|
11
|
+
type: baseType
|
|
12
|
+
| baseType '[]'
|
|
13
|
+
| baseType '?'
|
|
14
|
+
| baseType '->' baseType
|
|
15
|
+
| baseType '->' baseType '?'
|
|
16
|
+
| baseType '->' baseType '[]';
|
|
17
|
+
|
|
18
|
+
baseType: primitiveType | CAPITAL_IDENTIFIER;
|
|
19
|
+
|
|
20
|
+
primitiveType: 'string' | 'number' | 'boolean' | 'any';
|
|
21
|
+
|
|
22
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
23
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
24
|
+
WS: [ \t\r\n]+ -> skip;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
grammar BlendMDP;
|
|
2
|
+
|
|
3
|
+
program: moduleDefinition parentDefinition propsDefinition;
|
|
4
|
+
|
|
5
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
6
|
+
parentDefinition: 'parent' CAPITAL_IDENTIFIER;
|
|
7
|
+
propsDefinition: 'props' '{' propsBodyDefinition* '}';
|
|
8
|
+
propsBodyDefinition: IDENTIFIER ':' (CAPITAL_IDENTIFIER | primitiveType);
|
|
9
|
+
primitiveType: 'string' | 'number' | 'boolean' | 'any'|'object';
|
|
10
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
11
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
12
|
+
WS: [ \t\r\n]+ -> skip;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
grammar BlendMongo;
|
|
2
|
+
|
|
3
|
+
program: moduleDefinition collectionDefinition+;
|
|
4
|
+
|
|
5
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
6
|
+
|
|
7
|
+
collectionDefinition: 'collection' CAPITAL_IDENTIFIER '{' property (',' property)* (',' reference (',' reference)*)? '}';
|
|
8
|
+
|
|
9
|
+
property:'property' IDENTIFIER ':' type propertyChars?;
|
|
10
|
+
propertyChars: '(' mongoChars (',' mongoChars)* ')';
|
|
11
|
+
reference: 'reference' IDENTIFIER ':' CAPITAL_IDENTIFIER propertyChars?;
|
|
12
|
+
mongoChars: 'unique' | 'index';
|
|
13
|
+
|
|
14
|
+
type: baseType
|
|
15
|
+
| baseType '[]'
|
|
16
|
+
| baseType '?';
|
|
17
|
+
|
|
18
|
+
baseType: primitiveType;
|
|
19
|
+
|
|
20
|
+
primitiveType: 'String' | 'Number' | 'Boolean' | 'any' | 'Object';
|
|
21
|
+
|
|
22
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
23
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
24
|
+
WS: [ \t\r\n]+ -> skip;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
grammar BlendRN;
|
|
2
|
+
|
|
3
|
+
program: moduleDefinition componentDefenition* screenDefenition* layoutDefinition*;
|
|
4
|
+
|
|
5
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
6
|
+
|
|
7
|
+
screenDefenition: 'screen' CAPITAL_IDENTIFIER (',' CAPITAL_IDENTIFIER)* 'under' PATH_IDENTIFIER ;
|
|
8
|
+
componentDefenition: 'component' CAPITAL_IDENTIFIER (',' CAPITAL_IDENTIFIER)* 'under' PATH_IDENTIFIER ;
|
|
9
|
+
|
|
10
|
+
layoutDefinition: 'layout' CAPITAL_IDENTIFIER '(' PATH_IDENTIFIER ')' 'type' '(' LAYOUT_TYPE ')' '{' pageDefinition* layoutDefinition* '}';
|
|
11
|
+
pageDefinition: 'page' CAPITAL_IDENTIFIER '(' PATH_IDENTIFIER ')' 'view' '(' CAPITAL_IDENTIFIER ')';
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
LAYOUT_TYPE: 'Stack' | 'Drawer';
|
|
15
|
+
PATH_IDENTIFIER: '"' [a-zA-Z0-9_/]+ '"';
|
|
16
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
17
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
18
|
+
WS: [ \t\r\n]+ -> skip;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
grammar BlendReact;
|
|
2
|
+
|
|
3
|
+
program: moduleDefinition componentDefenition* screenDefenition* layoutDefinition*;
|
|
4
|
+
|
|
5
|
+
moduleDefinition: 'module' CAPITAL_IDENTIFIER;
|
|
6
|
+
|
|
7
|
+
screenDefenition: 'screen' CAPITAL_IDENTIFIER (',' CAPITAL_IDENTIFIER)* 'under' PATH_IDENTIFIER ;
|
|
8
|
+
componentDefenition: 'component' CAPITAL_IDENTIFIER (',' CAPITAL_IDENTIFIER)* 'under' PATH_IDENTIFIER ;
|
|
9
|
+
|
|
10
|
+
layoutDefinition: 'layout' CAPITAL_IDENTIFIER '(' PATH_IDENTIFIER ')' '{' pageDefinition* layoutDefinition* '}';
|
|
11
|
+
pageDefinition: 'page' CAPITAL_IDENTIFIER '(' PATH_IDENTIFIER ')' 'view' '(' CAPITAL_IDENTIFIER ')';
|
|
12
|
+
|
|
13
|
+
PATH_IDENTIFIER: '"' [a-zA-Z0-9_/]* '"';
|
|
14
|
+
IDENTIFIER: [a-z_][a-zA-Z0-9_]*;
|
|
15
|
+
CAPITAL_IDENTIFIER: [A-Z][a-zA-Z0-9_]*;
|
|
16
|
+
WS: [ \t\r\n]+ -> skip;
|