Skip to content

Commit

Permalink
Added some build and usage information to README
Browse files Browse the repository at this point in the history
  • Loading branch information
dhoepelman committed Jun 30, 2015
1 parent 61a9f62 commit e2cf622
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# XLParser: Excel formula parser
## XLParser
A C# Excel formula parser

### Introduction

XLParser is the reference implementation of the Excel grammar published in the upcoming paper "A Grammar for Spreadsheet Formulas Evaluated on Two Large Datasets" by E. Aivaloglou, D. Hoepelman and F. Hermans.

Expand All @@ -8,10 +11,27 @@ Note however that XLParser is not very restrictive, and thus might parse formula

XLParser is based on the C# [Irony parser framework](https://irony.codeplex.com/).

### License

All files of XLParser are released under the Mozilla Public License 2.0.

Roughly this means that you can make any alterations you like and can use this library in any project, even closed-source and statically linked, as long as you publish any modifications to the library.

### How to build

Open the `XLParser.sln` file in `src/` in Visual Studio 2013 or higher and press build. The dependencies are already included in compiled form in this repository.

### How to use in your project

The `ExcelFormulaParser` class is your main entry point. You can parse a formula through `ExcelFormulaParser.Parse("yourformula")`.

`ExcelFormulaParser` has several useful methods that operate directly on the parse tree like `AllNodes` to traverse the whole tree or `GetFunction` to get the function name of a node that represents a function call. You can `Print` any node. In visual studio you can see the printed version of any node during debugging by adding `yournode.Print(),ac` in the watch window.

`FormulaAnalyzer` contains some example functionality for analyzing the parse tree.

XLParser is still in the process of being released
=========
### How to debug or experiment

Currently not all source files are available yet, as they are still being cleaned up.
Irony, the parser framework XLParser uses, includes a tool called the "grammar explorer". This is a great way to play around with the grammar and parse trees.
To use this tool, you first need to build it once by opening the Irony solution (`lib/Irony/Irony_All.2012.sln`) and building it with release configuration. After that you can use the binary in `lib/Irony/Irony.GrammarExplorer/bin/Release/Irony.GrammarExplorer.exe`.

**XLParser will become available in the week of June 29th.**
To load the XLParser grammar, first make sure you have built XLParser. Then open the GrammarExplorer and add the grammar (`...` button) from `src/XLParser/bin/Debug/XLParser.dll`.

0 comments on commit e2cf622

Please sign in to comment.