gold-parser

Persistent Shift - Reduce Conflict in Goldparser

别等时光非礼了梦想. 提交于 2021-01-29 17:50:49
问题 I'm really stuck with a Shift-Reduce conflict in Goldparser. I wrote a PHP-like grammar that theoretically should be able to parse the following script: public $Test = null; protected $bDemo = true; function Main() { } private function Run() { } At the top I want to assign the global variables and after that come the function definitions. To narrow down the problem I reduced my large grammar to the following lines which can reproduce the error. Obviously this is incomplete. The functions have

Can I improve this GOLD Parser Grammar?

有些话、适合烂在心里 提交于 2020-02-05 05:43:05
问题 I have to parse a file that looks like this: versioninfo { "editorversion" "400" "editorbuild" "4715" } visgroups { } world { "id" "1" "mapversion" "525" "classname" "worldspawn" solid { "id" "2" side { "id" "1" "plane" "(-544 -400 0) (-544 -240 0) (-272 -240 0)" } side { "id" "2" "plane" "(-544 -240 -16) (-544 -400 -16) (-272 -400 -16)" } } } I have a parser written from scratch, but it has a few bugs that I can't track down and I imagine it'll be difficult to maintain if the format changes

how to implement dynamic calculating price in magento based on weight ?

我与影子孤独终老i 提交于 2020-01-04 06:04:38
问题 Hi i’m developing a eCommerce site in Magento for jewellery business and its based on a “weight”, not the price because gold rate is changing in day by day or more then 3 times in a day.So it is not possible to change the product price every time according to gold rate. Then, how to manage the prices on this scenario? Example case: Today I have added a 18K gold ring of 10gm to my site and right now gold rate is Rs30,000 per 10gm, so today price of this ring is Rs30,000 but, Next day the rate

Best parser generator for parsing many small texts in C++?

旧城冷巷雨未停 提交于 2019-12-08 03:10:30
问题 I am, for performance reason, porting a C# library to C++. During normal operation, this library needs, amongst other things, to parse about 150'000 math expressions (think excel formulas) with an average length of less than 150 characters. In the C# version, I used GOLD parser to generate parsing code. It can parse all 150'000 expressions in under one second. Because we were thinking about extending our language, I figured the move to C++ might be a good chance to change to ANTLR. I have

Parsing Project and Package files using Gold Parser --help needed with 'IdList'

痴心易碎 提交于 2019-12-06 02:38:57
I am dabbling with the Object Pascal Engine (by Rob van den Brink) and it seems (except for a few minor and easily correctable errors) it works for Delphi unit files. However, it has problems parsing Project ( .dpr) and Package ( .dpk) files; and the issue basically boils down to the differences between the stuff that 'uses' can have in units and projects (as well as what 'contains' clause can have in packages). Let me give simple examples: In a unit (.pas) file, the 'uses' clause can be something like this uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs

VBScript Partial Parser

£可爱£侵袭症+ 提交于 2019-12-06 00:36:45
问题 I am trying to create a VBScript parser. I was wondering what is the best way to go about it. I have researched and researched. The most popular way seems to be going for something like Gold Parser or ANTLR. The feature I want to implement is to do dynamic checking of Syntax Errors in VBScript. I do not want to compile the entire VBS every time some text changes. How do I go about doing that? I tried to use Gold Parser, but i assume there is no incremental way of doing parsing through it,