-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#83 Visual Prolog: Treat \r\n line ends the same as \n. This makes te…
…sting easier. Add test case.
- Loading branch information
1 parent
7458c29
commit 3d02c15
Showing
6 changed files
with
198 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
% SCE_VISUALPROLOG_KEY_MAJOR (1) | ||
goal | ||
|
||
% SCE_VISUALPROLOG_KEY_MINOR (2) | ||
procedure | ||
|
||
% SCE_VISUALPROLOG_KEY_DIRECTIVE (3) | ||
#include | ||
|
||
% SCE_VISUALPROLOG_COMMENT_BLOCK (4) | ||
/** | ||
SCE_VISUALPROLOG_COMMENT_KEY (6) | ||
@detail | ||
SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7) | ||
@unknown | ||
/* SCE_VISUALPROLOG_IDENTIFIER (8) | ||
SCE_VISUALPROLOG_VARIABLE (9) | ||
SCE_VISUALPROLOG_ANONYMOUS (10) | ||
SCE_VISUALPROLOG_NUMBER (11) | ||
SCE_VISUALPROLOG_OPERATOR (12) */ */ | ||
lambda = { | ||
(A) = { (B, _discard) = A*B+1 } | ||
}. | ||
|
||
% SCE_VISUALPROLOG_COMMENT_LINE (5) | ||
% @detail | ||
% @unknown | ||
|
||
% SCE_VISUALPROLOG_STRING (16) | ||
"string" | ||
'string' | ||
|
||
% SCE_VISUALPROLOG_STRING_ESCAPE (17) | ||
"\n" | ||
'\uAB12' | ||
|
||
% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18) | ||
"\ " | ||
|
||
% SCE_VISUALPROLOG_STRING_EOL_OPEN (19) | ||
"open string | ||
|
||
% SCE_VISUALPROLOG_STRING_VERBATIM (20) | ||
@"verbatim string" | ||
|
||
% SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL (21) | ||
@"""special"" verbatim string" | ||
|
||
% SCE_VISUALPROLOG_STRING_VERBATIM_EOL (22) | ||
@"multi-line | ||
verbatim | ||
string" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
0 400 400 % SCE_VISUALPROLOG_KEY_MAJOR (1) | ||
0 400 400 goal | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_KEY_MINOR (2) | ||
0 400 400 procedure | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_KEY_DIRECTIVE (3) | ||
0 400 400 #include | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_COMMENT_BLOCK (4) | ||
0 400 400 /** | ||
0 400 400 SCE_VISUALPROLOG_COMMENT_KEY (6) | ||
0 400 400 @detail | ||
0 400 400 SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7) | ||
0 400 400 @unknown | ||
0 400 400 /* SCE_VISUALPROLOG_IDENTIFIER (8) | ||
0 400 400 SCE_VISUALPROLOG_VARIABLE (9) | ||
0 400 400 SCE_VISUALPROLOG_ANONYMOUS (10) | ||
0 400 400 SCE_VISUALPROLOG_NUMBER (11) | ||
0 400 400 SCE_VISUALPROLOG_OPERATOR (12) */ */ | ||
2 400 401 + lambda = { | ||
0 401 401 | (A) = { (B, _discard) = A*B+1 } | ||
0 401 400 | }. | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_COMMENT_LINE (5) | ||
0 400 400 % @detail | ||
0 400 400 % @unknown | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING (16) | ||
0 400 400 "string" | ||
0 400 400 'string' | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_ESCAPE (17) | ||
0 400 400 "\n" | ||
0 400 400 '\uAB12' | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18) | ||
0 400 400 "\ " | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_EOL_OPEN (19) | ||
0 400 400 "open string | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_VERBATIM (20) | ||
0 400 400 @"verbatim string" | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL (21) | ||
0 400 400 @"""special"" verbatim string" | ||
0 400 400 | ||
0 400 400 % SCE_VISUALPROLOG_STRING_VERBATIM_EOL (22) | ||
0 400 400 @"multi-line | ||
0 400 400 verbatim | ||
0 400 400 string" | ||
1 400 400 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
{5}% SCE_VISUALPROLOG_KEY_MAJOR (1){0} | ||
{1}goal{0} | ||
|
||
{5}% SCE_VISUALPROLOG_KEY_MINOR (2){0} | ||
{2}procedure{0} | ||
|
||
{5}% SCE_VISUALPROLOG_KEY_DIRECTIVE (3){0} | ||
{3}#include{0} | ||
|
||
{5}% SCE_VISUALPROLOG_COMMENT_BLOCK (4){0} | ||
{4}/** | ||
SCE_VISUALPROLOG_COMMENT_KEY (6) | ||
{6}@detail{4} | ||
SCE_VISUALPROLOG_COMMENT_KEY_ERROR (7) | ||
{7}@unknown{4} | ||
/* SCE_VISUALPROLOG_IDENTIFIER (8) | ||
SCE_VISUALPROLOG_VARIABLE (9) | ||
SCE_VISUALPROLOG_ANONYMOUS (10) | ||
SCE_VISUALPROLOG_NUMBER (11) | ||
SCE_VISUALPROLOG_OPERATOR (12) */ */{0} | ||
{8}lambda{0} {12}={0} {12}{{0} | ||
{12}({9}A{12}){0} {12}={0} {12}{{0} {12}({9}B{12},{0} {10}_discard{12}){0} {12}={0} {9}A{12}*{9}B{12}+{11}1{0} {12}}{0} | ||
{12}}.{0} | ||
|
||
{5}% SCE_VISUALPROLOG_COMMENT_LINE (5){0} | ||
{5}% {6}@detail{0} | ||
{5}% {7}@unknown{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING (16){0} | ||
{16}"string"{0} | ||
{16}'string'{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING_ESCAPE (17){0} | ||
{16}"{17}\n{16}"{0} | ||
{16}'{17}\uAB12{16}'{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING_ESCAPE_ERROR (18){0} | ||
{16}"{18}\ {16}"{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING_EOL_OPEN (19){0} | ||
{16}"open string{19} | ||
{0} | ||
{5}% SCE_VISUALPROLOG_STRING_VERBATIM (20){0} | ||
{20}@"verbatim string"{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING_VERBATIM_SPECIAL (21){0} | ||
{20}@"{21}""{20}special{21}""{20} verbatim string"{0} | ||
|
||
{5}% SCE_VISUALPROLOG_STRING_VERBATIM_EOL (22){0} | ||
{20}@"multi-line{22} | ||
{20} verbatim{22} | ||
{20} string"{0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
lexer.*.pro=visualprolog | ||
fold=1 | ||
|
||
# major keywords | ||
keywords.*.pro=goal namespace interface class implement open inherits supports resolve delegate \ | ||
monitor constants domains predicates constructors properties clauses facts | ||
|
||
# minor keywords | ||
keywords2.*.pro=any binary binaryNonAtomic boolean char compareResult factDB guard handle integer64 \ | ||
integerNative language null pointer real real32 stdcall string8 symbol apicall c thiscall prolog \ | ||
digits if then elseif else endif foreach do try catch finally erroneous failure procedure determ multi \ | ||
nondeterm anyflow and or externally from div mod rem quot in orelse otherwise unsigned unsigned64 \ | ||
unsignedNative | ||
|
||
# directives | ||
keywords3.*.pro=include bininclude requires orrequires error message export externally options | ||
|
||
# documentation keywords | ||
keywords4.*.pro=short detail end exception withdomain |