Files
kotlin-fork/grammar/src/lexical.grm
T
Andrey Breslav 8114444f34 %=
2010-12-10 19:38:40 +03:00

82 lines
987 B
Plaintext

SimpleName : /*java identifier*/;
FieldName : "$" SimpleName;
[helper] Digit : ["0".."9"];
IntegerLiteral : Digit+ "L"?
[helper] HexDigit : Digit | ["A"-"F", "a"-"f"];
HexadecimalLiteral : "0x" HexDigit+;
CharacterLiteral : /*character as in Java*/;
StringWithTemplates : /*single-quoted string, $ can be escaped*/;
NoEscapeString : /* """-quoted string */;
/* Symbols:
[](){}<>
,
.
:
<= >= == != === !==
+ - * / %
=
+= -= *= /= %=
++ -- !
&& || -- may be just & and |
=>
..
?
?:
?.
*/
/* Keywords:
namespace
import
as
type
class
this
val
var
fun
decomposer -- may be soft
extension
for
null
typeof
new
true
false
is
isnot
in
throw
return
break
continue
object
if
else
while
do
match
Soft:
wraps -- in a class header
where -- in class, function and type headers
by -- in a class header (Delegation specifier)
lazy -- in a property/parameter declaration
get, set -- in a property definition
abstract
virtual
enum
open
attribute
override
private
public
internal
protected
out
ref
*/