summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Becker <becker33@llnl.gov>2016-01-12 18:34:26 -0800
committerGregory Becker <becker33@llnl.gov>2016-01-12 18:34:26 -0800
commit848728858cf4bf313af5935cf9f35b743bbfb62e (patch)
tree617d30c3698a97f00b5527fbded7181b651e3ce1
parent5e3c883f2cb61b91dfb9bab3b436b07dd18f4a93 (diff)
downloadspack-848728858cf4bf313af5935cf9f35b743bbfb62e.tar.gz
spack-848728858cf4bf313af5935cf9f35b743bbfb62e.tar.bz2
spack-848728858cf4bf313af5935cf9f35b743bbfb62e.tar.xz
spack-848728858cf4bf313af5935cf9f35b743bbfb62e.zip
Removed extra plus signs from command line syntax. Did not yet remove them from printed format
-rw-r--r--lib/spack/spack/concretize.py2
-rw-r--r--lib/spack/spack/spec.py46
2 files changed, 33 insertions, 15 deletions
diff --git a/lib/spack/spack/concretize.py b/lib/spack/spack/concretize.py
index 6631a1afce..d2498ec64d 100644
--- a/lib/spack/spack/concretize.py
+++ b/lib/spack/spack/concretize.py
@@ -182,7 +182,7 @@ class DefaultConcretizer(object):
Default specs set at the compiler level will still be added later.
"""
ret = False
- for flag in Compiler.valid_compiler_flags():
+ for flag in spack.spec.FlagMap.valid_compiler_flags():
# if flag in spec.compiler_flags:
# continue
try:
diff --git a/lib/spack/spack/spec.py b/lib/spack/spack/spec.py
index 4a589d4cdf..4dfc315c90 100644
--- a/lib/spack/spack/spec.py
+++ b/lib/spack/spack/spec.py
@@ -1801,7 +1801,7 @@ class SpecLexer(spack.parse.Lexer):
class SpecParser(spack.parse.Parser):
def __init__(self):
super(SpecParser, self).__init__(SpecLexer())
-
+ self.previous = None
def do_parse(self):
specs = []
@@ -1809,13 +1809,23 @@ class SpecParser(spack.parse.Parser):
try:
while self.next:
if self.accept(ID):
- specs.append(self.spec(self.token.value))
-
+ self.previous = self.token
+ if self.accept(EQ):
+ if not specs:
+ specs.append(self.spec(''))
+ if self.accept(QT):
+ self.token.value = self.token.value[1:-1]
+ else:
+ self.expect(ID)
+ specs[-1]._add_flag(self.previous.value, self.token.value)
+ else:
+ specs.append(self.spec(self.previous.value))
elif self.accept(HASH):
specs.append(self.spec_by_hash())
elif self.accept(DEP):
if not specs:
+ self.previous = self.token
specs.append(self.spec(''))
if self.accept(HASH):
specs[-1]._add_dependency(self.spec_by_hash())
@@ -1887,6 +1897,13 @@ class SpecParser(spack.parse.Parser):
# unspecified or not.
added_version = False
+ if self.previous.value == DEP:
+ if self.accept(HASH):
+ spec.add_dependency(self.spec_by_hash())
+ else:
+ self.expect(ID)
+ spec.add_dependency(self.spec(self.token.value))
+
while self.next:
if self.accept(AT):
vlist = self.version_list()
@@ -1896,17 +1913,18 @@ class SpecParser(spack.parse.Parser):
check_valid_token = False
elif self.accept(ON):
- self.expect(ID)
- self.check_identifier()
- option = self.token.value
- if self.accept(EQ):
- if self.accept(QT):
- self.token.value = self.token.value[1:-1]
- else:
- self.expect(ID)
- spec._add_flag(option,self.token.value)
- else:
- spec._add_variant(self.variant(option),True)
+# self.expect(ID)
+# self.check_identifier()
+# option = self.token.value
+# if self.accept(EQ):
+# if self.accept(QT):
+# self.token.value = self.token.value[1:-1]
+# else:
+# self.expect(ID)
+# spec._add_flag(option,self.token.value)
+# else:
+# spec._add_variant(self.variant(option),True)
+ spec._add_variant(self.variatn(), True)
check_valid_token = False
elif self.accept(OFF):