grammatica-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Grammatica-users] documentation :(


From: Leonardo Kenji Shikida
Subject: [Grammatica-users] documentation :(
Date: Mon, 28 Mar 2005 23:22:48 -0300
User-agent: Mozilla Thunderbird 0.8 (X11/20040913)

this seems to be a great software, but I simply can't use the documentation.

see http://www.nongnu.org/grammatica/doc/manual/example.html

ArithmeticCalculator example is incomplete and even if I complete it (to make 
it compile), it does not work, raising the following exception right here


protected Node exitTerm(Production node) {

       ArrayList  values = getChildValues(node);
       Integer    value1;
       Integer    value2;
       String     op;
       int        result;
if (values.size() == 1) {
           result = ((Integer) values.get(0)).intValue();
       } else {
           value1 = (Integer) values.get(0);  <== here
           value2 = (Integer) values.get(2);
           op = (String) values.get(1);
           result = operate(op, value1, value2);
       }
       node.addValue(new Integer(result));
       return node;
   }

too sad :( a single complete example even in the distribution tarball would be great

K.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]