Research and Implementation on the Modular Structure of NC Code Interpreter
In order to enhance the efficiency and capabilities of CNC(computer numerical control) system,the modular interpreter structure model was proposed.The interpreter was divided into three modules called lexical analysis,syntax analysis and machining command converting.In the lexical analysis module,the standard NC code rules were described as EBNF(Extended Backus-Naur Form) and a top-down recursive-descent parsing was used for constructing lexical analysis procedure.When the data from lexical analysis is sent into machining information storage structure,numerical control instructions can be formalized.Machining command converting module converted the machining data into the numerical control instructions and sent them into the system underlying module.The construction method of each module was explained in details.A interpreter prototype system was developed based on these techniques,which verified the validity of the proposed method and provided technical support for the realization of high performance NC code interpreter.