Uses of Package
adams.parser
-
Classes in adams.parser used by adams.core.base Class Description GrammarSupplier Interface for classes that use a grammar, like parsers. -
Classes in adams.parser used by adams.data.conversion Class Description GrammarSupplier Interface for classes that use a grammar, like parsers.MathematicalExpressionText Wrapper for a String object to be editable in the GOE.SpreadSheetFormulaText Wrapper for a String object to be editable in the GOE.StringExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.data.spreadsheet.rowscore Class Description MathematicalExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.flow.condition.bool Class Description BooleanExpressionText Wrapper for a String object to be editable in the GOE.GrammarSupplier Interface for classes that use a grammar, like parsers. -
Classes in adams.parser used by adams.flow.control Class Description GrammarSupplier Interface for classes that use a grammar, like parsers. -
Classes in adams.parser used by adams.flow.control.plotprocessor Class Description MathematicalExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.flow.source Class Description GrammarSupplier Interface for classes that use a grammar, like parsers.MathematicalExpressionText Wrapper for a String object to be editable in the GOE.StringExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.flow.transformer Class Description BooleanExpressionText Wrapper for a String object to be editable in the GOE.GrammarSupplier Interface for classes that use a grammar, like parsers.LookUpUpdateText Wrapper for a String object to be editable in the GOE.MathematicalExpressionText Wrapper for a String object to be editable in the GOE.SpreadSheetQueryText Wrapper for a String object to be editable in the GOE.StringExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.chooser Class Description SpreadSheetQueryText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.core Class Description BooleanExpressionText Wrapper for a String object to be editable in the GOE.LookUpUpdateText Wrapper for a String object to be editable in the GOE.MathematicalExpressionText Wrapper for a String object to be editable in the GOE.SpreadSheetFormulaText Wrapper for a String object to be editable in the GOE.SpreadSheetQueryText Wrapper for a String object to be editable in the GOE.StringExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.dialog Class Description SpreadSheetQueryText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.flow.tree Class Description ActorSuggestion.SuggestionData Container class for data required for making suggestions. -
Classes in adams.parser used by adams.gui.flow.tree.quickaction Class Description BooleanExpressionText Wrapper for a String object to be editable in the GOE.MathematicalExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.goe Class Description GrammarSupplier Interface for classes that use a grammar, like parsers. -
Classes in adams.parser used by adams.gui.tools.spreadsheetprocessor.processors Class Description SpreadSheetQueryText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.gui.visualization.sequence Class Description MathematicalExpressionText Wrapper for a String object to be editable in the GOE. -
Classes in adams.parser used by adams.parser Class Description AbstractExpressionEvaluator Abstract ancestor for classes that evaluate expressions.AbstractSymbolEvaluator Abstract ancestor for classes that evaluate expressions with a parser generated by JFlex/CUP.ActorSuggestion.SuggestionData Container class for data required for making suggestions.GrammarSupplier Interface for classes that use a grammar, like parsers.TimeAmount Helper class for date manipulations (adding, substracting), stores the type and amount.TimeAmount.Note enum of notes. -
Classes in adams.parser used by adams.parser.actorsuggestion Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.basedate Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.basedatetime Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.basedatetimemsec Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.basetime Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.basetimemsec Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.externalactorsuggestion Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.lookupupdate Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.mathematicalexpression Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.spreadsheetformula Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.spreadsheetquery Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by adams.parser.templatesuggestion Class Description ParserHelper Helper class for parsers. -
Classes in adams.parser used by weka.classifiers.functions Class Description MathematicalExpression Evaluates mathematical expressions.
The following grammar is used:
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| has ( variable )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| rand () (unseeded double, 0-1)
| rand ( seed ) (seeded double, 0-1)
| randint ( bound ) (unseeded int from 0 to bound-1)
| randint ( seed, bound ) (seeded int from 0 to bound-1)
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] ) (find 'search' in 'expr', return 1-based position)
| contains ( str , find ) (checks whether 'str' string contains 'find' string)
| startswith ( str , find ) (checks whether 'str' string starts with 'find' string)
| endswith ( str , find ) (checks whether 'str' string ends with 'find' string)
| replace ( str , pos , len , newstr )
| replaceall ( str , regexp , replace ) (applies regular expression to 'str' and replaces all matches with 'replace')
| substitute ( str , find , replace [, occurrences] )
| str ( expr )
| str ( expr , numdecimals )
| str ( expr , decimalformat )
| ext ( file_str ) (extracts extension from file)
| replaceext ( file_str, ext_str ) (replaces the extension of the file with the new one)
;
Notes:
- Variables are either all alphanumeric and _, starting with uppercase letter (e.g., "ABc_12"),
any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]") or
enclosed by single quotes (e.g., "'Hello World'").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'.
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g.MathematicalExpressionText Wrapper for a String object to be editable in the GOE.