proai
unread,May 20, 2009, 2:49:21 AM5/20/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to link-grammar
Just to see what the differences are I wrote a quick BNF parser using
Irony for the dictionary and wow, they are very different. the UTF8
Chars made my parser very unhappy. The old dictionary (4.1) parses no
problem the new one makes defining a valid identifer a bit tricky but
since you guys are making a word processor I can see why you took that
route.
the errors I am getting using MingW32 are:
api.c: In function `post_process_linkages':
api.c:872: error: implicit declaration of function `rand_r'
api.c:872: warning: nested extern declaration of `rand_r'
api.c: In function `sentence_create':
api.c:996: error: implicit declaration of function `bzero'
api.c:996: warning: nested extern declaration of `bzero'
make[2]: *** [api.lo] Error 1
make[2]: Leaving directory `/f/apps/ai/linkgrammar-01-22-07/link-
grammar-4.5.5/link-grammar'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/f/apps/ai/linkgrammar-01-22-07/link-
grammar-4.5.5/link-grammar'
make: *** [all-recursive] Error 1
If anyone is interested, here is the code for an irony LinkGrammar
Grammar (needs some work to read a 4.5.5 dictionary though:
var singleLineComment = new CommentTerminal
("SingleLineComment", "%", "\r", "\n", "\u2085", "\u2028", "\u2029");
NonGrammarTerminals.Add(singleLineComment);
var identifier = new IdentifierTerminal("identifier", "+-
*._,", "‘0123456789-@/’'$");
var literal = new StringLiteral("qouted","\"");
var ruleExpr = new NonTerminal("ruleExpr");
var expr = new NonTerminal("exression", typeof
(StatementListNode));
var binaryExpression = new NonTerminal("binaryExpression",
typeof(BinExprNode));
var binaryOperator = new NonTerminal("binaryOperator");
var identifierList = new NonTerminal("identifierList");
var expressionList = new NonTerminal("expressionList");
var term = new NonTerminal("term");
term.Rule = identifier | "<" + identifier + ">" | literal;
identifierList.Rule = term | term + identifierList;
expr.Rule = identifierList + ":" + ruleExpr + ";";
binaryOperator.Rule = Symbol("&") | "or";
ruleExpr.Rule = term | binaryExpression | "(" + ruleExpr +
")" | "{" + ruleExpr + "}" | "[" + ruleExpr + "]" | "()";
binaryExpression.Rule = ruleExpr + binaryOperator +
ruleExpr;
expressionList.Rule = expr | expr + expressionList;
Root = expressionList;
RegisterOperators(1, "&", "or");
RegisterPunctuation("(", ")");
RegisterPunctuation("[", "]");
RegisterPunctuation("{", "}");
RegisterPunctuation(";");
RegisterPunctuation(NewLine);
Delimiters = "{}[]();:";