<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>comment</key>
	<string>Grammar based on description from http://artis.imag.fr/~Xavier.Decoret/resources/xdkbibtex/bibtex_summary.html#comment
	
	TODO: Does not support @preamble
	</string>
	<key>fileTypes</key>
	<array>
		<string>bib</string>
	</array>
	<key>foldingStartMarker</key>
	<string>\@[a-zA-Z]+\s*[{(].+,</string>
	<key>foldingStopMarker</key>
	<string>^\s*[)}]\s*$</string>
	<key>name</key>
	<string>BibTeX</string>
	<key>patterns</key>
	<array>
		<dict>
			<key>begin</key>
			<string>@Comment</string>
			<key>beginCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.comment.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>$\n?</string>
			<key>name</key>
			<string>comment.line.at-sign.bibtex</string>
		</dict>
		<dict>
			<key>begin</key>
			<string>((@)String)\s*(\{)\s*([a-zA-Z]*)</string>
			<key>beginCaptures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.string-constant.bibtex</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.keyword.bibtex</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.string-constant.begin.bibtex</string>
				</dict>
				<key>4</key>
				<dict>
					<key>name</key>
					<string>variable.other.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>\}</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.string-constant.end.bibtex</string>
				</dict>
			</dict>
			<key>name</key>
			<string>meta.string-constant.braces.bibtex</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>include</key>
					<string>#string_content</string>
				</dict>
			</array>
		</dict>
		<dict>
			<key>begin</key>
			<string>((@)String)\s*(\()\s*([a-zA-Z]*)</string>
			<key>beginCaptures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.string-constant.bibtex</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.keyword.bibtex</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.string-constant.begin.bibtex</string>
				</dict>
				<key>4</key>
				<dict>
					<key>name</key>
					<string>variable.other.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>\)</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.string-constant.end.bibtex</string>
				</dict>
			</dict>
			<key>name</key>
			<string>meta.string-constant.parenthesis.bibtex</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>include</key>
					<string>#string_content</string>
				</dict>
			</array>
		</dict>
		<dict>
			<key>begin</key>
			<string>((@)[a-zA-Z]+)\s*(\{)\s*([^\s,]*)</string>
			<key>beginCaptures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.entry-type.bibtex</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.keyword.bibtex</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.entry.begin.bibtex</string>
				</dict>
				<key>4</key>
				<dict>
					<key>name</key>
					<string>entity.name.type.entry-key.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>\}</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.entry.end.bibtex</string>
				</dict>
			</dict>
			<key>name</key>
			<string>meta.entry.braces.bibtex</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>begin</key>
					<string>([a-zA-Z]+)\s*(\=)</string>
					<key>beginCaptures</key>
					<dict>
						<key>1</key>
						<dict>
							<key>name</key>
							<string>string.unquoted.key.bibtex</string>
						</dict>
						<key>2</key>
						<dict>
							<key>name</key>
							<string>punctuation.separator.key-value.bibtex</string>
						</dict>
					</dict>
					<key>end</key>
					<string>(?=[,}])</string>
					<key>name</key>
					<string>meta.key-assignment.bibtex</string>
					<key>patterns</key>
					<array>
						<dict>
							<key>include</key>
							<string>#string_content</string>
						</dict>
						<dict>
							<key>include</key>
							<string>#integer</string>
						</dict>
					</array>
				</dict>
			</array>
		</dict>
		<dict>
			<key>begin</key>
			<string>((@)[a-zA-Z]+)\s*(\()\s*([^\s,]*)</string>
			<key>beginCaptures</key>
			<dict>
				<key>1</key>
				<dict>
					<key>name</key>
					<string>keyword.other.entry-type.bibtex</string>
				</dict>
				<key>2</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.keyword.bibtex</string>
				</dict>
				<key>3</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.entry.begin.bibtex</string>
				</dict>
				<key>4</key>
				<dict>
					<key>name</key>
					<string>entity.name.type.entry-key.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>\)</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.section.entry.end.bibtex</string>
				</dict>
			</dict>
			<key>name</key>
			<string>meta.entry.parenthesis.bibtex</string>
			<key>patterns</key>
			<array>
				<dict>
					<key>begin</key>
					<string>([a-zA-Z]+)\s*(\=)</string>
					<key>beginCaptures</key>
					<dict>
						<key>1</key>
						<dict>
							<key>name</key>
							<string>string.unquoted.key.bibtex</string>
						</dict>
						<key>2</key>
						<dict>
							<key>name</key>
							<string>punctuation.separator.key-value.bibtex</string>
						</dict>
					</dict>
					<key>end</key>
					<string>(?=[,)])</string>
					<key>name</key>
					<string>meta.key-assignment.bibtex</string>
					<key>patterns</key>
					<array>
						<dict>
							<key>include</key>
							<string>#string_content</string>
						</dict>
						<dict>
							<key>include</key>
							<string>#integer</string>
						</dict>
					</array>
				</dict>
			</array>
		</dict>
		<dict>
			<key>begin</key>
			<string>[^@\n]</string>
			<key>end</key>
			<string>(?=@)</string>
			<key>name</key>
			<string>comment.block.bibtex</string>
		</dict>
	</array>
	<key>repository</key>
	<dict>
		<key>integer</key>
		<dict>
			<key>match</key>
			<string>\d+</string>
			<key>name</key>
			<string>constant.numeric.bibtex</string>
		</dict>
		<key>nested_braces</key>
		<dict>
			<key>begin</key>
			<string>\{</string>
			<key>beginCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.group.begin.bibtex</string>
				</dict>
			</dict>
			<key>end</key>
			<string>\}</string>
			<key>endCaptures</key>
			<dict>
				<key>0</key>
				<dict>
					<key>name</key>
					<string>punctuation.definition.group.end.bibtex</string>
				</dict>
			</dict>
			<key>patterns</key>
			<array>
				<dict>
					<key>include</key>
					<string>#nested_braces</string>
				</dict>
			</array>
		</dict>
		<key>string_content</key>
		<dict>
			<key>patterns</key>
			<array>
				<dict>
					<key>begin</key>
					<string>"</string>
					<key>beginCaptures</key>
					<dict>
						<key>0</key>
						<dict>
							<key>name</key>
							<string>punctuation.definition.string.begin.bibtex</string>
						</dict>
					</dict>
					<key>end</key>
					<string>"</string>
					<key>endCaptures</key>
					<dict>
						<key>0</key>
						<dict>
							<key>name</key>
							<string>punctuation.definition.string.end.bibtex</string>
						</dict>
					</dict>
					<key>name</key>
					<string>string.quoted.double.bibtex</string>
					<key>patterns</key>
					<array>
						<dict>
							<key>include</key>
							<string>#nested_braces</string>
						</dict>
					</array>
				</dict>
				<dict>
					<key>begin</key>
					<string>\{</string>
					<key>beginCaptures</key>
					<dict>
						<key>0</key>
						<dict>
							<key>name</key>
							<string>punctuation.definition.string.begin.bibtex</string>
						</dict>
					</dict>
					<key>end</key>
					<string>\}</string>
					<key>endCaptures</key>
					<dict>
						<key>0</key>
						<dict>
							<key>name</key>
							<string>punctuation.definition.string.end.bibtex</string>
						</dict>
					</dict>
					<key>name</key>
					<string>string.quoted.other.braces.bibtex</string>
					<key>patterns</key>
					<array>
						<dict>
							<key>match</key>
							<string>@</string>
							<key>name</key>
							<string>invalid.illegal.at-sign.bibtex</string>
						</dict>
						<dict>
							<key>include</key>
							<string>#nested_braces</string>
						</dict>
					</array>
				</dict>
			</array>
		</dict>
	</dict>
	<key>scopeName</key>
	<string>text.bibtex</string>
	<key>uuid</key>
	<string>47F30BA1-6B1D-11D9-9A60-000D93589AF6</string>
</dict>
</plist>
