
URL: https://svn.lrde.epita.fr/svn/scool/trunk ChangeLog: 2008-03-13 Maxime van Noppen <yabo@lrde.epita.fr> Start work on concepts * scl-syn/Concept.sdf: New. * scl-syn/Decl.sdf, * scl-syn/Lexical.sdf, * scl-syn/Makefile.am: Modify grammar to parse concepts. Concept.sdf | 9 +++++++++ Decl.sdf | 3 ++- Lexical.sdf | 1 + Makefile.am | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) Index: trunk/src/scl-syn/Decl.sdf =================================================================== --- trunk/src/scl-syn/Decl.sdf (revision 53) +++ trunk/src/scl-syn/Decl.sdf (revision 54) @@ -1,7 +1,7 @@ module Decl imports - Lexical Type Stm + Lexical Type Stm Concept exports sorts Decl @@ -9,6 +9,7 @@ Cxx -> Decl + Concept -> Decl Qualifier* "var" Id ":" Type ";" -> Decl {cons("VarDec")} Index: trunk/src/scl-syn/Concept.sdf =================================================================== --- trunk/src/scl-syn/Concept.sdf (revision 0) +++ trunk/src/scl-syn/Concept.sdf (revision 54) @@ -0,0 +1,9 @@ +module Concept + +imports + Lexical Decl + +exports + sorts Concept + context-free syntax + Id ":" "concept" "=" "{" Decl* "}" -> Concept {cons("Concept")} Index: trunk/src/scl-syn/Makefile.am =================================================================== --- trunk/src/scl-syn/Makefile.am (revision 53) +++ trunk/src/scl-syn/Makefile.am (revision 54) @@ -1,7 +1,7 @@ # Makefile.am -*-Makefile-*- MODULES = Scool -SDFS = Class Decl Exp ExpOrType Lexical Scool Stm Type +SDFS = Class Concept Decl Exp ExpOrType Lexical Scool Stm Type include $(top_srcdir)/config/Makefile.xt -include $(MODULES:=.dep) Index: trunk/src/scl-syn/Lexical.sdf =================================================================== --- trunk/src/scl-syn/Lexical.sdf (revision 53) +++ trunk/src/scl-syn/Lexical.sdf (revision 54) @@ -16,6 +16,7 @@ [\ \t\n] -> LAYOUT ~[\ ]~[\]\|]*~[\ ] -> RawCxx "class" -> Id {reject} + "concept" -> Id {reject} BlockComment -> LAYOUT -- \__/ \__/ (00) Maxime `yabo` van Noppen (00) ___) \ Epita 2009 / (___ (_____/ Président de Prologin \_____)