kiniry / Mobius

4 stars 8 forks source link

Does not generate constraints in neither in txt nor in html #654

Open atiti opened 11 years ago

atiti commented 11 years ago

runnnig commands:

bonc --informal --print=txt --print-output=first.txt test.bon bonc --informal --print=html --print-output=first.html test.bon

JVM = 1.5.0_17

BON = 0.2.5

atiti commented 11 years ago

From: fintan (GH: fintanf) Date: Mon Mar 8 22:55:38 2010

Thanks for the bug report.

Can you please tell me exactly what you see when you run those commands? Please paste the output here.

Can you please give me a bit more information about your setup? What platform are you on? Does bonc work otherwise (i.e. give you feedback on syntax errors, etc.)? What does it print when you type "bonc -v"?

I am unable to recreate on windows, osx or linux. This is the output that is expected:

{{{ fintan@beast:~/workspaces/bon/bonc$ bonc --informal --print=txt --print-output=first.txt test.bon Succesfully created: first.txt fintan@beast:~/workspaces/bon/bonc$ cat first.txt -- Generated using BONc (version: bonc-0.2.5) plain text output, 08-Mar-2010 21:53:55.

system_chart THE_WORLD cluster EARTH description "A small, insignificant planet." end

cluster_chart EARTH class CITIZEN description "A humanoid." class NOBLEPERSON description "A rich humanoid." end

class_chart CITIZEN indexing clauster: "CIVIL_STATUS "; created: "1993-03-15 jmn"; revised: "1993-05-12 kw"; explanation "Person born or living in a country" part "1/1 " query "Name", "Sex", "Age", "Single", "Spouse", "Children", "Parents", "Impediment to marriage" command "Marry", "Divorce" constraint "Each citizen has two parents." end

class_chart NOBLEPERSON indexing cluaster: "CIVIL_STATUS"; created: "1993-03-15 jmn"; revised: "1993-05-12 kw", "1993-12-10 kw"; explanation "Person of noble rank" part "1/1 " query "Assets", "Butler" constraint "Enough property for independence." end }}}

atiti commented 11 years ago

From: lipa (GH: None) Date: Tue Mar 9 21:09:36 2010

bonc -v prints bonc-2.0.5 The bon works on my machine. It is windows 7.

I see that you have recreated the error. The constraint part should consist of many constraints. They are separated by commas and everything after first comma is gone. However it works if there are no commas. Looking to the example I think it is incorrect behaviour

The output for class NOBLEPERSON.

class_chart NOBLEPERSON indexing cluaster: "CIVIL_STATUS"; created: "1993-03-15 jmn"; revised: "1993-05-12 kw", "1993-12-10 kw"; explanation "Person of noble rank" part "1/1 " query "Assets", "Butler" constraint "Enough property for independence.", "Can only marry other noble person.", "Wedding celebrated with style.", "Married nobility share their assets and must have a butler."

end

atiti commented 11 years ago

From: fintan (GH: fintanf) Date: Tue Mar 9 22:50:47 2010

Ah, my bad, sorry, I didn't see it before.

You are absolutely right, there was an error in the parser meaning those additional constraints were not being recorded.

I've fixed it in changeset [75578], it will appear in the next release.

Thanks.