506: Remove scool compiler.

https://svn.lrde.epita.fr/svn/oln/trunk Index: ChangeLog from Quentin Hocquet <quentin.hocquet@lrde.epita.fr> Remove scool compiler. Scool compiler has been moved into its own repository. * tools: Remove. * tools/test.yml: Remove. * tools/tests: Remove. * tools/tests/syntax error: Remove. * tools/tests/syntax error/wrong.scl: Remove. * tools/tests/parse-ref: Remove. * tools/tests/parse-ref/vardec.ref: Remove. * tools/tests/parse-ref/fundec.ref: Remove. * tools/tests/parse-ref/funcall_no-args.ref: Remove. * tools/tests/parse-ref/empty-class_dec.ref: Remove. * tools/tests/parse-ref/varinit.ref: Remove. * tools/tests/parse-ref/emtpy-class_dec.ref: Remove. * tools/tests/parse-ref/no-args_funtype.ref: Remove. * tools/tests/parse-ref/class_dec.ref: Remove. * tools/tests/parse-ref/manydec.ref: Remove. * tools/tests/parse-ref/wiki1.ref: Remove. * tools/tests/parse-ref/bi-exp.ref: Remove. * tools/tests/parse-ref/funcall.ref: Remove. * tools/tests/parse-ref/wiki2.ref: Remove. * tools/tests/parse-ref/function.ref: Remove. * tools/tests/parse-ref/consinit.ref: Remove. * tools/tests/parse-ref/wiki3.ref: Remove. * tools/tests/parse-ref/funtype.ref: Remove. * tools/tests/parse-ref/empty.ref: Remove. * tools/tests/parse-ref/type_static-call.ref: Remove. * tools/tests/parse-ref/guard.ref: Remove. * tools/tests/good: Remove. * tools/tests/good/type_static-call.scl: Remove. * tools/tests/good/guard.scl: Remove. * tools/tests/good/vardec.scl: Remove. * tools/tests/good/fundec.scl: Remove. * tools/tests/good/funcall_no-args.scl: Remove. * tools/tests/good/varinit.scl: Remove. * tools/tests/good/empty-class_dec.scl: Remove. * tools/tests/good/manydec.scl: Remove. * tools/tests/good/no-args_funtype.scl: Remove. * tools/tests/good/class_dec.scl: Remove. * tools/tests/good/wiki1.scl: Remove. * tools/tests/good/funcall.scl: Remove. * tools/tests/good/bi-exp.scl: Remove. * tools/tests/good/function.scl: Remove. * tools/tests/good/wiki2.scl: Remove. * tools/tests/good/consinit.scl: Remove. * tools/tests/good/wiki3.scl: Remove. * tools/tests/good/funtype.scl: Remove. * tools/tests/good/empty.scl: Remove. * tools/transformer: Remove. * tools/transformer/scoolc.str: Remove. * tools/transformer/Makefile: Remove. * tools/scoolc: Remove. * tools/gen.yml: Remove. * tools/parser: Remove. * tools/parser/grammar: Remove. * tools/parser/grammar/Class.sdf: Remove. * tools/parser/grammar/Decl.sdf: Remove. * tools/parser/grammar/Exp.sdf: Remove. * tools/parser/grammar/Scool.sdf: Remove. * tools/parser/grammar/ExpOrType.sdf: Remove. * tools/parser/grammar/Type.sdf: Remove. * tools/parser/grammar/Lexical.sdf: Remove. * tools/parser/grammar/Guard.sdf: Remove. * tools/parser/grammar/Stm.sdf: Remove. * tools/parser/parse-scool: Remove. * tools/parser/Makefile: Remove. * tools/Makefile: Remove. Makefile | 14 ---------- gen.yml | 9 ------ parser/Makefile | 20 -------------- parser/grammar/Class.sdf | 18 ------------- parser/grammar/Decl.sdf | 48 ----------------------------------- parser/grammar/Exp.sdf | 43 ------------------------------- parser/grammar/ExpOrType.sdf | 12 -------- parser/grammar/Guard.sdf | 10 ------- parser/grammar/Lexical.sdf | 28 -------------------- parser/grammar/Scool.sdf | 11 -------- parser/grammar/Stm.sdf | 17 ------------ parser/grammar/Type.sdf | 18 ------------- parser/parse-scool | 8 ----- scoolc | 4 -- test.yml | 18 ------------- tests/good/bi-exp.scl | 1 tests/good/class_dec.scl | 15 ---------- tests/good/consinit.scl | 1 tests/good/empty-class_dec.scl | 1 tests/good/funcall.scl | 4 -- tests/good/funcall_no-args.scl | 4 -- tests/good/function.scl | 4 -- tests/good/fundec.scl | 2 - tests/good/funtype.scl | 1 tests/good/guard.scl | 1 tests/good/manydec.scl | 4 -- tests/good/no-args_funtype.scl | 1 tests/good/type_static-call.scl | 1 tests/good/vardec.scl | 1 tests/good/varinit.scl | 1 tests/good/wiki1.scl | 9 ------ tests/good/wiki2.scl | 5 --- tests/good/wiki3.scl | 9 ------ tests/parse-ref/bi-exp.ref | 1 tests/parse-ref/class_dec.ref | 1 tests/parse-ref/consinit.ref | 1 tests/parse-ref/empty-class_dec.ref | 1 tests/parse-ref/empty.ref | 1 tests/parse-ref/funcall.ref | 1 tests/parse-ref/funcall_no-args.ref | 1 tests/parse-ref/function.ref | 1 tests/parse-ref/fundec.ref | 1 tests/parse-ref/funtype.ref | 1 tests/parse-ref/guard.ref | 1 tests/parse-ref/manydec.ref | 1 tests/parse-ref/no-args_funtype.ref | 1 tests/parse-ref/type_static-call.ref | 1 tests/parse-ref/vardec.ref | 1 tests/parse-ref/varinit.ref | 1 tests/parse-ref/wiki1.ref | 1 tests/parse-ref/wiki2.ref | 1 tests/parse-ref/wiki3.ref | 1 tests/syntax | 1 transformer/Makefile | 6 ---- transformer/scoolc.str | 6 ---- 55 files changed, 375 deletions(-) Index: tools/test.yml --- tools/test.yml (revision 505) +++ tools/test.yml (working copy) @@ -1,18 +0,0 @@ ---- -Test of the Scool parser: !S::Suite - contents: - - Valid input tests: !S::Iterate - over: !pathlist <<pwd>>/tests/good/(*).scl - iter: [it_file, it_name] - test: - Test <<it_name>>: !S::Cmd - command: parser/parse-scool "<<it_file>>" - exit: 0 - output: !path "tests/parse-ref/<<it_name>>.ref" - - Wrong input tests: !S::Iterate - over: !pathlist "<<pwd>>/tests/syntax error/(*).scl" - iter: [it_file, it_name] - test: - Test <<it_name>>: !S::Cmd - command: parser/parse-scool "<<it_file>>" - exit: 1 Index: tools/tests/syntax error/wrong.scl --- tools/tests/syntax error/wrong.scl (revision 505) +++ tools/tests/syntax error/wrong.scl (working copy) @@ -1 +0,0 @@ -var i::int; Index: tools/tests/parse-ref/vardec.ref --- tools/tests/parse-ref/vardec.ref (revision 505) +++ tools/tests/parse-ref/vardec.ref (working copy) @@ -1 +0,0 @@ -Program([VarDec("i",Var("int"))]) Index: tools/tests/parse-ref/fundec.ref --- tools/tests/parse-ref/fundec.ref (revision 505) +++ tools/tests/parse-ref/fundec.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("f",[("a",Var("int")),("b",Var("int"))],Var("bool"),[])]) Index: tools/tests/parse-ref/funcall_no-args.ref --- tools/tests/parse-ref/funcall_no-args.ref (revision 505) +++ tools/tests/parse-ref/funcall_no-args.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("doit",[],Var("int"),[Return(FunCall("chiche",[]))])]) Index: tools/tests/parse-ref/empty-class_dec.ref --- tools/tests/parse-ref/empty-class_dec.ref (revision 505) +++ tools/tests/parse-ref/empty-class_dec.ref (working copy) @@ -1 +0,0 @@ -Program([ConsDec("foo",Class,Class([]))]) Index: tools/tests/parse-ref/varinit.ref --- tools/tests/parse-ref/varinit.ref (revision 505) +++ tools/tests/parse-ref/varinit.ref (working copy) @@ -1 +0,0 @@ -Program([VarDec("i",Var("int"),Int("42"))]) Index: tools/tests/parse-ref/emtpy-class_dec.ref Index: tools/tests/parse-ref/no-args_funtype.ref --- tools/tests/parse-ref/no-args_funtype.ref (revision 505) +++ tools/tests/parse-ref/no-args_funtype.ref (working copy) @@ -1 +0,0 @@ -Program([VarDec("f",FunType([],Var("void")))]) Index: tools/tests/parse-ref/class_dec.ref --- tools/tests/parse-ref/class_dec.ref (revision 505) +++ tools/tests/parse-ref/class_dec.ref (working copy) @@ -1 +0,0 @@ -Program([ConsDec("point",Class,Class([Accessblock(Public,[FunDec("x",[],Var("int"),[Return(Var("x"))])]),Accessblock(Private,[VarDec("x",Var("int")),VarDec("y",Var("int"))])]))]) Index: tools/tests/parse-ref/manydec.ref --- tools/tests/parse-ref/manydec.ref (revision 505) +++ tools/tests/parse-ref/manydec.ref (working copy) @@ -1 +0,0 @@ -Program([ConsDec("answer",Var("int"),Int("42")),VarDec("i",Var("int")),VarDec("j",Var("int"),Var("i"))]) Index: tools/tests/parse-ref/wiki1.ref --- tools/tests/parse-ref/wiki1.ref (revision 505) +++ tools/tests/parse-ref/wiki1.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("f",[],Var("void"),[ConsDec("i",Var("int16"),Int("3")),ExpStm(Affect(Var("i"),Int("4"))),VarDec("j",Var("int16"),Int("3")),ExpStm(Affect(Var("j"),Int("4")))])]) Index: tools/tests/parse-ref/bi-exp.ref --- tools/tests/parse-ref/bi-exp.ref (revision 505) +++ tools/tests/parse-ref/bi-exp.ref (working copy) @@ -1 +0,0 @@ -Program([ConsDec("i",Var("int"),BiFunCall("pow",[Int("4")],[Int("3")]))]) Index: tools/tests/parse-ref/funcall.ref --- tools/tests/parse-ref/funcall.ref (revision 505) +++ tools/tests/parse-ref/funcall.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("doit",[],Var("int"),[Return(FunCall("chiche",[String("\"pelle\""),String("\"branle\"")]))])]) Index: tools/tests/parse-ref/wiki2.ref --- tools/tests/parse-ref/wiki2.ref (revision 505) +++ tools/tests/parse-ref/wiki2.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("f",[],Var("void"),[VarDec("a",StaticFunCall("array",[Int("2"),Var("int16")])),VarDec("i",Var("int16"),MethodCall("a","at",[Int("0")]))])]) Index: tools/tests/parse-ref/function.ref --- tools/tests/parse-ref/function.ref (revision 505) +++ tools/tests/parse-ref/function.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("answer",[],Var("int"),[Return(Int("42"))])]) Index: tools/tests/parse-ref/consinit.ref --- tools/tests/parse-ref/consinit.ref (revision 505) +++ tools/tests/parse-ref/consinit.ref (working copy) @@ -1 +0,0 @@ -Program([ConsDec("i",Var("int"),Int("3"))]) Index: tools/tests/parse-ref/wiki3.ref --- tools/tests/parse-ref/wiki3.ref (revision 505) +++ tools/tests/parse-ref/wiki3.ref (working copy) @@ -1 +0,0 @@ -Program([FunDec("f",[],Var("void"),[VarDec("i",Var("int")),VarDec("j",Var("int")),ExpStm(Affect(Var("i"),Int("0"))),ExpStm(Affect(Var("j"),Var("i"))),ExpStm(Affect(Var("i"),Sum(Var("j"),Var("i"))))])]) Index: tools/tests/parse-ref/funtype.ref --- tools/tests/parse-ref/funtype.ref (revision 505) +++ tools/tests/parse-ref/funtype.ref (working copy) @@ -1 +0,0 @@ -Program([VarDec("f",FunType([Var("int"),Var("bool")],Var("float")))]) Index: tools/tests/parse-ref/empty.ref --- tools/tests/parse-ref/empty.ref (revision 505) +++ tools/tests/parse-ref/empty.ref (working copy) @@ -1 +0,0 @@ -Program([]) Index: tools/tests/parse-ref/type_static-call.ref --- tools/tests/parse-ref/type_static-call.ref (revision 505) +++ tools/tests/parse-ref/type_static-call.ref (working copy) @@ -1 +0,0 @@ -Program([VarDec("l",StaticFunCall("list",[Var("int")]))]) Index: tools/tests/parse-ref/guard.ref --- tools/tests/parse-ref/guard.ref (revision 505) +++ tools/tests/parse-ref/guard.ref (working copy) @@ -1 +0,0 @@ -Program([BiFunDec("f",[("i",Var("int"),Guard(Sup(Var("i"),Int("0"))))],[],Var("int"),[])]) Index: tools/tests/good/type_static-call.scl --- tools/tests/good/type_static-call.scl (revision 505) +++ tools/tests/good/type_static-call.scl (working copy) @@ -1 +0,0 @@ -var l : list[int]; Index: tools/tests/good/guard.scl --- tools/tests/good/guard.scl (revision 505) +++ tools/tests/good/guard.scl (working copy) @@ -1 +0,0 @@ -f : [i : int where i > 0]() -> int = {} \ No newline at end of file Index: tools/tests/good/vardec.scl --- tools/tests/good/vardec.scl (revision 505) +++ tools/tests/good/vardec.scl (working copy) @@ -1 +0,0 @@ -var i : int; Index: tools/tests/good/fundec.scl --- tools/tests/good/fundec.scl (revision 505) +++ tools/tests/good/fundec.scl (working copy) @@ -1,2 +0,0 @@ -f : (a: int, b : int) -> bool = -{} Index: tools/tests/good/funcall_no-args.scl --- tools/tests/good/funcall_no-args.scl (revision 505) +++ tools/tests/good/funcall_no-args.scl (working copy) @@ -1,4 +0,0 @@ -doit : () -> int = -{ - -> foo(); -} \ No newline at end of file Index: tools/tests/good/varinit.scl --- tools/tests/good/varinit.scl (revision 505) +++ tools/tests/good/varinit.scl (working copy) @@ -1 +0,0 @@ -var i : int := 42; Index: tools/tests/good/empty-class_dec.scl --- tools/tests/good/empty-class_dec.scl (revision 505) +++ tools/tests/good/empty-class_dec.scl (working copy) @@ -1 +0,0 @@ -foo : class = {}; \ No newline at end of file Index: tools/tests/good/manydec.scl --- tools/tests/good/manydec.scl (revision 505) +++ tools/tests/good/manydec.scl (working copy) @@ -1,4 +0,0 @@ -answer : int = 42; - -var i : int; -var j : int := i; Index: tools/tests/good/no-args_funtype.scl --- tools/tests/good/no-args_funtype.scl (revision 505) +++ tools/tests/good/no-args_funtype.scl (working copy) @@ -1 +0,0 @@ -var f : () -> void; \ No newline at end of file Index: tools/tests/good/class_dec.scl --- tools/tests/good/class_dec.scl (revision 505) +++ tools/tests/good/class_dec.scl (working copy) @@ -1,15 +0,0 @@ -point : class = -{ - public - { - x : () -> int = - { - -> x; - } - } - private - { - var x :int; - var y :int; - } -}; \ No newline at end of file Index: tools/tests/good/wiki1.scl --- tools/tests/good/wiki1.scl (revision 505) +++ tools/tests/good/wiki1.scl (working copy) @@ -1,9 +0,0 @@ - -f : () -> void = -{ - i : int16 = 3; - i := 4; - - var j : int16 := 3; - j := 4; -} \ No newline at end of file Index: tools/tests/good/funcall.scl --- tools/tests/good/funcall.scl (revision 505) +++ tools/tests/good/funcall.scl (working copy) @@ -1,4 +0,0 @@ -doit : () -> int = -{ - -> foo("bar", "baz"); -} \ No newline at end of file Index: tools/tests/good/bi-exp.scl --- tools/tests/good/bi-exp.scl (revision 505) +++ tools/tests/good/bi-exp.scl (working copy) @@ -1 +0,0 @@ -i : int = pow[4](3); \ No newline at end of file Index: tools/tests/good/function.scl --- tools/tests/good/function.scl (revision 505) +++ tools/tests/good/function.scl (working copy) @@ -1,4 +0,0 @@ -answer : () -> int = -{ - -> 42; -} \ No newline at end of file Index: tools/tests/good/wiki2.scl --- tools/tests/good/wiki2.scl (revision 505) +++ tools/tests/good/wiki2.scl (working copy) @@ -1,5 +0,0 @@ -f : () -> void = -{ - var a : array[2,int16]; - var i : int16 := a.at(0); -} Index: tools/tests/good/consinit.scl --- tools/tests/good/consinit.scl (revision 505) +++ tools/tests/good/consinit.scl (working copy) @@ -1 +0,0 @@ -i : int = 3; \ No newline at end of file Index: tools/tests/good/wiki3.scl --- tools/tests/good/wiki3.scl (revision 505) +++ tools/tests/good/wiki3.scl (working copy) @@ -1,9 +0,0 @@ -f : () -> void = -{ - var i : int; - var j : int; - - i := 0; - j := i; - i := j + i; -} Index: tools/tests/good/funtype.scl --- tools/tests/good/funtype.scl (revision 505) +++ tools/tests/good/funtype.scl (working copy) @@ -1 +0,0 @@ -var f : (int, bool) -> float; \ No newline at end of file Index: tools/tests/good/empty.scl Index: tools/transformer/scoolc.str --- tools/transformer/scoolc.str (revision 505) +++ tools/transformer/scoolc.str (working copy) @@ -1,6 +0,0 @@ -module scoolc - -imports liblib Scool - -strategies - main = io-wrap(id) Index: tools/transformer/Makefile --- tools/transformer/Makefile (revision 505) +++ tools/transformer/Makefile (working copy) @@ -1,6 +0,0 @@ - -scoolc: scoolc.str - strc -i $< -I ../parser -la stratego-lib - -clean: - rm -rf scoolc scoolc.dep scoolc.o scoolc.c .libs Index: tools/scoolc --- tools/scoolc (revision 505) +++ tools/scoolc (working copy) @@ -1,4 +0,0 @@ -#!/bin/sh -# -*- sh -*- - -parser/parse-scool $1 | transformer/scoolc Index: tools/gen.yml --- tools/gen.yml (revision 505) +++ tools/gen.yml (working copy) @@ -1,9 +0,0 @@ ---- -Autogeneration of the Scool parser references: !S::Suite - contents: - - Generation: !S::Iterate - over: !pathlist <<pwd>>/tests/good/(*).scl - iter: [it_file, it_name] - test: - Generation <<it_name>>: !S::Cmd - command: parser/parse-scool "<<it_file>>" > "<<pwd>>/tests/good/<<it_name>>.ref" Index: tools/parser/grammar/Class.sdf --- tools/parser/grammar/Class.sdf (revision 505) +++ tools/parser/grammar/Class.sdf (working copy) @@ -1,18 +0,0 @@ -module Class - -imports - Lexical Decl - -exports - sorts Class AccessBlock AccessModifier - context-free syntax - "{" AccessBlock* "}" -> Class {cons("Class")} - - AccessModifier "{" Decl* "}" -> AccessBlock {cons("Accessblock")} - - "public" -> AccessModifier {cons("Public")} - "protected" -> AccessModifier {cons("Protected")} - "private" -> AccessModifier {cons("Private")} - - lexical restrictions - AccessModifier -/- [A-Za-z] Index: tools/parser/grammar/Decl.sdf --- tools/parser/grammar/Decl.sdf (revision 505) +++ tools/parser/grammar/Decl.sdf (working copy) @@ -1,48 +0,0 @@ -module Decl - -imports - Lexical Type Guard Stm - -exports - sorts Decl - context-free syntax - - "var" Id ":" Type ";" -> Decl {cons("VarDec")} - "var" Id ":" Type ":=" Exp ";" -> Decl {cons("VarDec")} - Id ":" Type "=" Exp ";" -> Decl {cons("ConsDec")} - Id ":" Type ";" -> Decl {cons("ConsDec")} - - Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type - "=" "{" Stm* "}" -> Decl {cons("FunDec")} - - Id ":" "[" {(Id ":" Type Guard) ","}* "]" "->" Type - "=" "{" Stm* "}" -> Decl {cons("StaticFunDec")} - - Id ":" "[" {(Id ":" Type Guard) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type - "=" "{" Stm* "}" -> Decl {cons("BiFunDec")} - - Id ":" "(" {(Id ":" Type) ","}* ")" "->" Type - "=>" Exp -> Decl {cons("FunDec")} - - Id ":" "[" {(Id ":" Type Guard) ","}* "]" "->" Type - "=>" Exp -> Decl {cons("StaticFunDec")} - - Id ":" "[" {(Id ":" Type Guard) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type - "=>" Exp -> Decl {cons("BiFunDec")} - - - "decl" Id ":" "(" {(Type | (Id ":" Type)) ","}* ")" - "->" Type ";" -> Decl {cons("FunPreDec")} - - - Id ":" "[" {(Id ":" Type) ","}* "]" "->" Type - "=" "{" Stm* "}" -> Decl {cons("StaticFunDec")} - - Id ":" "[" {(Id ":" Type) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type - "=" "{" Stm* "}" -> Decl {cons("BiFunDec")} - - Id ":" "[" {(Id ":" Type) ","}* "]" "->" Type - "=>" Exp -> Decl {cons("StaticFunDec")} - - Id ":" "[" {(Id ":" Type) ","}* "]" "(" {(Id ":" Type) ","}* ")" "->" Type - "=>" Exp -> Decl {cons("BiFunDec")} \ No newline at end of file Index: tools/parser/grammar/Exp.sdf --- tools/parser/grammar/Exp.sdf (revision 505) +++ tools/parser/grammar/Exp.sdf (working copy) @@ -1,43 +0,0 @@ -module Exp - -imports - Lexical Type ExpOrType Class - -exports - sorts Exp - context-free syntax - - ExpOrType -> Exp - Int -> Exp {cons("Int")} - String -> Exp {cons("String")} - Id "(" {Exp ","}* ")" -> Exp {cons("FunCall")} - Id "[" {Exp ","}* "]" - "(" {Exp ","}* ")" -> Exp {cons("BiFunCall")} - Exp "+" Exp -> Exp {cons("Sum")} - Exp "-" Exp -> Exp {cons("Sub")} - Exp "*" Exp -> Exp {cons("Mul")} - Exp "/" Exp -> Exp {cons("Div")} - Exp "=" Exp -> Exp {cons("Eq")} - Exp "!=" Exp -> Exp {cons("Neq")} - Exp "<" Exp -> Exp {cons("Inf")} - Exp ">" Exp -> Exp {cons("Sup")} - Exp ">=" Exp -> Exp {cons("SupEq")} - Exp "<=" Exp -> Exp {cons("InfEq")} - Exp ":=" Exp -> Exp {cons("Affect")} - Class -> Exp - Exp "." Id -> Exp {cons("Field")} - Id "." Id "(" {Exp ","}* ")" -> Exp {cons("MethodCall")} - - context-free priorities - - {left: - Exp "/" Exp -> Exp - Exp "*" Exp -> Exp - } -> {left: - Exp "+" Exp -> Exp - Exp "-" Exp -> Exp - } -> {right: - Exp ":=" Exp -> Exp - } \ No newline at end of file Index: tools/parser/grammar/Scool.sdf --- tools/parser/grammar/Scool.sdf (revision 505) +++ tools/parser/grammar/Scool.sdf (working copy) @@ -1,11 +0,0 @@ -module Scool - -imports - Decl - -exports - sorts Program - context-free start-symbols Program - context-free syntax - - Decl* -> Program {cons("Program")} Index: tools/parser/grammar/ExpOrType.sdf --- tools/parser/grammar/ExpOrType.sdf (revision 505) +++ tools/parser/grammar/ExpOrType.sdf (working copy) @@ -1,12 +0,0 @@ -module ExpOrType - -imports - Lexical Exp - -exports - - sorts ExpOrType - context-free syntax - Id "[" {Exp ","}* "]" -> ExpOrType {cons("StaticFunCall")} - Id -> ExpOrType {cons("Var")} - Id "::" Exp -> ExpOrType {cons("Scope")} Index: tools/parser/grammar/Type.sdf --- tools/parser/grammar/Type.sdf (revision 505) +++ tools/parser/grammar/Type.sdf (working copy) @@ -1,18 +0,0 @@ -module Type - -imports - ExpOrType - - -exports - - sorts Type - context-free syntax - - ExpOrType -> Type - "(" {Type ","}* ")" "->" Type -> Type {cons("FunType")} - "[" {Type ","}* "]" "->" Type -> Type {cons("StaticFunType")} - "[" {Type ","}* "]" - "(" {Type ","}* ")" "->" Type -> Type {cons("BiFunType")} - "class" -> Type {cons("Class")} - "class" "<" Type -> Type {cons("Class")} Index: tools/parser/grammar/Lexical.sdf --- tools/parser/grammar/Lexical.sdf (revision 505) +++ tools/parser/grammar/Lexical.sdf (working copy) @@ -1,28 +0,0 @@ -module Lexical - -exports - sorts Id Int String Asterisk Slash BlockComment CommentPart Cpp - lexical syntax - - [A-Za-z][A-Za-z0-9\_]* -> Id {cons("Id")} - [0-9]+ -> Int {cons("Int")} - "\"" [A-Za-z0-9]* "\"" -> String {cons("String")} - "//" ~[\n]* [\n] -> LAYOUT - [\ \t\n] -> LAYOUT - "/+" ~[]* "+/" -> Cpp - "class" -> Id {reject} - - BlockComment -> LAYOUT - - "/*" CommentPart* "*/" -> BlockComment - ~[\/\*] -> CommentPart - Asterisk -> CommentPart - Slash -> CommentPart - BlockComment -> CommentPart - [\/] -> Slash - [\*] -> Asterisk - - lexical restrictions - Id -/- [A-Za-z] - Asterisk -/- [\/] - Slash -/- [\*] Index: tools/parser/grammar/Guard.sdf --- tools/parser/grammar/Guard.sdf (revision 505) +++ tools/parser/grammar/Guard.sdf (working copy) @@ -1,10 +0,0 @@ -module Guard - -imports - Exp - -exports - sorts Guard - context-free syntax - - "where" Exp -> Guard {cons("Guard")} Index: tools/parser/grammar/Stm.sdf --- tools/parser/grammar/Stm.sdf (revision 505) +++ tools/parser/grammar/Stm.sdf (working copy) @@ -1,17 +0,0 @@ -module Stm - -imports - Lexical Exp Decl - -exports - sorts Stm - context-free syntax - - ";" -> Stm {cons("EmptyStm")} - Exp ";" -> Stm {cons("ExpStm")} - "->" Exp ";" -> Stm {cons("Return")} - "{" Stm* "}" -> Stm {cons("Block")} - "if" "(" Exp ")" Stm ("else" Stm)? -> Stm {cons("If")} - "while" "(" Exp ")" Stm -> Stm {cons("While")} - Decl -> Stm - Cpp -> Stm {cons("CppStm")} Index: tools/parser/parse-scool --- tools/parser/parse-scool (revision 505) +++ tools/parser/parse-scool (working copy) @@ -1,8 +0,0 @@ -#!/bin/sh -# -*- sh -*- - -if [ $# -eq 0 ]; then - echo "usage: parse-scool file.scl" -else - sglri -p parser/Scool.tbl -i $1 -fi Index: tools/parser/Makefile --- tools/parser/Makefile (revision 505) +++ tools/parser/Makefile (working copy) @@ -1,20 +0,0 @@ -SDF = $(wildcard grammar/*.sdf) -OUT = Scool - -all: Scool.def Scool.tbl Scool.str - -Scool.def: $(SDF) - pack-sdf -i grammar/Scool.sdf -o $@ - -Scool.tbl: Scool.def - sdf2table -i $< -o $@ -m Scool - -Scool.rtg: Scool.def - sdf2rtg -i $< -m Scool -o $@ - -Scool.str: Scool.rtg - rtg2sig --module Scool -i $< -o $@ - -clean: - rm -rf Scool.* log.* - Index: tools/Makefile --- tools/Makefile (revision 505) +++ tools/Makefile (working copy) @@ -1,14 +0,0 @@ -all: - cd parser && make - cd transformer && make - -clean: - rm -rf log.* - cd parser && make clean - cd transformer && make clean - -check: all - uttk test.yml - -gen: all - uttk gen.yml
participants (1)
-
Quentin Hocquet