[more docs bjorn@bringert.net**20041026140010] < > { hunk ./doc/gf-java.html 5 -Using GF grammars in Java and OAA hunk ./doc/gf-java.html 6 +Using GF grammars in Java and OAA hunk ./doc/gf-java.html 19 -

GF

- hunk ./doc/gf-java.html 23 -

- -

This system

- -

hunk ./doc/gf-java.html 27 -

OAA

- -

-The Open Agent Architecture -(OAA) is "a framework for integrating a community of heterogeneous -software agents in a distributed environment". -

- hunk ./doc/gf-java.html 41 -

Java API

+

Download

hunk ./doc/gf-java.html 43 -

JavaDoc

+

Simple example

hunk ./doc/gf-java.html 45 +

Java API

+ hunk ./doc/gf-java.html 54 -The OAA agent declares these solvables: +The OAA solvables declared by the GF OAA interface +is described in "GF OAA interface". hunk ./doc/gf-java.html 58 -

parse

hunk ./doc/gf-java.html 59 -

parse(Grammar,Lang,Text,Tree)

- -

Parameters

- -
-
Grammar
-
The name of the grammar.
- -
Lang
-
The name of the concrete syntax that should be used for -parsing. If Lang is not instantiated, the parser -will try all available languages in the given grammar, -and return results for each language that the text can be parsed in.
- -
Text
-
The text to parse. Must be instantiated.
- -
Tree
-
The parse tree. Normally not instantiated. -The parse tree from the parser is unified with -this value. Parse trees are represented as ICL structs. -
-
- -

Examples

- - - -

linearize

- -

linearize(Grammar,Lang,Tree,Text)

- -

Parameters

- -
-
Grammar
-
The name of the grammar.
- -
Lang
-
The name of the concrete syntax that should be used for linearization. -If Lang is not instantiated, linearizations for -all available languages in the given grammar will -be returned.
- - -
Tree
-
The abstract syntax tree to linearize. Must be instantiated.
- -
Text
-
The linearization of the given tree.
- -
- - -

Examples

- - - - -

translate

- -

translate(Grammar,FromLang,Input,ToLang,Output)

- -

Parameters

- -
-
Grammar
-
The name of the grammar.
- -
FromLang
-
The name of the concrete syntax that should be used for parsing the input text. -If Lang is not instantiated, all available languages in the given grammar will -be tried.
- -
Input
-
The input text. Must be instantiated.
- -
ToLang
-
The name of the concrete syntax that should be used for linearizing the output.
- -
Output
-
The output text. Normally not instantiated.
- -
- - -

Examples

- - - -

Typed abstract syntax trees in Java

+

Typed abstract syntax trees

addfile ./doc/gf-oaa.html hunk ./doc/gf-oaa.html 1 - + + + + + +GF OAA interface + + + + +

GF OAA interface

+ +

Björn Bringert, +bringert@cs.chalmers.se +

+ +

Introduction

+ +

+The Open Agent Architecture +(OAA) is "a framework for integrating a community of heterogeneous +software agents in a distributed environment". +

+ +

Solvables

+ +

+The OAA agent declares these solvables: +

+ +

parse

+ +

parse(Grammar,Lang,Text,Tree)

+ +

Parameters

+ +
+
Grammar
+
The name of the grammar.
+ +
Lang
+
The name of the concrete syntax that should be used for +parsing. If Lang is not instantiated, the parser +will try all available languages in the given grammar, +and return results for each language that the text can be parsed in.
+ +
Text
+
The text to parse. Must be instantiated.
+ +
Tree
+
The parse tree. Normally not instantiated. +The parse tree from the parser is unified with +this value. Parse trees are represented as ICL structs. +
+
+ +

Examples

+ + + +

linearize

+ +

linearize(Grammar,Lang,Tree,Text)

+ +

Parameters

+ +
+
Grammar
+
The name of the grammar.
+ +
Lang
+
The name of the concrete syntax that should be used for linearization. +If Lang is not instantiated, linearizations for +all available languages in the given grammar will +be returned.
+ + +
Tree
+
The abstract syntax tree to linearize. Must be instantiated.
+ +
Text
+
The linearization of the given tree.
+ +
+ + +

Examples

+ + + + +

translate

+ +

translate(Grammar,FromLang,Input,ToLang,Output)

+ +

Parameters

+ +
+
Grammar
+
The name of the grammar.
+ +
FromLang
+
The name of the concrete syntax that should be used for parsing the input text. +If Lang is not instantiated, all available languages in the given grammar will +be tried.
+ +
Input
+
The input text. Must be instantiated.
+ +
ToLang
+
The name of the concrete syntax that should be used for linearizing the output.
+ +
Output
+
The output text. Normally not instantiated.
+ +
+ + +

Examples

+ + + + + hunk ./se/chalmers/cs/gf/parse/chart/CFGGrammars.java 18 +/** + * A collection of CF grammars. + */ hunk ./se/chalmers/cs/gf/parse/chart/CFGParsers.java 7 +/** + * A collection of chart parsers for a collection of CF grammars. + */ hunk ./se/chalmers/cs/gf/parse/chart/CFGrammar.java 7 +/** + * A context-free grammar. + */ hunk ./se/chalmers/cs/gf/parse/chart/Category.java 3 +/** + * A CF grammar category. + */ hunk ./se/chalmers/cs/gf/parse/chart/Edge.java 3 +/** + * Base class for edges in a parse chart. + */ hunk ./se/chalmers/cs/gf/parse/chart/EmptyEdge.java 3 +/** + * An edge produced by an empty rule. + */ hunk ./se/chalmers/cs/gf/parse/chart/EmptyRule.java 5 +/** + * An empty CF grammar production. + */ hunk ./se/chalmers/cs/gf/parse/chart/IntLiteralRule.java 7 +/** + * A CF grammar production whose right hand side is a single int literal. + */ hunk ./se/chalmers/cs/gf/parse/chart/NonTerminalEdge.java 3 +/** + * A parse chart edge produced by a non-terminal rule. + */ hunk ./se/chalmers/cs/gf/parse/chart/NonTerminalRule.java 5 +/** + * A CF grammar prodcution whose right hand side is a list of non-terminals. + */ hunk ./se/chalmers/cs/gf/parse/chart/Symbol.java 3 +/** + * A CF grammar symbol, terminal or non-terminal. + */ hunk ./se/chalmers/cs/gf/parse/chart/Terminal.java 3 +/** + * A CF grammar terminal. + */ }