         return r
     }()
 
-    private static let pnCharSet: CharacterSet = {
+    // PN_CHARS_BASE
+    private static let pnCharsBase: CharacterSet = {
         var pn = CharacterSet()
         pn.insert(charactersIn: "a"..."z")
         pn.insert(charactersIn: "A"..."Z")

                }
            }
            
            // TODO: verify that we're not projecting a variable more than once
            // TODO: add projection for aggregate variables
            algebra = .project(algebra, projection)
        }

        }
        return pn
    }()

    private static let pnCharsU: CharacterSet = {
        var pn = pnCharsBase
        pn.insert("_")
        return pn
    }()
    
    private static let pnChars: CharacterSet = {
        var pn = pnCharsU
        pn.insert("-")
        pn.insert(charactersIn: "0"..."9")
        pn.insert(UnicodeScalar(0x00B7))
        let ranges: [(Int, Int)] = [
            (0x0300, 0x036F),
            (0x203F, 0x2040),
            ]
        for bounds in ranges {
            guard let mn = UnicodeScalar(bounds.0) else { fatalError("Failed to construct built-in CharacterSet") }
            guard let mx = UnicodeScalar(bounds.1) else { fatalError("Failed to construct built-in CharacterSet") }
            let range = mn...mx
            pn.insert(charactersIn: range)
        }
        return pn
    }()
    

    public init(source: InputStream, includeComments: Bool = false) {
        self.source = source
