-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace BibTexParser & Writer #123
Comments
Maybe we should check all Java-based BibTeX-based managers how they do it? |
jBibTex should be checked if arbitrary keys are supported. The commit S-Shimotori/jbibtex@da1bb9e indicates that the keys are are hardcoded. Another option is to drop support of customized entries completely and only support hard-coded ones. |
The ANTLRv3 Grammar could be a good start. If we use it, we have to ask @bkiers if he is willing to relicense it GPLv2+ or any other GPL-compatible license. |
Erathostenes (https://bitbucket.org/mkmatlock/eratosthenes/wiki/Home) use |
We should generate test cases for it. I started to collect publicly available bibtex files at the wiki. Should we include them using git submodules? I think, that is too much overhead. |
Comments in the file before all entries and after all entries should be kept. Example (from http://shelah.logic.at/eindex.html)
|
The JBibTeX library has full support for inline comments. In JavaCC terminology, they are part of the class model object as special tokens (attached to normal tokens). |
The library needs a deeper invesitagation. Just browsing https://github.com/jbibtex/jbibtex/blob/master/src/main/java/org/jbibtex/LaTeXPrinter.java makes the impression that strings are somehow replaced with unicode chars at some writing. But I can't see how this class is used just by browsing. (Comments missing 😇) There are some forks like
|
Note that everything outside of |
The JBibTeX parser (which is auto-generated after JavaCC grammar file) skips all content that doesn't start with Currently, normal and special tokens are created, but they are not added to the resulting high-level class model objects (eg. the |
This resolution of this issue heavily depends on our decision for #116 If we decide to maintain configuration options (and therefore custom formats), it is highly likely that we cannot use a third party library, but have to implement serialization on our own. Having said that, I a very much for completely rewriting the serialization as it currently stands. |
With the customizations we want to keep and implement, using an external API is really not an option. Therefore, I am closing this issue. If there are more things to discuss, we can defer to #116, or for specific aspects open a new issue. |
Modified the handling of URLs in the file field to replace the pipe character (|) with its encoded representation (%7C) to avoid exceptions in JabRef. Closes JabRef#123
The class
BibtexParser
should be replaced or rewritten if possible. Currently, it is quite a mess. Also, it only does the parsing of the files and not the writing.We need to investigate if we can replace it by some external library like jBibTex or need to rewrite it properly. The same probably holds for the writing process which should be aligned with the reading process.
Any information appreciated.
The text was updated successfully, but these errors were encountered: