Open GoogleCodeExporter opened 9 years ago
I am trying to parse the following BibTeX with java-bibtex 1.0.3 on Java 7.
@article { boverhof2008,
title = {Synthesis and characterization of some diorganotin(IV) complexes of
Schiff bases derived from a non-protein amino acid. Crystal structures of (HO
2CC6H4[N=C(H)KC(CH3)CH(CH 3)-3-OH]-p) and its di-n-butyltin(IV) complex (nBu
2Sn\{O2CC6H4[N=C(H)\}\{C(CH 3)CH(CH3)...},
journal = {Applied Organometallic Chemistry},
year = {2008},
volume = {22},
number = {2},
pages = {114-121},
author = {Basu Baul, T.S. and Masharing, C. and Basu, S. and Pettinari, C. and
Rivarola, E. and Chantrapromma, S. and Fun, H.-K.}
}
However, I get the following error.
Exception in thread "main" org.jbibtex.ParseException: Encountered "<EOF>" at
line 9, column 3.
Was expecting one of:
"," ...
"#" ...
"}" ...
"," ...
at org.jbibtex.BibTeXParser.generateParseException(BibTeXParser.java:926)
at org.jbibtex.BibTeXParser.jj_consume_token(BibTeXParser.java:811)
at org.jbibtex.BibTeXParser.Entry(BibTeXParser.java:366)
at org.jbibtex.BibTeXParser.Object(BibTeXParser.java:201)
at org.jbibtex.BibTeXParser.Database(BibTeXParser.java:176)
at org.jbibtex.BibTeXParser.parse(BibTeXParser.java:21)
at org.orcid.utils.BibtexUtils.getBibTeXDatabase(BibtexUtils.java:167)
at org.orcid.utils.BibtexUtils.getBibTeXEntries(BibtexUtils.java:66)
at org.orcid.utils.BibtexUtils.toCitation(BibtexUtils.java:108)
at org.orcid.core.cli.ValidateBibTex.execute(ValidateBibTex.java:82)
at org.orcid.core.cli.ValidateBibTex.main(ValidateBibTex.java:64)
It looks like this is because java-bibtex does not understand \{ to escape the
curly braces. Then it sees unbalanced curly braces, and throws the exception.
Original comment by wjrsimp...@gmail.com
on 15 Apr 2013 at 5:37
The comment #1 presents an interesting edge case (ie. unbalanced curly braces
that are escaped using LaTeX syntax). It has been isolated to a new separate
issue (issue 10).
Original comment by villu.ru...@gmail.com
on 15 Apr 2013 at 6:34
Original issue reported on code.google.com by
villu.ru...@gmail.com
on 15 May 2012 at 9:38