Hi Dinesh, On Wednesday, 2008-06-25 21:00:38 +0530, Dinesh Varadharajan wrote:
> I am writing a formula parser for calc in python. From the dev list I assume > you are using bison as parser generator. No, not for Calc formulas. It's all done in a carefully hand-crafted 2-pass compiler, a scanner generating tokens that then are fed to a recursive descendent parser generating RPN code. > Where do I get the grammar. Any help is much appreciated. If you're interested (and dare ;-) to study internals: sc/source/core/tool/compiler.cxx ScCompiler::CompileString() is the scanner entry point. ScCompiler::CompileTokenArray() is the parser entry point. Eike -- OOo/SO Calc core developer. Number formatter stricken i18n transpositionizer. SunSign 0x87F8D412 : 2F58 5236 DB02 F335 8304 7D6C 65C9 F9B5 87F8 D412 OpenOffice.org Engineering at Sun: http://blogs.sun.com/GullFOSS Please don't send personal mail to the [EMAIL PROTECTED] account, which I use for mailing lists only and don't read from outside Sun. Use [EMAIL PROTECTED] Thanks.
pgpGHYJu6mZcD.pgp
Description: PGP signature
