Open taoqf opened 7 years ago
@DevSide Can you help me out?
Hi @taoqf, TypeScript is a good choice for nools. Your repo is not a real branch of nools so every commit we make on master will be hard to apply on your project. What is the commit (sha) where you started it from ? I gonna take a look but i'm a beginner in TypeScript :smile:
I compiled your code using gulp, your test.js seems to work, could you write a test which failed for your problem ?
So constraints
is always an array because of this line https://github.com/taoqf/nools-ts/blob/d793d40fd6f52a3179aa4e07f26011e429fdcfcd/src/parser/tokens.ts#L46, all tests passes on nools without this block if (!l) { constraints = ["true"]; }
. You can remove it from your code
Thanks @DevSide , I tested nools and removed the code
// if (!l) {
// constraints = ["true"];
// }
,the exception is gone, but I didn't see the output which i put into `then', and this is not like the behaviour of drools. By the way, I found a InitialFact is asserted into workingmemory, and I guess it is used for this situation, am I right?
I've added some tests in the readme, and publish already. and I think noos-ts, can be running just like nools now.
try this
npm install nools-ts --save
Any one help to write the grammar? nools-ts grammar.ts
I have gaven it up. to rewrite the grammar cause I find it is very hard to match then
.
@taoqf, maybe you can try to embed a jison ecma grammar parser in then part parsing
@foxever, right, when I get time, I will try it later.
I think I have the solution. I changed the rules here. thank you all. I will close this issue now.
I think maybe someone want to see this.
We have started a new branch of nools nools-ts which is written in Typescript and most of the code come from here. But I have got some problem when building the agenda. Anyone could help me out? Out targe is using nools in modern browsers with less code and less time, maybe we could prebuild the retetree, which i think would save some time in downloading and runtime. @doug-martin @markbjerke