Extend the orcam xclangspec file

This commit is contained in:
Jeremy Rand 2017-09-05 23:54:45 -04:00
parent 50d26a8c80
commit b52923f8e6
2 changed files with 228 additions and 40 deletions

View File

@ -34,7 +34,19 @@
<array> <array>
<dict> <dict>
<key>prefix</key> <key>prefix</key>
<string>#</string> <string>;</string>
</dict>
<dict>
<key>prefix</key>
<string>!</string>
</dict>
<dict>
<key>prefix</key>
<string>*</string>
</dict>
<dict>
<key>prefix</key>
<string>.</string>
</dict> </dict>
</array> </array>
<key>conformsTo</key> <key>conformsTo</key>
@ -60,7 +72,9 @@
<key>name</key> <key>name</key>
<string>ORCAM Assembly</string> <string>ORCAM Assembly</string>
<key>point</key> <key>point</key>
<string>Xcode.SourceCodeLanguage</string> <string>Xcode.SourceCodeLanguage</string>
<key>supportsIndentation</key>
<string>true</string>
<key>version</key> <key>version</key>
<string>1.0</string> <string>1.0</string>
</dict> </dict>

View File

@ -8,19 +8,189 @@
{ {
Identifier = "xcode.lang.asm.orcam.identifier"; Identifier = "xcode.lang.asm.orcam.identifier";
Syntax = { Syntax = {
StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_"; CaseSensitive = NO;
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789$_."; StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_~";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~";
Type = "xcode.syntax.identifier"; Type = "xcode.syntax.identifier";
}; };
}, },
{ {
Identifier = "xcode.lang.asm.orcam.directive"; Identifier = "xcode.lang.asm.orcam.keyword";
Syntax = { Syntax = {
StartAtBOL = YES; CaseSensitive = NO;
StartChars = "."; StartChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_~";
Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_"; Chars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_~";
Words = (
"adc",
"and",
"asl",
"bcc",
"bcs",
"beq",
"bge",
"bit",
"blt",
"bmi",
"bne",
"bpl",
"bra",
"brk",
"brl",
"bvc",
"bvs",
"clc",
"cld",
"cli",
"clv",
"cmp",
"cop",
"cpa",
"cpx",
"cpy",
"dec",
"dex",
"dey",
"eor",
"inc",
"inx",
"iny",
"jmp",
"jsl",
"jsr",
"lda",
"ldx",
"ldy",
"lsr",
"mvn",
"mvp",
"nop",
"ora",
"pea",
"pei",
"per",
"pha",
"phb",
"phd",
"phk",
"php",
"phx",
"phy",
"pla",
"plb",
"pld",
"plp",
"plx",
"ply",
"rep",
"rol",
"ror",
"rti",
"rtl",
"rts",
"sbc",
"sec",
"sed",
"sei",
"sep",
"sta",
"stp",
"stx",
"sty",
"stz",
"tax",
"tay",
"tcd",
"tcs",
"tdc",
"trb",
"tsb",
"tsc",
"tsx",
"txa",
"txs",
"txy",
"tya",
"tyx",
"wai",
"wdm",
"xba",
"xce",
"absaddr",
"align",
"anop",
"append",
"case",
"codechk",
"copy",
"data",
"datachk",
"dc",
"direct",
"ds",
"dynchk",
"eject",
"end",
"entry",
"equ",
"err",
"expand",
"gequ",
"ieee",
"instime",
"keep",
"kind",
"list",
"longa",
"longi",
"mem",
"merr",
"msb",
"numsex",
"obj",
"objcase",
"objend",
"org",
"printer",
"private",
"privdata",
"rename",
"setcom",
"start",
"symbol",
"title",
"using",
"65c02",
"65816",
"actr",
"ago",
"aif",
"ainput",
"amid",
"asearch",
"gbla",
"gblb",
"gblc",
"gen",
"lcla",
"lclb",
"lclc",
"macro",
"mcopy",
"mdrop",
"mend",
"mexit",
"mload",
"mnote",
"seta",
"setb",
"setc",
"trace",
);
Type = "xcode.syntax.keyword"; Type = "xcode.syntax.keyword";
AltType = "xcode.syntax.identifier";
}; };
}, },
@ -33,6 +203,7 @@
Description = "ORCAM Assembler Coloring"; Description = "ORCAM Assembler Coloring";
BasedOn = "xcode.lang.simpleColoring"; BasedOn = "xcode.lang.simpleColoring";
IncludeInMenu = YES; IncludeInMenu = YES;
UsesCLikeIndentation = YES;
Name = "Assembly (ORCAM)"; Name = "Assembly (ORCAM)";
Syntax = { Syntax = {
Tokenizer = "xcode.lang.asm.orcam.lexer"; Tokenizer = "xcode.lang.asm.orcam.lexer";
@ -49,12 +220,13 @@
"xcode.lang.comment", "xcode.lang.comment",
"xcode.lang.comment.singleline", "xcode.lang.comment.singleline",
"xcode.lang.asm.orcam.comment.singleline.semi", "xcode.lang.asm.orcam.comment.singleline.semi",
"xcode.lang.asm.orcam.comment.singleline.at", "xcode.lang.asm.orcam.comment.singleline.exclam",
"xcode.lang.asm.orcam.comment.singleline.pound", "xcode.lang.asm.orcam.comment.singleline.star",
"xcode.lang.asm.orcam.comment.singleline.dot",
"xcode.lang.string", "xcode.lang.string",
"xcode.lang.character", "xcode.lang.character",
"xcode.lang.number", "xcode.lang.number",
"xcode.lang.asm.orcam.directive", "xcode.lang.asm.orcam.keyword",
"xcode.lang.asm.orcam.identifier", "xcode.lang.asm.orcam.identifier",
); );
}; };
@ -63,8 +235,9 @@
{ {
Identifier = "xcode.lang.asm.orcam.comment.singleline.semi"; Identifier = "xcode.lang.asm.orcam.comment.singleline.semi";
Syntax = { Syntax = {
StartAtBOL = YES;
StartAtColumnZero = YES;
Start = ";"; Start = ";";
EscapeChar = "\\";
End = "\n"; End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" ); IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment"; Type = "xcode.syntax.comment";
@ -72,22 +245,35 @@
}, },
{ {
Identifier = "xcode.lang.asm.orcam.comment.singleline.at"; Identifier = "xcode.lang.asm.orcam.comment.singleline.exclam";
Syntax = {
Start = "@";
EscapeChar = "\\";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.asm.orcam.comment.singleline.pound";
Syntax = { Syntax = {
StartAtBOL = YES; StartAtBOL = YES;
Start = "#"; StartAtColumnZero = YES;
EscapeChar = "\\"; Start = "!";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.asm.orcam.comment.singleline.star";
Syntax = {
StartAtBOL = YES;
StartAtColumnZero = YES;
Start = "*";
End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment";
};
},
{
Identifier = "xcode.lang.asm.orcam.comment.singleline.dot";
Syntax = {
StartAtBOL = YES;
StartAtColumnZero = YES;
Start = ".";
End = "\n"; End = "\n";
IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" ); IncludeRules = ( "xcode.lang.url", "xcode.lang.url.mail", "xcode.lang.comment.mark" );
Type = "xcode.syntax.comment"; Type = "xcode.syntax.comment";
@ -98,25 +284,13 @@
Identifier = "xcode.lang.asm.orcam.label"; Identifier = "xcode.lang.asm.orcam.label";
Syntax = { Syntax = {
StartAtBOL = YES; StartAtBOL = YES;
StartAtColumnZero = YES;
Tokenizer = "xcode.lang.asm.orcam.lexer"; Tokenizer = "xcode.lang.asm.orcam.lexer";
Rules = ( Rules = (
"xcode.lang.asm.orcam.label.name", "xcode.lang.asm.orcam.identifier",
":",
); );
Type = "xcode.syntax.definition.function"; Type = "xcode.syntax.definition.function";
}; };
}, },
{
Identifier = "xcode.lang.asm.orcam.label.name";
Syntax = {
StartAtBOL = YES;
Tokenizer = "xcode.lang.asm.orcam.lexer";
Rules = (
"xcode.lang.asm.orcam.identifier",
);
Type = "xcode.syntax.name.partial";
};
},
) )