Skip to content

Commit

Permalink
now works from the ASF+SDF MetaEnvironment as well (always make clean…
Browse files Browse the repository at this point in the history
… beforehand!)

git-svn-id: https://slps.svn.sourceforge.net/svnroot/slps@214 ab42f6e0-554d-0410-b580-99e487e6eeb2
  • Loading branch information
grammarware committed Aug 25, 2008
1 parent 636773d commit 2b22c50
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
24 changes: 0 additions & 24 deletions topics/fl/asfsdf/Calculator.sdf

This file was deleted.

2 changes: 1 addition & 1 deletion topics/fl/asfsdf/FL.sdf
Expand Up @@ -2,7 +2,7 @@ module FL

imports Syntax
imports Optimiser
imports Calculator
imports Numbers

exports
context-free start-symbols
Expand Down
8 changes: 4 additions & 4 deletions topics/fl/asfsdf/Makefile
Expand Up @@ -5,13 +5,13 @@ testcase = ../shared/factorial.txt

all: FL.tbl FL.eqs test

FL.eqs: Optimiser.asf Calculator.asf
FL.eqs: Optimiser.asf Numbers.asf
eqs-dump -m Optimiser -o Optimiser.eqs
eqs-dump -m Calculator -o Calculator.eqs
eqs-dump -m Numbers -o Numbers.eqs
@LDIR=${PWD} ; cd ${asfl} ; eqs-dump -m basic/Integers -o $$LDIR/Integers.eqs
concat-asf -o FL.eqs Optimiser.eqs Integers.eqs Calculator.eqs
concat-asf -o FL.eqs Optimiser.eqs Integers.eqs Numbers.eqs

FL.tbl: FL.sdf Syntax.sdf Numbers.sdf Optimiser.sdf Calculator.sdf
FL.tbl: FL.sdf Syntax.sdf Numbers.sdf Optimiser.sdf
@if [ -r /usr/local/bin/pack-sdf ]; then \
make packbuild ; \
else \
Expand Down
File renamed without changes.
16 changes: 13 additions & 3 deletions topics/fl/asfsdf/Numbers.sdf
Expand Up @@ -4,10 +4,20 @@ imports basic/Integers
imports basic/Whitespace

exports
sorts
context-free start-symbols
Int
sorts
Int
context-free syntax
add-int(Int,Int) -> Int
toInt(Integer) -> Int
lexical syntax
"-"? NatCon -> Int
"-"? NatCon -> Int

hiddens
context-free start-symbols Int
variables
"&N" [0-9]* -> NatCon
"&I" [0-9]* -> Int
"&H" [0-9]* -> Integer
lexical variables
"&LN" [0-9]* -> [0-9]+
2 changes: 1 addition & 1 deletion topics/fl/asfsdf/Optimiser.sdf
@@ -1,7 +1,7 @@
module Optimiser

imports Syntax
imports Calculator
imports Numbers

hiddens
context-free start-symbols Program
Expand Down

0 comments on commit 2b22c50

Please sign in to comment.