summaryrefslogtreecommitdiffstats
path: root/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
diff options
context:
space:
mode:
Diffstat (limited to 'container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js')
-rwxr-xr-xcontainer-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js79
1 files changed, 79 insertions, 0 deletions
diff --git a/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js b/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
new file mode 100755
index 00000000000..532e5899b39
--- /dev/null
+++ b/container-search-gui/src/main/resources/gui/editarea/edit_area/reg_syntax/yql.js
@@ -0,0 +1,79 @@
+editAreaLoader.load_syntax["yql"] = {
+ 'DISPLAY_NAME' : 'YQL'
+ ,'QUOTEMARKS' : {1: "'", 2: '"', 3: '`'}
+ ,'KEYWORD_CASE_SENSITIVE' : false
+ ,'OPERATOR_CASE_SENSITIVE' : false
+ ,'KEYWORDS' : {
+ 'statements' : [
+ 'SELECT', 'FROM',' SOURCES', 'CONTAINS',
+ 'NOT', 'ORDER',
+ 'BY', 'WHERE'
+ ]
+ ,'reserved' : [
+ 'null'
+
+ ]
+ ,'functions' : [
+ 'DESC', 'ASC', 'ALL', 'GROUP', 'RANGE', 'EACH', 'OUTPUT', 'SUM', 'LIMIT', 'OFFSET', 'TIMEOUT'
+ ]
+ }
+ ,'OPERATORS' :[
+ 'COUNT','AND','and','OR','or','BETWEEN','between','&&','&','|','^','/','<=>','=','>=','>','<<','>>','<=','<','-','%','!=','<>','!','||','+','~','*'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'REGEXPS' : {
+ // highlight all variables (@...)
+ 'variables' : {
+ 'search' : '()(\\@\\w+)()'
+ ,'class' : 'variables'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before' // before or after
+ }
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #879EFA;'
+ ,'KEYWORDS' : {
+ 'reserved' : 'color: #48BDDF;'
+ ,'functions' : 'color: #0040FD;'
+ ,'statements' : 'color: #60CA00;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #d1421b;'
+ ,'REGEXPS' : {
+ 'variables' : 'color: #E0BD54;'
+ }
+ },
+ 'AUTO_COMPLETION' : {
+ "default": { // the name of this definition group. It's posisble to have different rules inside the same definition file
+ "REGEXP": { "before_word": "[^a-zA-Z0-9_]|^" // \\s|\\.|
+ ,"possible_words_letters": "[a-zA-Z0-9_]+"
+ ,"letter_after_word_must_match": "[^a-zA-Z0-9_]|$"
+ ,"prefix_separator": "\\."
+ }
+ ,"CASE_SENSITIVE": false
+ ,"MAX_TEXT_LENGTH": 50 // the maximum length of the text being analyzed before the cursor position
+ ,"KEYWORDS": {
+ '': [ // the prefix of thoses items
+ /**
+ * 0 : the keyword the user is typing
+ * 1 : (optionnal) the string inserted in code ("{@}" being the new position of the cursor, "ยง" beeing the equivalent to the value the typed string indicated if the previous )
+ * If empty the keyword will be displayed
+ * 2 : (optionnal) the text that appear in the suggestion box (if empty, the string to insert will be displayed)
+ */
+ ['SELECT','SELECT'],
+ ['FROM','FROM'],
+ ['SOURCES','SOURCES'],
+ ['CONTAINS','CONTAINS'],
+ ['NOT','NOT'], ['ORDER','ORDER'], ['BY','BY'],['WHERE','WHERE'],
+ ['DESC','DESC'],['ASC','ASC'],['ALL','ALL'], ['GROUP','GROUP'],
+ ['RANGE','RANGE'],['EACH','EACH'],['OUTPUT','OUTPUT'],
+ ['SUM','SUM'],['LIMIT','LIMIT'],['OFFSET','OFFSET'],
+ ['TIMEOUT','TIMEOUT'],
+ ]
+ }
+ }
+ }
+};