1

How should I start writing a parser for BibTex files. As the initial design I see following steps.

  1. List down grammar
  2. Build a tokenizer
  3. Do parsing of token stream against grammar

We also need some error mechanism, so the users uploading bibtex files can know line numbers where is the error in their BibTex files. I am looking for community opinion to target this problem.

(please point if there are any existing open source C# or VB.NET BibTex parsers.)

2 Answers 2

1

There are many tools available to assist you with this, such as ANTLR or the GOLD Parsing System. I usually use the latter to create my parser grammars.

0
1

I've published an open source library for BibTex format (load/save/export to Excel), allowing both non-typed (Key/Value dictionary) and strong typed access to the BibTex entries.

It might not fit well your purpose, as it is weak on validation (has none of it :) ), but might help anyway:

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.