GithubHelp home page GithubHelp logo

excel-formula-ast's Issues

support for german excel

I am not sure if this belongs to the tokenizer or the excel-formula-ast. If you are in german excel, you need to use ";" as separator for function arguments. "," is used for numbers.

=WENN(WAHR;1,1;1,2)

german excel: WAHR/FALSCH

In german excel, you have 'WAHR' and 'FALSCH' instead of 'TRUE' and 'FALSE'. The library will output a logicalNode only if the name is 'TRUE' or 'FALSE'. 'WAHR' and 'FALSCH' will be handled as 'cell'-Node. I am not sure if this is a lower-level (tokenizer) or ast problem.

It is easy to work around, but I think this could be handled better, e.g. a list of names for logical true, and a list of strings for logical false. I don't have any idea what this looks like in spanish, for example.

access to source line/column

the nodes do not have a corresponding token attached, therefore it is difficult to see where an error is in the original formula. I'd like to have linting for excel formulas (codemirror), but for it to work it needs line/column marks to where something is wrong (e.g., unknown cell range or unknown formula)

Alpha/beta/stable release

Hey guys,

You are doing an awesome work to generate AST representation of excel formulas. It is a hardwork and I would like to thank you guys for it.

I just wanted to ask what is current status of the project? Is it still in active development phase, or it has reached to alpha/beta/stable phase? How much excel formulae it has supported until now? I guess https://github.com/psalaets/excel-formula-tokenizer is also closely related to this project and will be almost on the same stage.

Best regards

strange (incorrect?) whitespace handling

> tokenize('=1+3*2')
[
  { value: '1+3', type: 'operand', subtype: 'number' },
  { value: '*', type: 'operator-infix', subtype: 'math' },
  { value: '2', type: 'operand', subtype: 'number' }
]
> tokenize('= 1+3*2')
[
  { value: '1', type: 'operand', subtype: 'number' },
  { value: '+', type: 'operator-infix', subtype: 'math' },
  { value: '3', type: 'operand', subtype: 'number' },
  { value: '*', type: 'operator-infix', subtype: 'math' },
  { value: '2', type: 'operand', subtype: 'number' }
]
> buildTree(tokenize('=1+3*2'))
{
  type: 'binary-expression',
  operator: '*',
  left: { type: 'number', value: NaN },
  right: { type: 'number', value: 2 }
}

Contribution request

Hi Alex,

I've been evaluating a number of excel formula parsers (including writing my own) for a project I'm working on, when I discovered your parser.

The design of the AST builder is elegant and I'm wondering if you're open to contributions to the excel-formula-ast and excel-formula-tokenizer? Also, is github's issues the best way to reach you?

Thanks!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.