         return []
     }
     
+    private static var structuralIdentifiers = [String:Bool]()
+    
+    fileprivate static func isStructural(identifier: STLRScope.Identifier)->Bool{
+        if let existingAnswer = structuralIdentifiers[identifier.name] {
+            return existingAnswer
+        }
+        
+        guard let expression = identifier.grammarRule?.expression else {
+            structuralIdentifiers[identifier.name] = false
+            return false
+        }
+        
+        if identifier.isDiscarded {
+            structuralIdentifiers[identifier.name] = false
+            return false
+        }
+        
+        let fields = SwiftStructure.generate(expression: expression)
+        if fields.count == 0 {
+            structuralIdentifiers[identifier.name] = false
+            return false
+        }
+        
+        structuralIdentifiers[identifier.name] = true
+        return true
+    }
+    
     private static func generate(element:STLRScope.Element)->Field?{
         guard element.isStructural else {
             return nil

            } else {
                field = Field(name: token, type: token.typeName)
            }
        default:
            field = nil
        }
        
        if let field = field {

        return false
    }
    var isStructural : Bool {
        return SwiftStructure.isStructural(identifier: self)
    }
}

