<commit_before># EFP (Excel Formula Parser)

[![Build Status](https://travis-ci.org/Luxurioust/efp.svg?branch=master)](https://travis-ci.org/Luxurioust/efp)
[![Code Coverage](https://codecov.io/gh/Luxurioust/efp/branch/master/graph/badge.svg)](https://codecov.io/gh/Luxurioust/efp)
[![Go Report Card](https://goreportcard.com/badge/github.com/Luxurioust/efp)](https://goreportcard.com/report/github.com/Luxurioust/efp)
[![GoDoc](https://godoc.org/github.com/Luxurioust/efp?status.svg)](https://godoc.org/github.com/Luxurioust/efp)
[![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)

Using EFP (Excel Formula Parser) you can get an Abstract Syntax Tree (AST) from Excel formula.

## Installation

```go
go get github.com/Luxurioust/efp
```

## Example

```go
package main

import "github.com/Luxurioust/efp"

func main() {
    ps := efp.ExcelParser()
    ps.Parse("=SUM(A3+B9*2)/2")
    println(ps.PrettyPrint())
}
```

Get AST

```
SUM <Function> <Start>
    A3 <Operand> <Range>
    + <OperatorInfix> <Math>
    B9 <Operand> <Range>
    * <OperatorInfix> <Math><commit_msg>Repo URI changed.<commit_after># EFP (Excel Formula Parser)

[![Build Status](https://travis-ci.org/xuri/efp.svg?branch=master)](https://travis-ci.org/xuri/efp)
[![Code Coverage](https://codecov.io/gh/xuri/efp/branch/master/graph/badge.svg)](https://codecov.io/gh/xuri/efp)
[![Go Report Card](https://goreportcard.com/badge/github.com/xuri/efp)](https://goreportcard.com/report/github.com/xuri/efp)
[![GoDoc](https://godoc.org/github.com/xuri/efp?status.svg)](https://godoc.org/github.com/xuri/efp)
[![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)

Using EFP (Excel Formula Parser) you can get an Abstract Syntax Tree (AST) from Excel formula.

## Installation

```go
go get github.com/xuri/efp
```

## Example

```go
package main

import "github.com/xuri/efp"

func main() {
    ps := efp.ExcelParser()
    ps.Parse("=SUM(A3+B9*2)/2")
    println(ps.PrettyPrint())
}
```

Get AST

```
SUM <Function> <Start>
    A3 <Operand> <Range>
    + <OperatorInfix> <Math>
    B9 <Operand> <Range>
    * <OperatorInfix> <Math>
{'fraction_non_alphanumeric': 0.1990072202166065, 'fraction_numerical': 0.00631768953068592, 'mean_word_length': 4.5703517587939695, 'pattern_counts': {'":': 0, '<': 23, '<?xml version=': 0, '>': 23, 'https://': 20, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4504221', 'n_tokens_mistral': 916, 'n_tokens_neox': 876, 'n_words': 125}