Toward Efficient Parsing of Diagrammatic Languages