View previous topic :: View next topic |
Author |
Message |
davidl
Joined: 17 Aug 2006 Posts: 27
|
Posted: Mon Nov 20, 2006 4:34 am Post subject: enki can't generate correct uint startX for this grammar |
|
|
.import("enki.BaseParser");
.import("std.conv");
.import("calc");
.define("String","digit","true","Digit");
AddExpression = float add(num1,num2,opr)
::= (nubmer:num1|MulExpression:num1|AddExpression:num1
) [
( "+":opr |
"-":opr
) MulExpression:num2
];
MulExpression = float mul(num1,num2,opr)
::= (number:num1|MulExpression:num1) [
( "*":opr |
"/":opr
) number:num2
];
number = float toFloat(num1)
::= {digit}:num1;
miss identifier start15 |
|
Back to top |
|
|
davidl
Joined: 17 Aug 2006 Posts: 27
|
Posted: Mon Nov 20, 2006 4:35 am Post subject: |
|
|
and till now i haven't figured out an elegant way of implementing an evaluator.... |
|
Back to top |
|
|
pragma
Joined: 28 May 2004 Posts: 607 Location: Washington, DC
|
Posted: Mon Nov 20, 2006 10:55 am Post subject: |
|
|
davidl: sorry this didn't work. I'm going to look into this as soon as time permits. The codebase in SVN is in need of a touch-up, as there are already a few fixes pending.
I have added a ticket for this issue:
http://www.dsource.org/projects/ddl/ticket/57 _________________ -- !Eric.t.Anderton at gmail |
|
Back to top |
|
|
|