Sfoglia il codice sorgente

增加@表达式,该表达式专门用于条件比较中,用于获取条件中每次循环时当前循环的对象

master
jacky6024 7 anni fa
parent
commit
ab9e4cd6bd
  1. 3
      ureport2-core/dsl/ReportParser.g4
  2. 60
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParser.tokens
  3. 14
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserBaseVisitor.java
  4. 284
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserLexer.java
  5. 60
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserLexer.tokens
  6. 852
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserParser.java
  7. 13
      ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserVisitor.java
  8. 2
      ureport2-core/src/main/java/com/bstek/ureport/expression/model/condition/ConditionType.java
  9. 54
      ureport2-core/src/main/java/com/bstek/ureport/expression/model/condition/CurrentValueExpressionCondition.java
  10. 10
      ureport2-core/src/main/java/com/bstek/ureport/expression/parse/builder/BaseExpressionBuilder.java

3
ureport2-core/dsl/ReportParser.g4

@ -88,6 +88,7 @@ conditions : condition (join condition)* ;
condition : Cell OP expr #cellNameExprCondition
| property OP expr #propertyCondition
| currentValue OP expr #currentValueCondition
| expr OP expr #exprCondition
;
@ -95,6 +96,8 @@ property : Identifier
| property '.' property
;
currentValue : '@' ;
simpleValue : INTEGER|NUMBER|STRING|BOOLEAN|NULL;
join : AND | OR ;

60
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParser.tokens

@ -14,29 +14,30 @@ T__12=13
T__13=14
T__14=15
T__15=16
Cell=17
Operator=18
OP=19
ORDER=20
BOOLEAN=21
COLON=22
COMMA=23
NULL=24
LeftParen=25
RightParen=26
STRING=27
AND=28
OR=29
INTEGER=30
NUMBER=31
EXCLAMATION=32
EXP=33
Identifier=34
LETTER=35
Char=36
DIGIT=37
WS=38
NL=39
T__16=17
Cell=18
Operator=19
OP=20
ORDER=21
BOOLEAN=22
COLON=23
COMMA=24
NULL=25
LeftParen=26
RightParen=27
STRING=28
AND=29
OR=30
INTEGER=31
NUMBER=32
EXCLAMATION=33
EXP=34
Identifier=35
LETTER=36
Char=37
DIGIT=38
WS=39
NL=40
'?'=1
'case'=2
'{'=3
@ -53,9 +54,10 @@ NL=39
'['=14
']'=15
'to'=16
':'=22
','=23
'null'=24
'('=25
')'=26
'!'=32
'@'=17
':'=23
','=24
'null'=25
'('=26
')'=27
'!'=33

14
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserBaseVisitor.java

@ -298,6 +298,13 @@ public class ReportParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impl
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitPropertyCondition(ReportParserParser.PropertyConditionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCurrentValueCondition(ReportParserParser.CurrentValueConditionContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
@ -312,6 +319,13 @@ public class ReportParserBaseVisitor<T> extends AbstractParseTreeVisitor<T> impl
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitProperty(ReportParserParser.PropertyContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*
* <p>The default implementation returns the result of calling
* {@link #visitChildren} on {@code ctx}.</p>
*/
@Override public T visitCurrentValue(ReportParserParser.CurrentValueContext ctx) { return visitChildren(ctx); }
/**
* {@inheritDoc}
*

284
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserLexer.java

@ -18,36 +18,37 @@ public class ReportParserLexer extends Lexer {
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, Cell=17,
Operator=18, OP=19, ORDER=20, BOOLEAN=21, COLON=22, COMMA=23, NULL=24,
LeftParen=25, RightParen=26, STRING=27, AND=28, OR=29, INTEGER=30, NUMBER=31,
EXCLAMATION=32, EXP=33, Identifier=34, LETTER=35, Char=36, DIGIT=37, WS=38,
NL=39;
T__9=10, T__10=11, T__11=12, T__12=13, T__13=14, T__14=15, T__15=16, T__16=17,
Cell=18, Operator=19, OP=20, ORDER=21, BOOLEAN=22, COLON=23, COMMA=24,
NULL=25, LeftParen=26, RightParen=27, STRING=28, AND=29, OR=30, INTEGER=31,
NUMBER=32, EXCLAMATION=33, EXP=34, Identifier=35, LETTER=36, Char=37,
DIGIT=38, WS=39, NL=40;
public static String[] modeNames = {
"DEFAULT_MODE"
};
public static final String[] ruleNames = {
"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", "Cell",
"Operator", "OP", "ORDER", "BOOLEAN", "COLON", "COMMA", "NULL", "LeftParen",
"RightParen", "STRING", "AND", "OR", "INTEGER", "NUMBER", "EXCLAMATION",
"EXP", "Identifier", "LETTER", "Char", "DIGIT", "STRING_CONTENT", "EscapeSequence",
"OctalEscape", "UnicodeEscape", "HEX", "StartChar", "WS", "NL"
"T__9", "T__10", "T__11", "T__12", "T__13", "T__14", "T__15", "T__16",
"Cell", "Operator", "OP", "ORDER", "BOOLEAN", "COLON", "COMMA", "NULL",
"LeftParen", "RightParen", "STRING", "AND", "OR", "INTEGER", "NUMBER",
"EXCLAMATION", "EXP", "Identifier", "LETTER", "Char", "DIGIT", "STRING_CONTENT",
"EscapeSequence", "OctalEscape", "UnicodeEscape", "HEX", "StartChar",
"WS", "NL"
};
private static final String[] _LITERAL_NAMES = {
null, "'?'", "'case'", "'{'", "'}'", "'return'", "'if'", "';'", "'else'",
"'&'", "'$'", "'#'", "'.'", "'cell'", "'['", "']'", "'to'", null, null,
null, null, null, "':'", "','", "'null'", "'('", "')'", null, null, null,
null, null, "'!'"
"'&'", "'$'", "'#'", "'.'", "'cell'", "'['", "']'", "'to'", "'@'", null,
null, null, null, null, "':'", "','", "'null'", "'('", "')'", null, null,
null, null, null, "'!'"
};
private static final String[] _SYMBOLIC_NAMES = {
null, null, null, null, null, null, null, null, null, null, null, null,
null, null, null, null, null, "Cell", "Operator", "OP", "ORDER", "BOOLEAN",
"COLON", "COMMA", "NULL", "LeftParen", "RightParen", "STRING", "AND",
"OR", "INTEGER", "NUMBER", "EXCLAMATION", "EXP", "Identifier", "LETTER",
"Char", "DIGIT", "WS", "NL"
null, null, null, null, null, null, "Cell", "Operator", "OP", "ORDER",
"BOOLEAN", "COLON", "COMMA", "NULL", "LeftParen", "RightParen", "STRING",
"AND", "OR", "INTEGER", "NUMBER", "EXCLAMATION", "EXP", "Identifier",
"LETTER", "Char", "DIGIT", "WS", "NL"
};
public static final Vocabulary VOCABULARY = new VocabularyImpl(_LITERAL_NAMES, _SYMBOLIC_NAMES);
@ -104,135 +105,136 @@ public class ReportParserLexer extends Lexer {
public ATN getATN() { return _ATN; }
public static final String _serializedATN =
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2)\u0169\b\1\4\2\t"+
"\3\u0430\ud6d1\u8206\uad2d\u4417\uaef1\u8d80\uaadd\2*\u016d\b\1\4\2\t"+
"\2\4\3\t\3\4\4\t\4\4\5\t\5\4\6\t\6\4\7\t\7\4\b\t\b\4\t\t\t\4\n\t\n\4\13"+
"\t\13\4\f\t\f\4\r\t\r\4\16\t\16\4\17\t\17\4\20\t\20\4\21\t\21\4\22\t\22"+
"\4\23\t\23\4\24\t\24\4\25\t\25\4\26\t\26\4\27\t\27\4\30\t\30\4\31\t\31"+
"\4\32\t\32\4\33\t\33\4\34\t\34\4\35\t\35\4\36\t\36\4\37\t\37\4 \t \4!"+
"\t!\4\"\t\"\4#\t#\4$\t$\4%\t%\4&\t&\4\'\t\'\4(\t(\4)\t)\4*\t*\4+\t+\4"+
",\t,\4-\t-\4.\t.\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\5\3\5\3\6\3\6\3"+
"\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3\n\3\13"+
"\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\20\3\20\3\21"+
"\3\21\3\21\3\22\3\22\6\22\u0090\n\22\r\22\16\22\u0091\3\23\3\23\3\24\3"+
"\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3"+
"\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\3\24\5\24\u00b2"+
"\n\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\5\25\u00bb\n\25\3\26\3\26\3\26"+
"\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u00c6\n\26\3\27\3\27\3\30\3\30\3\31"+
"\3\31\3\31\3\31\3\31\3\32\3\32\3\33\3\33\3\34\3\34\3\34\3\34\3\34\3\34"+
"\3\34\3\34\5\34\u00dd\n\34\3\35\3\35\3\35\3\35\3\35\5\35\u00e4\n\35\3"+
"\36\3\36\3\36\3\36\5\36\u00ea\n\36\3\37\5\37\u00ed\n\37\3\37\6\37\u00f0"+
"\n\37\r\37\16\37\u00f1\3 \5 \u00f5\n \3 \6 \u00f8\n \r \16 \u00f9\3 \3"+
" \6 \u00fe\n \r \16 \u00ff\3 \5 \u0103\n \3 \5 \u0106\n \3 \6 \u0109\n"+
" \r \16 \u010a\3 \3 \3 \5 \u0110\n \3 \6 \u0113\n \r \16 \u0114\5 \u0117"+
"\n \3!\3!\3\"\3\"\5\"\u011d\n\"\3\"\6\"\u0120\n\"\r\"\16\"\u0121\3#\3"+
"#\7#\u0126\n#\f#\16#\u0129\13#\3$\6$\u012c\n$\r$\16$\u012d\3%\3%\3%\3"+
"%\5%\u0134\n%\3&\3&\3\'\3\'\7\'\u013a\n\'\f\'\16\'\u013d\13\'\3(\3(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\u0084\7n\2\2\u0084\u0085\7n\2\2\u0085\34\3\2\2\2\u0086"+
"\u0087\7]\2\2\u0087\36\3\2\2\2\u0088\u0089\7_\2\2\u0089 \3\2\2\2\u008a"+
"\u008b\7v\2\2\u008b\u008c\7q\2\2\u008c\"\3\2\2\2\u008d\u008f\5G$\2\u008e"+
"\u0090\5K&\2\u008f\u008e\3\2\2\2\u0090\u0091\3\2\2\2\u0091\u008f\3\2\2"+
"\2\u0091\u0092\3\2\2\2\u0092$\3\2\2\2\u0093\u0094\t\2\2\2\u0094&\3\2\2"+
"\2\u0095\u00b2\t\3\2\2\u0096\u0097\7?\2\2\u0097\u00b2\7?\2\2\u0098\u0099"+
"\7#\2\2\u0099\u00b2\7?\2\2\u009a\u009b\7@\2\2\u009b\u00b2\7?\2\2\u009c"+
"\u009d\7>\2\2\u009d\u00b2\7?\2\2\u009e\u009f\7k\2\2\u009f\u00b2\7p\2\2"+
"\u00a0\u00a1\7p\2\2\u00a1\u00a2\7q\2\2\u00a2\u00a3\7v\2\2\u00a3\u00a4"+
"\7\"\2\2\u00a4\u00a5\7k\2\2\u00a5\u00b2\7p\2\2\u00a6\u00a7\7p\2\2\u00a7"+
"\u00a8\7q\2\2\u00a8\u00a9\7v\2\2\u00a9\u00aa\7\"\2\2\u00aa\u00ab\7\"\2"+
"\2\u00ab\u00ac\7k\2\2\u00ac\u00b2\7p\2\2\u00ad\u00ae\7n\2\2\u00ae\u00af"+
"\7k\2\2\u00af\u00b0\7m\2\2\u00b0\u00b2\7g\2\2\u00b1\u0095\3\2\2\2\u00b1"+
"\u0096\3\2\2\2\u00b1\u0098\3\2\2\2\u00b1\u009a\3\2\2\2\u00b1\u009c\3\2"+
"\2\2\u00b1\u009e\3\2\2\2\u00b1\u00a0\3\2\2\2\u00b1\u00a6\3\2\2\2\u00b1"+
"\u00ad\3\2\2\2\u00b2(\3\2\2\2\u00b3\u00b4\7f\2\2\u00b4\u00b5\7g\2\2\u00b5"+
"\u00b6\7u\2\2\u00b6\u00bb\7e\2\2\u00b7\u00b8\7c\2\2\u00b8\u00b9\7u\2\2"+
"\u00b9\u00bb\7e\2\2\u00ba\u00b3\3\2\2\2\u00ba\u00b7\3\2\2\2\u00bb*\3\2"+
"\2\2\u00bc\u00bd\7v\2\2\u00bd\u00be\7t\2\2\u00be\u00bf\7w\2\2\u00bf\u00c6"+
"\7g\2\2\u00c0\u00c1\7h\2\2\u00c1\u00c2\7c\2\2\u00c2\u00c3\7n\2\2\u00c3"+
"\u00c4\7u\2\2\u00c4\u00c6\7g\2\2\u00c5\u00bc\3\2\2\2\u00c5\u00c0\3\2\2"+
"\2\u00c6,\3\2\2\2\u00c7\u00c8\7<\2\2\u00c8.\3\2\2\2\u00c9\u00ca\7.\2\2"+
"\u00ca\60\3\2\2\2\u00cb\u00cc\7p\2\2\u00cc\u00cd\7w\2\2\u00cd\u00ce\7"+
"n\2\2\u00ce\u00cf\7n\2\2\u00cf\62\3\2\2\2\u00d0\u00d1\7*\2\2\u00d1\64"+
"\3\2\2\2\u00d2\u00d3\7+\2\2\u00d3\66\3\2\2\2\u00d4\u00d5\7$\2\2\u00d5"+
"\u00d6\5M\'\2\u00d6\u00d7\7$\2\2\u00d7\u00dd\3\2\2\2\u00d8\u00d9\7)\2"+
"\2\u00d9\u00da\5M\'\2\u00da\u00db\7)\2\2\u00db\u00dd\3\2\2\2\u00dc\u00d4"+
"\3\2\2\2\u00dc\u00d8\3\2\2\2\u00dd8\3\2\2\2\u00de\u00df\7c\2\2\u00df\u00e0"+
"\7p\2\2\u00e0\u00e4\7f\2\2\u00e1\u00e2\7(\2\2\u00e2\u00e4\7(\2\2\u00e3"+
"\u00de\3\2\2\2\u00e3\u00e1\3\2\2\2\u00e4:\3\2\2\2\u00e5\u00e6\7q\2\2\u00e6"+
"\u00ea\7t\2\2\u00e7\u00e8\7~\2\2\u00e8\u00ea\7~\2\2\u00e9\u00e5\3\2\2"+
"\2\u00e9\u00e7\3\2\2\2\u00ea<\3\2\2\2\u00eb\u00ed\7/\2\2\u00ec\u00eb\3"+
"\2\2\2\u00ec\u00ed\3\2\2\2\u00ed\u00ef\3\2\2\2\u00ee\u00f0\5K&\2\u00ef"+
"\u00ee\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00ef\3\2\2\2\u00f1\u00f2\3\2"+
"\2\2\u00f2>\3\2\2\2\u00f3\u00f5\7/\2\2\u00f4\u00f3\3\2\2\2\u00f4\u00f5"+
"\3\2\2\2\u00f5\u00f7\3\2\2\2\u00f6\u00f8\5K&\2\u00f7\u00f6\3\2\2\2\u00f8"+
"\u00f9\3\2\2\2\u00f9\u00f7\3\2\2\2\u00f9\u00fa\3\2\2\2\u00fa\u00fb\3\2"+
"\2\2\u00fb\u00fd\7\60\2\2\u00fc\u00fe\5K&\2\u00fd\u00fc\3\2\2\2\u00fe"+
"\u00ff\3\2\2\2\u00ff\u00fd\3\2\2\2\u00ff\u0100\3\2\2\2\u0100\u0102\3\2"+
"\2\2\u0101\u0103\5C\"\2\u0102\u0101\3\2\2\2\u0102\u0103\3\2\2\2\u0103"+
"\u0117\3\2\2\2\u0104\u0106\7/\2\2\u0105\u0104\3\2\2\2\u0105\u0106\3\2"+
"\2\2\u0106\u0108\3\2\2\2\u0107\u0109\5K&\2\u0108\u0107\3\2\2\2\u0109\u010a"+
"\3\2\2\2\u010a\u0108\3\2\2\2\u010a\u010b\3\2\2\2\u010b\u010c\3\2\2\2\u010c"+
"\u010d\5C\"\2\u010d\u0117\3\2\2\2\u010e\u0110\7/\2\2\u010f\u010e\3\2\2"+
"\2\u010f\u0110\3\2\2\2\u0110\u0112\3\2\2\2\u0111\u0113\5K&\2\u0112\u0111"+
"\3\2\2\2\u0113\u0114\3\2\2\2\u0114\u0112\3\2\2\2\u0114\u0115\3\2\2\2\u0115"+
"\u0117\3\2\2\2\u0116\u00f4\3\2\2\2\u0116\u0105\3\2\2\2\u0116\u010f\3\2"+
"\2\2\u0117@\3\2\2\2\u0118\u0119\7#\2\2\u0119B\3\2\2\2\u011a\u011c\t\4"+
"\2\2\u011b\u011d\t\5\2\2\u011c\u011b\3\2\2\2\u011c\u011d\3\2\2\2\u011d"+
"\u011f\3\2\2\2\u011e\u0120\5K&\2\u011f\u011e\3\2\2\2\u0120\u0121\3\2\2"+
"\2\u0121\u011f\3\2\2\2\u0121\u0122\3\2\2\2\u0122D\3\2\2\2\u0123\u0127"+
"\5W,\2\u0124\u0126\5I%\2\u0125\u0124\3\2\2\2\u0126\u0129\3\2\2\2\u0127"+
"\u0125\3\2\2\2\u0127\u0128\3\2\2\2\u0128F\3\2\2\2\u0129\u0127\3\2\2\2"+
"\u012a\u012c\t\6\2\2\u012b\u012a\3\2\2\2\u012c\u012d\3\2\2\2\u012d\u012b"+
"\3\2\2\2\u012d\u012e\3\2\2\2\u012eH\3\2\2\2\u012f\u0134\5W,\2\u0130\u0134"+
"\t\7\2\2\u0131\u0134\5K&\2\u0132\u0134\t\b\2\2\u0133\u012f\3\2\2\2\u0133"+
"\u0130\3\2\2\2\u0133\u0131\3\2\2\2\u0133\u0132\3\2\2\2\u0134J\3\2\2\2"+
"\u0135\u0136\t\t\2\2\u0136L\3\2\2\2\u0137\u013a\5O(\2\u0138\u013a\n\n"+
"\2\2\u0139\u0137\3\2\2\2\u0139\u0138\3\2\2\2\u013a\u013d\3\2\2\2\u013b"+
"\u0139\3\2\2\2\u013b\u013c\3\2\2\2\u013cN\3\2\2\2\u013d\u013b\3\2\2\2"+
"\u013e\u013f\7^\2\2\u013f\u0143\t\13\2\2\u0140\u0143\5S*\2\u0141\u0143"+
"\5Q)\2\u0142\u013e\3\2\2\2\u0142\u0140\3\2\2\2\u0142\u0141\3\2\2\2\u0143"+
"P\3\2\2\2\u0144\u0145\7^\2\2\u0145\u0146\4\62\65\2\u0146\u0147\4\629\2"+
"\u0147\u014e\4\629\2\u0148\u0149\7^\2\2\u0149\u014a\4\629\2\u014a\u014e"+
"\4\629\2\u014b\u014c\7^\2\2\u014c\u014e\4\629\2\u014d\u0144\3\2\2\2\u014d"+
"\u0148\3\2\2\2\u014d\u014b\3\2\2\2\u014eR\3\2\2\2\u014f\u0150\7^\2\2\u0150"+
"\u0151\7w\2\2\u0151\u0152\5U+\2\u0152\u0153\5U+\2\u0153\u0154\5U+\2\u0154"+
"\u0155\5U+\2\u0155T\3\2\2\2\u0156\u0157\t\f\2\2\u0157V\3\2\2\2\u0158\u015a"+
"\t\r\2\2\u0159\u0158\3\2\2\2\u015aX\3\2\2\2\u015b\u015d\t\16\2\2\u015c"+
"\u015b\3\2\2\2\u015d\u015e\3\2\2\2\u015e\u015c\3\2\2\2\u015e\u015f\3\2"+
"\2\2\u015f\u0160\3\2\2\2\u0160\u0161\b-\2\2\u0161Z\3\2\2\2\u0162\u0164"+
"\7\17\2\2\u0163\u0162\3\2\2\2\u0163\u0164\3\2\2\2\u0164\u0165\3\2\2\2"+
"\u0165\u0166\7\f\2\2\u0166\u0167\3\2\2\2\u0167\u0168\b.\2\2\u0168\\\3"+
"\2\2\2!\2\u0091\u00b1\u00ba\u00c5\u00dc\u00e3\u00e9\u00ec\u00f1\u00f4"+
"\u00f9\u00ff\u0102\u0105\u010a\u010f\u0114\u0116\u011c\u0121\u0127\u012d"+
"\u0133\u0139\u013b\u0142\u014d\u0159\u015e\u0163\3\2\3\2";
",\t,\4-\t-\4.\t.\4/\t/\3\2\3\2\3\3\3\3\3\3\3\3\3\3\3\4\3\4\3\5\3\5\3\6"+
"\3\6\3\6\3\6\3\6\3\6\3\6\3\7\3\7\3\7\3\b\3\b\3\t\3\t\3\t\3\t\3\t\3\n\3"+
"\n\3\13\3\13\3\f\3\f\3\r\3\r\3\16\3\16\3\16\3\16\3\16\3\17\3\17\3\20\3"+
"\20\3\21\3\21\3\21\3\22\3\22\3\23\3\23\6\23\u0094\n\23\r\23\16\23\u0095"+
"\3\24\3\24\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+
"\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25\3\25"+
"\3\25\3\25\5\25\u00b6\n\25\3\26\3\26\3\26\3\26\3\26\3\26\3\26\5\26\u00bf"+
"\n\26\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\3\27\5\27\u00ca\n\27\3\30"+
"\3\30\3\31\3\31\3\32\3\32\3\32\3\32\3\32\3\33\3\33\3\34\3\34\3\35\3\35"+
"\3\35\3\35\3\35\3\35\3\35\3\35\5\35\u00e1\n\35\3\36\3\36\3\36\3\36\3\36"+
"\5\36\u00e8\n\36\3\37\3\37\3\37\3\37\5\37\u00ee\n\37\3 \5 \u00f1\n \3"+
" \6 \u00f4\n \r \16 \u00f5\3!\5!\u00f9\n!\3!\6!\u00fc\n!\r!\16!\u00fd"+
"\3!\3!\6!\u0102\n!\r!\16!\u0103\3!\5!\u0107\n!\3!\5!\u010a\n!\3!\6!\u010d"+
"\n!\r!\16!\u010e\3!\3!\3!\5!\u0114\n!\3!\6!\u0117\n!\r!\16!\u0118\5!\u011b"+
"\n!\3\"\3\"\3#\3#\5#\u0121\n#\3#\6#\u0124\n#\r#\16#\u0125\3$\3$\7$\u012a"+
"\n$\f$\16$\u012d\13$\3%\6%\u0130\n%\r%\16%\u0131\3&\3&\3&\3&\5&\u0138"+
"\n&\3\'\3\'\3(\3(\7(\u013e\n(\f(\16(\u0141\13(\3)\3)\3)\3)\5)\u0147\n"+
")\3*\3*\3*\3*\3*\3*\3*\3*\3*\5*\u0152\n*\3+\3+\3+\3+\3+\3+\3+\3,\3,\3"+
"-\5-\u015e\n-\3.\6.\u0161\n.\r.\16.\u0162\3.\3.\3/\5/\u0168\n/\3/\3/\3"+
"/\3/\2\2\60\3\3\5\4\7\5\t\6\13\7\r\b\17\t\21\n\23\13\25\f\27\r\31\16\33"+
"\17\35\20\37\21!\22#\23%\24\'\25)\26+\27-\30/\31\61\32\63\33\65\34\67"+
"\359\36;\37= ?!A\"C#E$G%I&K\'M(O\2Q\2S\2U\2W\2Y\2[)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\63"+
"\u00cf\3\2\2\2\65\u00d4\3\2\2\2\67\u00d6\3\2\2\29\u00e0\3\2\2\2;\u00e7"+
"\3\2\2\2=\u00ed\3\2\2\2?\u00f0\3\2\2\2A\u011a\3\2\2\2C\u011c\3\2\2\2E"+
"\u011e\3\2\2\2G\u0127\3\2\2\2I\u012f\3\2\2\2K\u0137\3\2\2\2M\u0139\3\2"+
"\2\2O\u013f\3\2\2\2Q\u0146\3\2\2\2S\u0151\3\2\2\2U\u0153\3\2\2\2W\u015a"+
"\3\2\2\2Y\u015d\3\2\2\2[\u0160\3\2\2\2]\u0167\3\2\2\2_`\7A\2\2`\4\3\2"+
"\2\2ab\7e\2\2bc\7c\2\2cd\7u\2\2de\7g\2\2e\6\3\2\2\2fg\7}\2\2g\b\3\2\2"+
"\2hi\7\177\2\2i\n\3\2\2\2jk\7t\2\2kl\7g\2\2lm\7v\2\2mn\7w\2\2no\7t\2\2"+
"op\7p\2\2p\f\3\2\2\2qr\7k\2\2rs\7h\2\2s\16\3\2\2\2tu\7=\2\2u\20\3\2\2"+
"\2vw\7g\2\2wx\7n\2\2xy\7u\2\2yz\7g\2\2z\22\3\2\2\2{|\7(\2\2|\24\3\2\2"+
"\2}~\7&\2\2~\26\3\2\2\2\177\u0080\7%\2\2\u0080\30\3\2\2\2\u0081\u0082"+
"\7\60\2\2\u0082\32\3\2\2\2\u0083\u0084\7e\2\2\u0084\u0085\7g\2\2\u0085"+
"\u0086\7n\2\2\u0086\u0087\7n\2\2\u0087\34\3\2\2\2\u0088\u0089\7]\2\2\u0089"+
"\36\3\2\2\2\u008a\u008b\7_\2\2\u008b \3\2\2\2\u008c\u008d\7v\2\2\u008d"+
"\u008e\7q\2\2\u008e\"\3\2\2\2\u008f\u0090\7B\2\2\u0090$\3\2\2\2\u0091"+
"\u0093\5I%\2\u0092\u0094\5M\'\2\u0093\u0092\3\2\2\2\u0094\u0095\3\2\2"+
"\2\u0095\u0093\3\2\2\2\u0095\u0096\3\2\2\2\u0096&\3\2\2\2\u0097\u0098"+
"\t\2\2\2\u0098(\3\2\2\2\u0099\u00b6\t\3\2\2\u009a\u009b\7?\2\2\u009b\u00b6"+
"\7?\2\2\u009c\u009d\7#\2\2\u009d\u00b6\7?\2\2\u009e\u009f\7@\2\2\u009f"+
"\u00b6\7?\2\2\u00a0\u00a1\7>\2\2\u00a1\u00b6\7?\2\2\u00a2\u00a3\7k\2\2"+
"\u00a3\u00b6\7p\2\2\u00a4\u00a5\7p\2\2\u00a5\u00a6\7q\2\2\u00a6\u00a7"+
"\7v\2\2\u00a7\u00a8\7\"\2\2\u00a8\u00a9\7k\2\2\u00a9\u00b6\7p\2\2\u00aa"+
"\u00ab\7p\2\2\u00ab\u00ac\7q\2\2\u00ac\u00ad\7v\2\2\u00ad\u00ae\7\"\2"+
"\2\u00ae\u00af\7\"\2\2\u00af\u00b0\7k\2\2\u00b0\u00b6\7p\2\2\u00b1\u00b2"+
"\7n\2\2\u00b2\u00b3\7k\2\2\u00b3\u00b4\7m\2\2\u00b4\u00b6\7g\2\2\u00b5"+
"\u0099\3\2\2\2\u00b5\u009a\3\2\2\2\u00b5\u009c\3\2\2\2\u00b5\u009e\3\2"+
"\2\2\u00b5\u00a0\3\2\2\2\u00b5\u00a2\3\2\2\2\u00b5\u00a4\3\2\2\2\u00b5"+
"\u00aa\3\2\2\2\u00b5\u00b1\3\2\2\2\u00b6*\3\2\2\2\u00b7\u00b8\7f\2\2\u00b8"+
"\u00b9\7g\2\2\u00b9\u00ba\7u\2\2\u00ba\u00bf\7e\2\2\u00bb\u00bc\7c\2\2"+
"\u00bc\u00bd\7u\2\2\u00bd\u00bf\7e\2\2\u00be\u00b7\3\2\2\2\u00be\u00bb"+
"\3\2\2\2\u00bf,\3\2\2\2\u00c0\u00c1\7v\2\2\u00c1\u00c2\7t\2\2\u00c2\u00c3"+
"\7w\2\2\u00c3\u00ca\7g\2\2\u00c4\u00c5\7h\2\2\u00c5\u00c6\7c\2\2\u00c6"+
"\u00c7\7n\2\2\u00c7\u00c8\7u\2\2\u00c8\u00ca\7g\2\2\u00c9\u00c0\3\2\2"+
"\2\u00c9\u00c4\3\2\2\2\u00ca.\3\2\2\2\u00cb\u00cc\7<\2\2\u00cc\60\3\2"+
"\2\2\u00cd\u00ce\7.\2\2\u00ce\62\3\2\2\2\u00cf\u00d0\7p\2\2\u00d0\u00d1"+
"\7w\2\2\u00d1\u00d2\7n\2\2\u00d2\u00d3\7n\2\2\u00d3\64\3\2\2\2\u00d4\u00d5"+
"\7*\2\2\u00d5\66\3\2\2\2\u00d6\u00d7\7+\2\2\u00d78\3\2\2\2\u00d8\u00d9"+
"\7$\2\2\u00d9\u00da\5O(\2\u00da\u00db\7$\2\2\u00db\u00e1\3\2\2\2\u00dc"+
"\u00dd\7)\2\2\u00dd\u00de\5O(\2\u00de\u00df\7)\2\2\u00df\u00e1\3\2\2\2"+
"\u00e0\u00d8\3\2\2\2\u00e0\u00dc\3\2\2\2\u00e1:\3\2\2\2\u00e2\u00e3\7"+
"c\2\2\u00e3\u00e4\7p\2\2\u00e4\u00e8\7f\2\2\u00e5\u00e6\7(\2\2\u00e6\u00e8"+
"\7(\2\2\u00e7\u00e2\3\2\2\2\u00e7\u00e5\3\2\2\2\u00e8<\3\2\2\2\u00e9\u00ea"+
"\7q\2\2\u00ea\u00ee\7t\2\2\u00eb\u00ec\7~\2\2\u00ec\u00ee\7~\2\2\u00ed"+
"\u00e9\3\2\2\2\u00ed\u00eb\3\2\2\2\u00ee>\3\2\2\2\u00ef\u00f1\7/\2\2\u00f0"+
"\u00ef\3\2\2\2\u00f0\u00f1\3\2\2\2\u00f1\u00f3\3\2\2\2\u00f2\u00f4\5M"+
"\'\2\u00f3\u00f2\3\2\2\2\u00f4\u00f5\3\2\2\2\u00f5\u00f3\3\2\2\2\u00f5"+
"\u00f6\3\2\2\2\u00f6@\3\2\2\2\u00f7\u00f9\7/\2\2\u00f8\u00f7\3\2\2\2\u00f8"+
"\u00f9\3\2\2\2\u00f9\u00fb\3\2\2\2\u00fa\u00fc\5M\'\2\u00fb\u00fa\3\2"+
"\2\2\u00fc\u00fd\3\2\2\2\u00fd\u00fb\3\2\2\2\u00fd\u00fe\3\2\2\2\u00fe"+
"\u00ff\3\2\2\2\u00ff\u0101\7\60\2\2\u0100\u0102\5M\'\2\u0101\u0100\3\2"+
"\2\2\u0102\u0103\3\2\2\2\u0103\u0101\3\2\2\2\u0103\u0104\3\2\2\2\u0104"+
"\u0106\3\2\2\2\u0105\u0107\5E#\2\u0106\u0105\3\2\2\2\u0106\u0107\3\2\2"+
"\2\u0107\u011b\3\2\2\2\u0108\u010a\7/\2\2\u0109\u0108\3\2\2\2\u0109\u010a"+
"\3\2\2\2\u010a\u010c\3\2\2\2\u010b\u010d\5M\'\2\u010c\u010b\3\2\2\2\u010d"+
"\u010e\3\2\2\2\u010e\u010c\3\2\2\2\u010e\u010f\3\2\2\2\u010f\u0110\3\2"+
"\2\2\u0110\u0111\5E#\2\u0111\u011b\3\2\2\2\u0112\u0114\7/\2\2\u0113\u0112"+
"\3\2\2\2\u0113\u0114\3\2\2\2\u0114\u0116\3\2\2\2\u0115\u0117\5M\'\2\u0116"+
"\u0115\3\2\2\2\u0117\u0118\3\2\2\2\u0118\u0116\3\2\2\2\u0118\u0119\3\2"+
"\2\2\u0119\u011b\3\2\2\2\u011a\u00f8\3\2\2\2\u011a\u0109\3\2\2\2\u011a"+
"\u0113\3\2\2\2\u011bB\3\2\2\2\u011c\u011d\7#\2\2\u011dD\3\2\2\2\u011e"+
"\u0120\t\4\2\2\u011f\u0121\t\5\2\2\u0120\u011f\3\2\2\2\u0120\u0121\3\2"+
"\2\2\u0121\u0123\3\2\2\2\u0122\u0124\5M\'\2\u0123\u0122\3\2\2\2\u0124"+
"\u0125\3\2\2\2\u0125\u0123\3\2\2\2\u0125\u0126\3\2\2\2\u0126F\3\2\2\2"+
"\u0127\u012b\5Y-\2\u0128\u012a\5K&\2\u0129\u0128\3\2\2\2\u012a\u012d\3"+
"\2\2\2\u012b\u0129\3\2\2\2\u012b\u012c\3\2\2\2\u012cH\3\2\2\2\u012d\u012b"+
"\3\2\2\2\u012e\u0130\t\6\2\2\u012f\u012e\3\2\2\2\u0130\u0131\3\2\2\2\u0131"+
"\u012f\3\2\2\2\u0131\u0132\3\2\2\2\u0132J\3\2\2\2\u0133\u0138\5Y-\2\u0134"+
"\u0138\t\7\2\2\u0135\u0138\5M\'\2\u0136\u0138\t\b\2\2\u0137\u0133\3\2"+
"\2\2\u0137\u0134\3\2\2\2\u0137\u0135\3\2\2\2\u0137\u0136\3\2\2\2\u0138"+
"L\3\2\2\2\u0139\u013a\t\t\2\2\u013aN\3\2\2\2\u013b\u013e\5Q)\2\u013c\u013e"+
"\n\n\2\2\u013d\u013b\3\2\2\2\u013d\u013c\3\2\2\2\u013e\u0141\3\2\2\2\u013f"+
"\u013d\3\2\2\2\u013f\u0140\3\2\2\2\u0140P\3\2\2\2\u0141\u013f\3\2\2\2"+
"\u0142\u0143\7^\2\2\u0143\u0147\t\13\2\2\u0144\u0147\5U+\2\u0145\u0147"+
"\5S*\2\u0146\u0142\3\2\2\2\u0146\u0144\3\2\2\2\u0146\u0145\3\2\2\2\u0147"+
"R\3\2\2\2\u0148\u0149\7^\2\2\u0149\u014a\4\62\65\2\u014a\u014b\4\629\2"+
"\u014b\u0152\4\629\2\u014c\u014d\7^\2\2\u014d\u014e\4\629\2\u014e\u0152"+
"\4\629\2\u014f\u0150\7^\2\2\u0150\u0152\4\629\2\u0151\u0148\3\2\2\2\u0151"+
"\u014c\3\2\2\2\u0151\u014f\3\2\2\2\u0152T\3\2\2\2\u0153\u0154\7^\2\2\u0154"+
"\u0155\7w\2\2\u0155\u0156\5W,\2\u0156\u0157\5W,\2\u0157\u0158\5W,\2\u0158"+
"\u0159\5W,\2\u0159V\3\2\2\2\u015a\u015b\t\f\2\2\u015bX\3\2\2\2\u015c\u015e"+
"\t\r\2\2\u015d\u015c\3\2\2\2\u015eZ\3\2\2\2\u015f\u0161\t\16\2\2\u0160"+
"\u015f\3\2\2\2\u0161\u0162\3\2\2\2\u0162\u0160\3\2\2\2\u0162\u0163\3\2"+
"\2\2\u0163\u0164\3\2\2\2\u0164\u0165\b.\2\2\u0165\\\3\2\2\2\u0166\u0168"+
"\7\17\2\2\u0167\u0166\3\2\2\2\u0167\u0168\3\2\2\2\u0168\u0169\3\2\2\2"+
"\u0169\u016a\7\f\2\2\u016a\u016b\3\2\2\2\u016b\u016c\b/\2\2\u016c^\3\2"+
"\2\2!\2\u0095\u00b5\u00be\u00c9\u00e0\u00e7\u00ed\u00f0\u00f5\u00f8\u00fd"+
"\u0103\u0106\u0109\u010e\u0113\u0118\u011a\u0120\u0125\u012b\u0131\u0137"+
"\u013d\u013f\u0146\u0151\u015d\u0162\u0167\3\2\3\2";
public static final ATN _ATN =
new ATNDeserializer().deserialize(_serializedATN.toCharArray());
static {

60
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserLexer.tokens

@ -14,29 +14,30 @@ T__12=13
T__13=14
T__14=15
T__15=16
Cell=17
Operator=18
OP=19
ORDER=20
BOOLEAN=21
COLON=22
COMMA=23
NULL=24
LeftParen=25
RightParen=26
STRING=27
AND=28
OR=29
INTEGER=30
NUMBER=31
EXCLAMATION=32
EXP=33
Identifier=34
LETTER=35
Char=36
DIGIT=37
WS=38
NL=39
T__16=17
Cell=18
Operator=19
OP=20
ORDER=21
BOOLEAN=22
COLON=23
COMMA=24
NULL=25
LeftParen=26
RightParen=27
STRING=28
AND=29
OR=30
INTEGER=31
NUMBER=32
EXCLAMATION=33
EXP=34
Identifier=35
LETTER=36
Char=37
DIGIT=38
WS=39
NL=40
'?'=1
'case'=2
'{'=3
@ -53,9 +54,10 @@ NL=39
'['=14
']'=15
'to'=16
':'=22
','=23
'null'=24
'('=25
')'=26
'!'=32
'@'=17
':'=23
','=24
'null'=25
'('=26
')'=27
'!'=33

852
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserParser.java

File diff soppresso perché troppo grande

13
ureport2-core/src/main/java/com/bstek/ureport/dsl/ReportParserVisitor.java

@ -275,6 +275,13 @@ public interface ReportParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitPropertyCondition(ReportParserParser.PropertyConditionContext ctx);
/**
* Visit a parse tree produced by the {@code currentValueCondition}
* labeled alternative in {@link ReportParserParser#condition}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCurrentValueCondition(ReportParserParser.CurrentValueConditionContext ctx);
/**
* Visit a parse tree produced by the {@code exprCondition}
* labeled alternative in {@link ReportParserParser#condition}.
@ -288,6 +295,12 @@ public interface ReportParserVisitor<T> extends ParseTreeVisitor<T> {
* @return the visitor result
*/
T visitProperty(ReportParserParser.PropertyContext ctx);
/**
* Visit a parse tree produced by {@link ReportParserParser#currentValue}.
* @param ctx the parse tree
* @return the visitor result
*/
T visitCurrentValue(ReportParserParser.CurrentValueContext ctx);
/**
* Visit a parse tree produced by {@link ReportParserParser#simpleValue}.
* @param ctx the parse tree

2
ureport2-core/src/main/java/com/bstek/ureport/expression/model/condition/ConditionType.java

@ -20,5 +20,5 @@ package com.bstek.ureport.expression.model.condition;
* @since 2017年4月24日
*/
public enum ConditionType {
property,expression,cell;
property,expression,cell,current;
}

54
ureport2-core/src/main/java/com/bstek/ureport/expression/model/condition/CurrentValueExpressionCondition.java

@ -0,0 +1,54 @@
/*******************************************************************************
* Copyright 2017 Bstek
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations under
* the License.
******************************************************************************/
package com.bstek.ureport.expression.model.condition;
import org.codehaus.jackson.annotate.JsonIgnore;
import com.bstek.ureport.build.Context;
import com.bstek.ureport.expression.model.Expression;
import com.bstek.ureport.expression.model.data.ExpressionData;
import com.bstek.ureport.model.Cell;
/**
* @author Jacky.gao
* @since 2017年12月8日
*/
public class CurrentValueExpressionCondition extends BaseCondition {
private ConditionType type=ConditionType.current;
@JsonIgnore
private Expression rightExpression;
@Override
Object computeLeft(Cell cell,Cell currentCell,Object obj,Context context) {
return obj;
}
@Override
Object computeRight(Cell cell,Cell currentCell,Object obj,Context context) {
ExpressionData<?> exprData=rightExpression.execute(cell, currentCell,context);
return extractExpressionData(exprData);
}
@Override
public ConditionType getType() {
return type;
}
public void setRightExpression(Expression rightExpression) {
this.rightExpression = rightExpression;
}
public Expression getRightExpression() {
return rightExpression;
}
}

10
ureport2-core/src/main/java/com/bstek/ureport/expression/parse/builder/BaseExpressionBuilder.java

@ -23,6 +23,7 @@ import com.bstek.ureport.Utils;
import com.bstek.ureport.dsl.ReportParserParser.CellNameExprConditionContext;
import com.bstek.ureport.dsl.ReportParserParser.ConditionContext;
import com.bstek.ureport.dsl.ReportParserParser.ConditionsContext;
import com.bstek.ureport.dsl.ReportParserParser.CurrentValueConditionContext;
import com.bstek.ureport.dsl.ReportParserParser.ExprConditionContext;
import com.bstek.ureport.dsl.ReportParserParser.ExprContext;
import com.bstek.ureport.dsl.ReportParserParser.JoinContext;
@ -35,6 +36,7 @@ import com.bstek.ureport.expression.model.Op;
import com.bstek.ureport.expression.model.condition.BaseCondition;
import com.bstek.ureport.expression.model.condition.BothExpressionCondition;
import com.bstek.ureport.expression.model.condition.CellExpressionCondition;
import com.bstek.ureport.expression.model.condition.CurrentValueExpressionCondition;
import com.bstek.ureport.expression.model.condition.Join;
import com.bstek.ureport.expression.model.condition.PropertyExpressionCondition;
import com.bstek.ureport.expression.model.expr.BaseExpression;
@ -98,6 +100,14 @@ public abstract class BaseExpressionBuilder implements ExpressionBuilder{
condition.setRightExpression(ExpressionUtils.parseExpression(rightExpr));
condition.setOp(parseOp(ctx.OP()));
return condition;
}else if(context instanceof CurrentValueConditionContext){
CurrentValueConditionContext ctx=(CurrentValueConditionContext)context;
CurrentValueExpressionCondition condition=new CurrentValueExpressionCondition();
String rightExpr=ctx.expr().getText();
condition.setRight(rightExpr);
condition.setRightExpression(ExpressionUtils.parseExpression(rightExpr));
condition.setOp(parseOp(ctx.OP()));
return condition;
}else if(context instanceof PropertyConditionContext){
PropertyConditionContext ctx=(PropertyConditionContext)context;
PropertyExpressionCondition condition=new PropertyExpressionCondition();

Caricamento…
Annulla
Salva