summaryrefslogtreecommitdiff
path: root/src/editor/simple/gf_abs.js
diff options
context:
space:
mode:
authorhallgren <hallgren@chalmers.se>2011-09-27 18:40:09 +0000
committerhallgren <hallgren@chalmers.se>2011-09-27 18:40:09 +0000
commit667b37f418f3c8bdde227c7491bc5a2a00d18947 (patch)
tree5bf5e576a869ec01b9840970c78d3f4bfd252fc6 /src/editor/simple/gf_abs.js
parent64beaae58ff303892e553b9744ccf3c1651a08b9 (diff)
gfse: work in progress on support for example-based grammar writing
Diffstat (limited to 'src/editor/simple/gf_abs.js')
-rw-r--r--src/editor/simple/gf_abs.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/editor/simple/gf_abs.js b/src/editor/simple/gf_abs.js
index bd3db7d93..4efaab89a 100644
--- a/src/editor/simple/gf_abs.js
+++ b/src/editor/simple/gf_abs.js
@@ -14,6 +14,18 @@ function defined_funs(g) {
return df;
}
+function function_type(g,fun) {
+ with(g.abstract)
+ for(var i in funs) if(funs[i].name==fun) return funs[i].type
+ return null;
+}
+
+function cat_lincat(conc,cat) {
+ with(conc)
+ for(var i in lincats) if(lincats[i].cat==cat) return lincats[i].type
+ return null;
+}
+
function rename_category(g,oldcat,newcat) {
function rename_cats(cats) {
for(var i in cats) if(cats[i]==oldcat) cats[i]=newcat;