From 98e916831a97df96ced70befb23650ed53d8ef6b Mon Sep 17 00:00:00 2001
From: aarne The GFCC Grammar Format
Aarne Ranta
-October 3, 2006
+October 19, 2006
http://www.cs.chalmers.se/~aarne
+History: +
+@@ -629,6 +638,39 @@ To avoid the code bloat resulting from this, we chose the alias representation which is easy enough to deal with in interpreters.
+
+Linearization types (lincat) are not needed when generating with
+GFCC, but they have been added to enable parser generation directly from
+GFCC. The linearization type definitions are shown as a part of the
+concrete syntax, by using terms to represent types. Here is the table
+showing how different linearization types are encoded.
+
+ P* = size(P) -- parameter type
+ {_ : I ; __ : R}* = (I* @ R*) -- record of parameters
+ {r1 : T1 ; ... ; rn : Tn}* = [T1*,...,Tn*] -- other record
+ (P => T)* = [T* ,...,T*] -- size(P) times
+ Str* = ()
+
+
+The category symbols are prefixed with two underscores (__).
+For example, the linearization type present/CatEng.NP is
+translated as follows:
+
+ NP = {
+ a : { -- 6 = 2*3 values
+ n : {ParamX.Number} ; -- 2 values
+ p : {ParamX.Person} -- 3 values
+ } ;
+ s : {ResEng.Case} => Str -- 3 values
+ }
+
+ __NP = [(6@[2,3]),[(),(),()]]
+
+
+
GFCC generation is a part of the @@ -649,7 +691,7 @@ Here is an example, performed in pm -printer=gfcc | wf bronze.gfcc
- +The reference interpreter written in Haskell consists of the following files: @@ -705,7 +747,7 @@ The available commands are
quit: terminate the system cleanly
-
+
A base-line interpreter in C++ has been started. @@ -741,7 +783,7 @@ Ubuntu Linux laptop with 1.5 GHz Intel centrino processor.
Interpreter in Java. -- cgit v1.2.3