Skip to content

Commit

Permalink
Add multi-line java-like comments support in SQL (eg. /* comment */ )
Browse files Browse the repository at this point in the history
Resolves: #4651 #2675
  • Loading branch information
luigidellaquila committed Oct 14, 2015
1 parent 5ebaa00 commit 9352e54
Show file tree
Hide file tree
Showing 5 changed files with 1,900 additions and 1,646 deletions.
28 changes: 28 additions & 0 deletions core/src/main/grammar/OrientSQL.jjt
Expand Up @@ -64,6 +64,34 @@ SKIP :
| "\t"
| "\n"
| "\r"
| "\f"
}

/* COMMENTS */

MORE :
{
<"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
|
"/*" : IN_MULTI_LINE_COMMENT
}

<IN_FORMAL_COMMENT>
SPECIAL_TOKEN :
{
<FORMAL_COMMENT: "*/" > : DEFAULT
}

<IN_MULTI_LINE_COMMENT>
SPECIAL_TOKEN :
{
<MULTI_LINE_COMMENT: "*/" > : DEFAULT
}

<IN_FORMAL_COMMENT,IN_MULTI_LINE_COMMENT>
MORE :
{
< ~[] >
}


Expand Down

0 comments on commit 9352e54

Please sign in to comment.