FAMILIAR-project / familiar-language

FAMILIAR language and API
13 stars 3 forks source link

Interoperability (name with space or with numbers) #12

Open FAMILIAR-project opened 11 years ago

FAMILIAR-project commented 11 years ago

I am hacking the Xtext grammar and the "parsing" infrastructure to authorize features with spaces or with numbers (present in SPLOT for instance)

We should be able to do better than:

macher-wifi:Documents macher1$ java -jar -Xmx1024M FML-107s.jar FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning) version 1.0.6 (beta) http://familiar-project.github.com/ fml> fm1 = FM (A : "B" C [D] ; ) fm1: (FEATURE_MODEL) A: [D] "B" C ; fml> c1 = constraint (D -> "C") c1: (CONSTRAINT) (D -> "C") fml> addConstraint c1 to fm1 res0: (BOOLEAN) false fml> fm1 fm1: (FEATURE_MODEL) A: [D] "B" C ; fml> c2 = constraint (D -> C) c2: (CONSTRAINT) (D -> C) fml> addConstraint c2 to fm1 res1: (BOOLEAN) true fml> fm1 fm1: (FEATURE_MODEL) A: [D] "B" C ; (D -> C); fml> c3 = constraint ("C with C" or D) c3: (CONSTRAINT) ("C with C" | D) fml> addConstraint c3 to fm1 res2: (BOOLEAN) false fml> c2 c2: (CONSTRAINT) (D -> C) fml> c1 c1: (CONSTRAINT) (D -> "C") fml> exit
Bye, FAMILIAR user!

It also impacts convert / serialize facilities and renaming/removing or simply location of features

renameFeature fm1."AAAA with 6 old" as "AAAA with 3"

FAMILIAR-project commented 11 years ago

Almost done.

Now we need to: (1) unquote feature names when needs be (2) unit test some export/import functionalities