summaryrefslogtreecommitdiff
path: root/tests/lexers/bib/example.txt
diff options
context:
space:
mode:
Diffstat (limited to 'tests/lexers/bib/example.txt')
-rw-r--r--tests/lexers/bib/example.txt547
1 files changed, 547 insertions, 0 deletions
diff --git a/tests/lexers/bib/example.txt b/tests/lexers/bib/example.txt
new file mode 100644
index 00000000..dcbdbcf7
--- /dev/null
+++ b/tests/lexers/bib/example.txt
@@ -0,0 +1,547 @@
+---input---
+This is an example BibTeX file.
+This text is a comment.
+
+@preamble{"%%% example BibTeX file"}
+
+@Preamble{"\newcommand{\noopsort}[1]{} "
+ "\newcommand{\noopsort}[1]{} "}
+
+@String{SCI = "Science"}
+
+@STRING{JFernandez = "Fernandez, Julio M."}
+@StRiNg{HGaub = "Gaub, Hermann E."}
+@string{MGautel = "Gautel, Mathias"}
+@String{FOesterhelt = "Oesterhelt, Filipp"}
+@String{MRief = "Rief, Matthias"}
+
+@Article{rief97b,
+ author = MRief #" and "# MGautel #" and "# FOesterhelt
+ #" and "# JFernandez #" and "# HGaub,
+ title = "Reversible Unfolding of Individual Titin
+ Immunoglobulin Domains by {AFM}",
+ journal = SCI,
+ volume = 276,
+ number = 5315,
+ pages = "1109--1112",
+ year = 1997,
+ doi = "10.1126/science.276.5315.1109",
+ URL = "http://www.sciencemag.org/cgi/content/abstract/276/5315/1109",
+ eprint = "http://www.sciencemag.org/cgi/reprint/276/5315/1109.pdf",
+}
+
+
+Parens can be used instead of braces:
+
+@ARTICLE(ruckenstein-diffusion,
+ author = "Liu, Hongquin and Ruckenstein, Eli",
+ language = "english",
+ title = "Predicting the Diffusion Coefficient in Supercritical Fluids",
+ journal = "Ind. Eng. Chem. Res.",
+ volume = "36",
+ year = "1997",
+ pages = "888-895"
+)
+
+@book{
+ viktorov-methods,
+ author = "Викторов, Михаил Маркович",
+ publisher = "Л.: <<Химия>>",
+ title = "Методы вычисления физико-химических величин и прикладные расчёты",
+ language = "russian",
+ year = "1977",
+ isbn = "000-0000000000",
+}
+
+@comment{jackson-commented-out,
+ author = "Jackson, P\'eter",
+ publisher = "Some Publisher",
+ language = "english",
+ title = "Some Title",
+ series = "Some series",
+ booktitle = "Commented Out",
+ number = "3",
+ edition = "Second",
+ year = "1933",
+ pages = "44--59"
+}
+
+@booklet{test-booklet,
+ author = "de Last, Jr., First Middle",
+ language = "english",
+ title = "Just a booklet",
+ year = 2006,
+ month = jan,
+ address = "Moscow",
+ howpublished = "Published by Foo"
+}
+
+
+---tokens---
+'This is an example BibTeX file.' Comment
+'\n' Text
+
+'This text is a comment.' Comment
+'\n\n' Text
+
+'@preamble' Name.Class
+'{' Punctuation
+'"' Literal.String
+'%%% example BibTeX file' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n\n' Text
+
+'@Preamble' Name.Class
+'{' Punctuation
+'"' Literal.String
+'\\newcommand' Literal.String
+'{' Literal.String
+'\\noopsort' Literal.String
+'}' Literal.String
+'[1]' Literal.String
+'{' Literal.String
+'}' Literal.String
+' ' Literal.String
+'"' Literal.String
+'\n ' Text
+'"' Literal.String
+'\\newcommand' Literal.String
+'{' Literal.String
+'\\noopsort' Literal.String
+'}' Literal.String
+'[1]' Literal.String
+'{' Literal.String
+'}' Literal.String
+' ' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n\n' Text
+
+'@String' Name.Class
+'{' Punctuation
+'SCI' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Science' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n\n' Text
+
+'@STRING' Name.Class
+'{' Punctuation
+'JFernandez' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Fernandez, Julio M.' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n' Text
+
+'@StRiNg' Name.Class
+'{' Punctuation
+'HGaub' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Gaub, Hermann E.' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n' Text
+
+'@string' Name.Class
+'{' Punctuation
+'MGautel' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Gautel, Mathias' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n' Text
+
+'@String' Name.Class
+'{' Punctuation
+'FOesterhelt' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Oesterhelt, Filipp' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n' Text
+
+'@String' Name.Class
+'{' Punctuation
+'MRief' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Rief, Matthias' Literal.String
+'"' Literal.String
+'}' Punctuation
+'\n\n' Text
+
+'@Article' Name.Class
+'{' Punctuation
+'rief97b' Name.Label
+',' Punctuation
+'\n ' Text
+'author' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'MRief' Name.Variable
+' ' Text
+'#' Punctuation
+'"' Literal.String
+' and ' Literal.String
+'"' Literal.String
+'#' Punctuation
+' ' Text
+'MGautel' Name.Variable
+' ' Text
+'#' Punctuation
+'"' Literal.String
+' and ' Literal.String
+'"' Literal.String
+'#' Punctuation
+' ' Text
+'FOesterhelt' Name.Variable
+'\n ' Text
+'#' Punctuation
+'"' Literal.String
+' and ' Literal.String
+'"' Literal.String
+'#' Punctuation
+' ' Text
+'JFernandez' Name.Variable
+' ' Text
+'#' Punctuation
+'"' Literal.String
+' and ' Literal.String
+'"' Literal.String
+'#' Punctuation
+' ' Text
+'HGaub' Name.Variable
+',' Punctuation
+'\n ' Text
+'title' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Reversible Unfolding of Individual Titin\n Immunoglobulin Domains by ' Literal.String
+'{' Literal.String
+'AFM' Literal.String
+'}' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'journal' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'SCI' Name.Variable
+',' Punctuation
+'\n ' Text
+'volume' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'276' Literal.Number
+',' Punctuation
+'\n ' Text
+'number' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'5315' Literal.Number
+',' Punctuation
+'\n ' Text
+'pages' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'1109--1112' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'year' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'1997' Literal.Number
+',' Punctuation
+'\n ' Text
+'doi' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'10.1126/science.276.5315.1109' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'URL' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'http://www.sciencemag.org/cgi/content/abstract/276/5315/1109' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'eprint' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'http://www.sciencemag.org/cgi/reprint/276/5315/1109.pdf' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n\n' Text
+
+'Parens can be used instead of braces:' Comment
+'\n\n' Text
+
+'@ARTICLE' Name.Class
+'(' Punctuation
+'ruckenstein-diffusion' Name.Label
+',' Punctuation
+'\n ' Text
+'author' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Liu, Hongquin and Ruckenstein, Eli' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'language' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'english' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'title' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Predicting the Diffusion Coefficient in Supercritical Fluids' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'journal' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Ind. Eng. Chem. Res.' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'volume' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'36' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'year' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'1997' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'pages' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'888-895' Literal.String
+'"' Literal.String
+'\n' Text
+
+')' Punctuation
+'\n\n' Text
+
+'@book' Name.Class
+'{' Punctuation
+'\n ' Text
+'viktorov-methods' Name.Label
+',' Punctuation
+'\n ' Text
+'author' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Викторов, Михаил Маркович' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'publisher' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Л.: <<Химия>>' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'title' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Методы вычисления физико-химических величин и прикладные расчёты' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'language' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'russian' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'year' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'1977' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'isbn' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'000-0000000000' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n' Text
+
+'}' Punctuation
+'\n\n' Text
+
+'@comment' Comment
+'{jackson-commented-out,' Comment
+'\n ' Text
+'author = "Jackson, P\\\'eter",' Comment
+'\n ' Text
+'publisher = "Some Publisher",' Comment
+'\n ' Text
+'language = "english",' Comment
+'\n ' Text
+'title = "Some Title",' Comment
+'\n ' Text
+'series = "Some series",' Comment
+'\n ' Text
+'booktitle = "Commented Out",' Comment
+'\n ' Text
+'number = "3",' Comment
+'\n ' Text
+'edition = "Second",' Comment
+'\n ' Text
+'year = "1933",' Comment
+'\n ' Text
+'pages = "44--59"' Comment
+'\n' Text
+
+'}' Comment
+'\n\n' Text
+
+'@booklet' Name.Class
+'{' Punctuation
+'test-booklet' Name.Label
+',' Punctuation
+'\n ' Text
+'author' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'de Last, Jr., First Middle' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'language' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'english' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'title' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Just a booklet' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'year' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'2006' Literal.Number
+',' Punctuation
+'\n ' Text
+'month' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'jan' Name.Variable
+',' Punctuation
+'\n ' Text
+'address' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Moscow' Literal.String
+'"' Literal.String
+',' Punctuation
+'\n ' Text
+'howpublished' Name.Attribute
+' ' Text
+'=' Punctuation
+' ' Text
+'"' Literal.String
+'Published by Foo' Literal.String
+'"' Literal.String
+'\n' Text
+
+'}' Punctuation
+'\n' Text