blob: 191043699dfd59fa24cc4491aedefb95dcfd6711 [file] [log] [blame]
Till Westmann5b431ca2015-10-01 19:16:11 -07001# Licensed to the Apache Software Foundation (ASF) under one
2# or more contributor license agreements. See the NOTICE file
3# distributed with this work for additional information
4# regarding copyright ownership. The ASF licenses this file
5# to you under the Apache License, Version 2.0 (the
6# "License"); you may not use this file except in compliance
7# with the License. You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing,
12# software distributed under the License is distributed on an
13# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14# KIND, either express or implied. See the License for the
15# specific language governing permissions and limitations
16# under the License.
17
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000018# LEXER GENERATOR configuration file
19# ---------------------------------------
20# Place *first* the generic configuration
21# then list your grammar.
22
Ian Maxonf18bba22015-08-21 12:35:14 -070023PACKAGE: org.apache.asterix.runtime.operators.file.adm
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000024LEXER_NAME: AdmLexer
25
26TOKENS:
27
28BOOLEAN_CONS = string(boolean)
29INT8_CONS = string(int8)
30INT16_CONS = string(int16)
31INT32_CONS = string(int32)
32INT64_CONS = string(int64)
Taewoo Kima12d8cd2015-03-04 13:47:08 -080033INT64_CONS = string(int)
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000034FLOAT_CONS = string(float)
35DOUBLE_CONS = string(double)
36DATE_CONS = string(date)
37DATETIME_CONS = string(datetime)
38DURATION_CONS = string(duration)
39STRING_CONS = string(string)
JavierJia9d3c4a92014-11-20 13:09:58 -080040HEX_CONS = string(hex)
41BASE64_CONS = string(base64)
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000042POINT_CONS = string(point)
43POINT3D_CONS = string(point3d)
44LINE_CONS = string(line)
45POLYGON_CONS = string(polygon)
46RECTANGLE_CONS = string(rectangle)
47CIRCLE_CONS = string(circle)
48TIME_CONS = string(time)
jarodwen4e6c4712013-03-06 00:41:52 +000049INTERVAL_TIME_CONS = string(interval-time)
50INTERVAL_DATE_CONS = string(interval-date)
51INTERVAL_DATETIME_CONS = string(interval-datetime)
JArodccac1342013-05-15 11:00:44 -070052YEAR_MONTH_DURATION_CONS = string(year-month-duration)
Taewoo Kim83259462014-09-09 18:13:41 -070053DAY_TIME_DURATION_CONS = string(day-time-duration)
54UUID_CONS = string(uuid)
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000055
56NULL_LITERAL = string(null)
57TRUE_LITERAL = string(true)
58FALSE_LITERAL = string(false)
59
60CONSTRUCTOR_OPEN = char(()
61CONSTRUCTOR_CLOSE = char())
62START_RECORD = char({)
63END_RECORD = char(})
64COMMA = char(\,)
65COLON = char(:)
66START_ORDERED_LIST = char([)
67END_ORDERED_LIST = char(])
68START_UNORDERED_LIST = string({{)
ogeidixb9d2cf82013-10-12 22:47:01 +010069# END_UNORDERED_LIST = }} is recognized as a double END_RECORD token
diegogiorgini@gmail.com2de6d342013-02-16 02:41:45 +000070
71STRING_LITERAL = char("), anythingUntil(")
72
73INT_LITERAL = signOrNothing(), digitSequence()
74INT8_LITERAL = token(INT_LITERAL), string(i8)
75INT16_LITERAL = token(INT_LITERAL), string(i16)
76INT32_LITERAL = token(INT_LITERAL), string(i32)
77INT64_LITERAL = token(INT_LITERAL), string(i64)
78
79@EXPONENT = caseInsensitiveChar(e), signOrNothing(), digitSequence()
80
81DOUBLE_LITERAL = signOrNothing(), char(.), digitSequence()
82DOUBLE_LITERAL = signOrNothing(), digitSequence(), char(.), digitSequence()
83DOUBLE_LITERAL = signOrNothing(), digitSequence(), char(.), digitSequence(), token(@EXPONENT)
84DOUBLE_LITERAL = signOrNothing(), digitSequence(), token(@EXPONENT)
85
86FLOAT_LITERAL = token(DOUBLE_LITERAL), caseInsensitiveChar(f)