Directed acyclic graphs (DAGs) are useful for modeling of quantum-dot cellular automata (QCA)-based digital circuits. In this paper, DAGs are used to design the single-layer architecture of QCA circuits. A context-free grammar is proposed to check whether a majority gate-based Boolean expression is syntactically correct or not. Whether a given sentence satisfies the grammar can be tested using the corresponding parse tree. Language-independent (three-address) code can then be constructed from the parse tree to draw a DAG and thereby design the QCA circuit corresponding to a given Boolean expression. The clock zones are partitioned according to each level of the DAG. The abstract architecture developed from the DAG is simulated using the QCADesigner tool.