Shading language translation method

A language translation and language technology, applied in the field of data processing, can solve problems such as unfavorable optimization and debugging, poor code readability, etc., and achieve the effect of improving readability and scalability
CN111488155BActive Publication Date: 2020-09-22BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD

Patent Information

Authority / Receiving Office
CN Β· China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING PERFECT WORLD SOFTWARE TECH DEV CO LTD
Publication Date
2020-09-22

Smart Images

  • Figure 1
    Figure 1
  • Figure 2
    Figure 2
  • Figure 3
    Figure 3
Patent Text Reader

Abstract

An embodiment of the present application provides a coloring language translation method. In the coloring language translation method, the abstract syntax tree of the code file of the original coloring language is obtained, and the keywords of the nodes in the abstract syntax tree are analyzed to obtain the coloring language information contained in the code file of the original coloring language. Combined with the set information mapping rules, the coloring language information can be translated to obtain a code file of another coloring language. In this process, the node analysis is performed based on the abstract syntax tree, and the original grammatical structure of the code file of the original coloring language is preserved. At the same time, based on the analysis of node keywords, the corresponding translation between different types of information is realized, which is conducive to improving the readability of translation results; in addition, the information mapping rules can be updated according to actual needs, improving It improves the scalability of the language translation method, and supports the new coloring language syntax conveniently and quickly.
Need to check novelty before this filing date? Find Prior Art

Description

technical field

[0001] The present application relates to the technical field of data processing, in particular to a coloring language translation method. Background technique

[0002] Shading Language (Shading Language) is a kind of shading language specially used for programming shaders. Currently, a high-level shader language (High Level Shader Language, HLSL) developed and owned by Microsoft is more popular in the industry. However, HLSL can only work on the Windows (an operating system developed by Microsoft) platform, which leads to the problem of limited use of target platforms running other operating systems.

[0003] In the prior art, there is a way of translating HLSL codes into codes usable by a target platform through a disassembly operation. However, the code translated by the disassembly operation has the disadvantage of poor readability, which is not conducive to optimization and debugging on the target platform. Therefore, a new solution remains to be prop...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More