From eff7fdcfc8dd70bb3540c9d0d9f75f280f0cfad7 Mon Sep 17 00:00:00 2001 From: grammarware Date: Sat, 6 Oct 2012 00:08:56 +0200 Subject: [PATCH] co-evolution of the Grammar Zoo --- shared/python/BGF3.py | 4 ++++ topics/export/hypertext/bgf2fancy.xslt | 4 ++-- topics/mutation/horizontal/hor.py | 12 ++++++------ 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/shared/python/BGF3.py b/shared/python/BGF3.py index 51700305..3381d7af 100755 --- a/shared/python/BGF3.py +++ b/shared/python/BGF3.py @@ -126,6 +126,10 @@ def parse(self,exprelem): self.wrapped = Plus() elif expr.tag == 'star': self.wrapped = Star() + elif expr.tag == 'seplistplus': + self.wrapped = SepListPlus() + elif expr.tag == 'sepliststar': + self.wrapped = SepListStar() else: print("Don't know how to parse",expr.tag) return diff --git a/topics/export/hypertext/bgf2fancy.xslt b/topics/export/hypertext/bgf2fancy.xslt index 33cad6ec..9102ac00 100644 --- a/topics/export/hypertext/bgf2fancy.xslt +++ b/topics/export/hypertext/bgf2fancy.xslt @@ -62,10 +62,10 @@ , see - Grammar Tank + Grammar Tank - Grammar Zoo + Grammar Zoo for details. diff --git a/topics/mutation/horizontal/hor.py b/topics/mutation/horizontal/hor.py index 8216a589..8f88a0ba 100755 --- a/topics/mutation/horizontal/hor.py +++ b/topics/mutation/horizontal/hor.py @@ -1,16 +1,16 @@ -#!/usr/local/bin/python +#!/Library/Frameworks/Python.framework/Versions/3.1/bin/python3 # -*- coding: utf-8 -*- import os,sys sys.path.append(os.getcwd().split('projects')[0]+'projects/slps/shared/python') -import BGF +import BGF3 if __name__ == "__main__": if len(sys.argv) != 3: - print 'This tool generates an XBGF script to horizontalize all vertical nonterminals present in the grammar.' - print 'Usage:' - print ' '+sys.argv[0]+'