Quantum Programming Language NDQJava2 Processing System: Lexical Analyzer and Syntactic Analyzer

Zhenwei CHENG,Jiafu XU
DOI: https://doi.org/10.3778/j.issn.1673-9418.1303014
2013-01-01
Abstract:NDQJava2 is a hybrid, structured and imperative quantum programming language, which is an extension of NDQJava with some additional quantum components, such as quantum conditional statement, quantum loop statement, quantum subprogram, quantum module and quantum exception handling mechanism. After briefly stating the NDQJava2 processing system, this paper focuses on the lexical analyzer and the syntactic analyzer, which uses direct steering method for lexical analysis, identifies the words then generates a sequence of words, uses recursive subroutine method for syntax analysis, generates syntax tree. The example shows that the result of this process is correct,fulfills lexical analysis and syntax analysis tasks.
What problem does this paper attempt to address?