Error code display method and device, equipment, medium and product

By obtaining and analyzing the language code of specific languages ​​in the field, the output error code prompt information solves the problem of lack of domains in the existing technology, and the accurate error prompt and repair of specific languages ​​in the field are realized.

CN119356653APending Publication Date: 2025-01-24GF SECURITIES CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411392013.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-24

AI Technical Summary

Technical Problem

The lack of error code prompts for domain-specific languages ​​in the prior art makes it difficult for users to recognize and fix syntax errors when using domain-specific languages.

Method used

By obtaining the language code of specific languages ​​in the field, analyze the language code to detect the error code, and output error code prompt information based on the analysis results. This method includes the creation of specific language threads independent in the field of primary programs, introducing lexical analysis and grammatical analysis functions to achieve analysis and error prompts for language code.

Benefits of technology

The error prompts of specific languages ​​in the field are achieved, helping users identify and repair grammatical errors, and improve the accuracy and efficiency of specific languages ​​in the field of use.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119356653A_ABST
    Figure CN119356653A_ABST
Patent Text Reader

Abstract

The invention discloses an error code display method and device, equipment, a medium and a product. The method comprises the following steps: acquiring a language code of a domain-specific language; analyzing the language code to obtain an analysis result; and if the analysis result indicates that the error code exists, outputting error code prompt information based on the analysis result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an error code display method, device, equipment, medium and product. Background Art

[0002] A Domain Specific Language (DSL) is a programming language designed specifically to solve problems in a specific domain. Unlike a general-purpose language (GPL), a DSL usually focuses on a specific problem domain or task, providing customized syntax and functions to solve problems in that domain.

[0003] Due to the usage threshold of domain-specific languages, users can easily make syntax errors during use, and related technologies lack error code prompts for domain-specific languages. Summary of the invention

[0004] Embodiments of the present application provide an error code display method, apparatus, device, medium and product.

[0005] The technical solution of the embodiment of the present application is implemented as follows:

[0006] A method for displaying an error code, the method comprising:

[0007] Get the language code of the domain-specific language;

[0008] Analyze the language code to obtain an analysis result;

[0009] If the analysis result indicates that an error code exists, error code prompt information is output based on the analysis result.

[0010] In the above solution, the step of obtaining the language code of the domain-specific language includes:

[0011] Create domain-specific language threads independent of the main program;

[0012] The language code is obtained based on the domain specific language thread.

[0013] In the above solution, the acquiring the language code based on the domain specific language thread includes:

[0014] Importing a window listening function into the domain specific language thread;

[0015] Obtaining window text based on the window listening function;

[0016] The language code is obtained based on the window text.

[0017] In the above solution, the acquiring the language code based on the window text includes:

[0018] Importing a validation function into the domain specific language thread;

[0019] The language code is obtained from the window text based on the validation function.

[0020] In the above solution, the analyzing the language code to obtain the analysis result includes:

[0021] Importing a lexical analysis function into the domain specific language thread;

[0022] Performing lexical analysis on the language code based on the lexical analysis function to obtain a first analysis result;

[0023] If the first analysis result indicates that an error code exists, determining an error type and an error location based on the first analysis result;

[0024] The error code prompt information is output based on the error type and the error location.

[0025] In the above solution, the analyzing the language code to obtain the analysis result includes:

[0026] Importing a syntax analysis function into the domain specific language thread;

[0027] Performing syntax analysis on the language code based on the syntax analysis function to obtain a second analysis result;

[0028] If the second analysis result indicates that an error code exists, determining an error type and an error location based on the second analysis result;

[0029] The error code prompt information is output based on the error type and the error location.

[0030] An error code display device, the device comprising:

[0031] An acquisition unit, used for acquiring a language code of a domain specific language;

[0032] A processing unit, used for analyzing the language code to obtain an analysis result;

[0033] The processing unit is further configured to output error code prompt information based on the analysis result if the analysis result indicates that an error code exists.

[0034] An electronic device comprising: a processor and a memory for storing a computer program that can be run on the processor,

[0035] Wherein, when the processor is used to run the computer program, it executes the steps of any one of the above methods.

[0036] A storage medium stores a computer program, wherein the computer program implements the steps of any of the above methods when executed by a processor.

[0037] A computer product comprises a computer program, wherein when the computer program is executed by a processor, the steps of any one of the above methods are implemented.

[0038] The error code display method, device, equipment, medium and product provided in the embodiments of the present application; obtain the language code of the domain-specific language; analyze the language code to obtain the analysis result; if the analysis result indicates the existence of an error code, output the error code prompt information based on the analysis result. In other words, the present application obtains the language code of the domain-specific language; analyzes the language code to obtain the analysis result; if the analysis result indicates the existence of an error code, outputs the error code prompt information based on the analysis result, so as to realize the error prompt of the domain-specific language in the application, and solves the problem of the lack of error code prompt of the domain-specific language in the related art. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A flowchart of an error code display method provided in an embodiment of the present application;

[0040] Figure 2 A flowchart of another error code display method provided in an embodiment of the present application;

[0041] Figure 3 A schematic diagram of an error code prompt provided in an embodiment of the present application;

[0042] Figure 4 A schematic diagram of the structure of an error code display device provided in an embodiment of the present application;

[0043] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0044] In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions of the present application are further elaborated in detail below in conjunction with the drawings and embodiments. The described embodiments should not be regarded as limiting the present application. All other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0045] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0046] The terms "first / second / third" involved in the present application are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first / second / third" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.

[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.

[0048] The embodiment of the present application provides an error code display method, referring to Figure 1 As shown, the method comprises the following steps:

[0049] S101: Obtain a language code of a domain specific language.

[0050] Understandably, there is a lack of support for domain-specific languages ​​in web text editors. Monaco Editor can be embedded in any web page as a code editor.

[0051] In actual applications, you can build a domain-specific language thread in the initial configuration of Monaco Editor to obtain the language code of the domain-specific language.

[0052] S102: Analyze the language code to obtain analysis results.

[0053] It is understandable that the domain-specific language thread can be independent of the main program to handle issues related to the domain-specific language.

[0054] In actual applications, functions can be imported into domain-specific language threads to analyze the language code and detect whether there are error codes in the language code.

[0055] S103: If the analysis result indicates that an error code exists, output error code prompt information based on the analysis result.

[0056] It is understandable that when analyzing the language code, if there is an error, the error type and the code error position can also be determined. This application does not limit this.

[0057] In actual applications, after the error type and the code error location are determined, they can be displayed through the code editor. The error code prompt information may include but is not limited to the error type and the code error location.

[0058] It can be seen from the above content that the embodiment of the present application obtains the language code of the domain-specific language; analyzes the language code to obtain an analysis result; if the analysis result indicates the existence of an error code, outputs error code prompt information based on the analysis result, so as to implement error prompts for the domain-specific language in the application, thereby solving the problem of lack of error code prompts for domain-specific languages ​​in related technologies.

[0059] In some embodiments of the present application, obtaining the language code of the domain-specific language includes:

[0060] Create domain-specific language threads independent of the main program;

[0061] Gets the language code based on the domain specific language thread.

[0062] In actual applications, you can design a Web Woker in Monaco Editor to listen to user code input. The domain-specific language thread can be understood as a Web Woker. The Web Woker can detect whether the input code is a domain-specific language and perform error analysis, and can also set the error prompt type. Figure 2 As shown in the figure, creating a Web Worker can be understood as stage one.

[0063] In a feasible scenario, creating a domain-specific language thread independent of the main program can be achieved as follows:

[0064]

[0065]

[0066] From the above content, it can be seen that the embodiment of the present application uses Monaco Editor as the interactive terminal of the domain-specific language, uses Web Worker to open a separate thread to listen to user code input, performs code analysis in real time, and outputs error code prompt information based on the analysis results to implement error prompts for the domain-specific language in the application, thereby solving the problem of lack of error code prompts for domain-specific languages ​​in related technologies.

[0067] In some embodiments of the present application, obtaining a language code based on a domain specific language thread includes:

[0068] Import window listener functions into domain specific language threads;

[0069] Get the window text based on the window listening function;

[0070] Gets the language code based on the window text.

[0071] In actual applications, the window monitoring function can be used to monitor window text related to domain-specific languages. After obtaining the window text, the verification function will perform real-time verification to determine the language code. After the verification is completed, the Web Woker analyzes the language code.

[0072] From the above content, it can be seen that the embodiment of the present application uses Monaco Editor as the interactive terminal of the domain-specific language, uses Web Worker to open a separate thread to listen to user code input, performs code analysis in real time, and outputs error code prompt information based on the analysis results to implement error prompts for the domain-specific language in the application, thereby solving the problem of lack of error code prompts for domain-specific languages ​​in related technologies.

[0073] In some embodiments of the present application, obtaining a language code based on the window text includes:

[0074] Import validation functions into DSL threads;

[0075] Get the language code from the window text based on the validation function.

[0076] In actual applications, after obtaining the window text, the verification function will perform an immediate verification to determine the language code. After the verification is completed, the Web Woker analyzes the language code to determine the error type and error code location. Figure 2 As shown, phase 2 can be understood as obtaining the code language and analyzing it.

[0077] In a feasible scenario, setting the window listening function and verification function in Web Woker can be achieved as follows:

[0078]

[0079]

[0080] In actual applications, after the Web Worker is built, it can be initialized in the following ways:

[0081]

[0082]

[0083] From the above content, it can be seen that the embodiment of the present application uses Monaco Editor as the interactive terminal of the domain-specific language, uses Web Worker to open a separate thread to listen to user code input, performs code analysis in real time, and outputs error code prompt information based on the analysis results to implement error prompts for the domain-specific language in the application, thereby solving the problem of lack of error code prompts for domain-specific languages ​​in related technologies.

[0084] In some embodiments of the present application, the language code is analyzed to obtain analysis results, including:

[0085] Import lexical analysis functions into the domain-specific language thread;

[0086] Performing lexical analysis on the language code based on the lexical analysis function to obtain a first analysis result;

[0087] If the first analysis result indicates that an error code exists, determining an error type and an error location based on the first analysis result;

[0088] Output error code prompt information based on error type and error location.

[0089] In actual applications, an analysis function may be set in the Web Worker to perform lexical analysis and grammatical analysis on the language code. The analysis function may include but is not limited to a lexical analysis function and a grammatical analysis function.

[0090] For example, the lexical analysis in Web Woker may be performed as follows:

[0091]

[0092]

[0093]

[0094]

[0095] In some embodiments of the present application, the language code is analyzed to obtain analysis results, including:

[0096] Import parsing functions into the domain-specific language thread;

[0097] Performing syntax analysis on the language code based on the syntax analysis function to obtain a second analysis result;

[0098] If the second analysis result indicates that an error code exists, determining an error type and an error location based on the second analysis result;

[0099] Output error code prompt information based on error type and error location.

[0100] In actual applications, an analysis function may be set in the Web Worker to perform lexical analysis and grammatical analysis on the language code. The analysis function may include but is not limited to a lexical analysis function and a grammatical analysis function.

[0101] In a feasible scenario, setting the analysis function in the Web Worker can be achieved as follows:

[0102]

[0103]

[0104] refer to Figure 3 As shown in the figure, after Web Worker completes error analysis, Monaco Editor can return the error type and error code location, and Monaco Editor can display it visually.

[0105] From the above content, it can be seen that the embodiment of the present application uses Monaco Editor as the interactive terminal of the domain-specific language, uses Web Worker to open a separate thread to listen to user code input, performs code analysis in real time, and outputs error code prompt information based on the analysis results to implement error prompts for the domain-specific language in the application, thereby solving the problem of lack of error code prompts for domain-specific languages ​​in related technologies.

[0106] In an achievable scenario, the error code display method of the embodiment of the present application can also be implemented in the following manner:

[0107] Step 1: Use Monaco Editor as the code editing container, complete the initial configuration of Monaco Editor, and integrate the build process.

[0108] Step 2: Complete lexical analysis and grammatical analysis of the domain-specific language and compile an error list.

[0109] Step 3: Complete the design of Web Worker for code error prompts, listen to user code input in Web Worker, complete code compilation, and capture errors

[0110] Step 4: Send the captured error code, error type, and code error location back to the editor through Web Worker, and display the corresponding error in the editor.

[0111] Based on the same inventive concept as above, Figure 4 A schematic diagram of the structure of an error code display device provided by an embodiment of the present invention, the error code display device 400 comprises:

[0112] An acquisition unit 401 is used to acquire a language code of a domain specific language;

[0113] The processing unit 402 is used to analyze the language code and obtain an analysis result;

[0114] The processing unit 402 is further configured to output error code prompt information based on the analysis result if the analysis result indicates that an error code exists.

[0115] In some embodiments of the present application, the processing unit 402 is further configured to create a domain specific language thread independent of the main program;

[0116] Gets the language code based on the domain specific language thread.

[0117] In some embodiments of the present application, the processing unit 402 is further configured to import a window monitoring function into a domain specific language thread;

[0118] Get the window text based on the window listening function;

[0119] Gets the language code based on the window text.

[0120] In some embodiments of the present application, the processing unit 402 is further configured to import a verification function into a domain specific language thread;

[0121] Get the language code from the window text based on the validation function.

[0122] In some embodiments of the present application, the processing unit 402 is further configured to import a lexical analysis function into a domain specific language thread;

[0123] Performing lexical analysis on the language code based on the lexical analysis function to obtain a first analysis result;

[0124] If the first analysis result indicates that an error code exists, determining an error type and an error location based on the first analysis result;

[0125] Output error code prompt information based on error type and error location.

[0126] In some embodiments of the present application, the processing unit 402 is further configured to import a syntax analysis function into a domain specific language thread;

[0127] Performing syntax analysis on the language code based on the syntax analysis function to obtain a second analysis result;

[0128] If the second analysis result indicates that an error code exists, determining an error type and an error location based on the second analysis result;

[0129] Output error code prompt information based on error type and error location.

[0130] Based on the foregoing embodiments, an embodiment of the present application provides an electronic device, Figure 5 Schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention. The electronic device 500 includes: at least one processor 501, a memory 502, and optionally, the electronic device 500 may further include at least one communication interface 503. The various components in the electronic device 500 are coupled together via a bus system 504. It can be understood that the bus system 504 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 504 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, Figure 5 Various buses are labeled as bus system 504 .

[0131] Based on the hardware implementation of the above program modules, the communication interface 503 can exchange information with other communication devices;

[0132] The processor 501 is connected to the communication interface 503 to implement information interaction with other communication devices, and is used to execute the method provided by one or more of the above technical solutions when running the computer program;

[0133] A memory 502 on which the computer program is stored.

[0134] Specifically, the processor 501 is used to obtain a language code of a domain specific language;

[0135] Analyze the language code and obtain the analysis result;

[0136] If the analysis result indicates that an error code exists, an error code prompt message is output based on the analysis result.

[0137] In some embodiments of the present application, the processor 501 is further configured to create a domain specific language thread independent of the main program;

[0138] Gets the language code based on the domain specific language thread.

[0139] In some embodiments of the present application, the processor 501 is further configured to import a window monitoring function into a domain specific language thread;

[0140] Get window text based on window listening function;

[0141] Gets the language code based on the window text.

[0142] In some embodiments of the present application, the processor 501 is further configured to import a verification function into a domain specific language thread;

[0143] Get the language code from the window text based on the validation function.

[0144] In some embodiments of the present application, the processor 501 is further configured to import a lexical analysis function into a domain specific language thread;

[0145] Performing lexical analysis on the language code based on the lexical analysis function to obtain a first analysis result;

[0146] If the first analysis result indicates that an error code exists, determining an error type and an error location based on the first analysis result;

[0147] Output error code prompt information based on error type and error location.

[0148] In some embodiments of the present application, the processor 501 is further configured to import a syntax analysis function into a domain specific language thread;

[0149] Performing syntax analysis on the language code based on the syntax analysis function to obtain a second analysis result;

[0150] If the second analysis result indicates that an error code exists, determining an error type and an error location based on the second analysis result;

[0151] Output error code prompt information based on error type and error location.

[0152] It can be understood that the memory 502 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Sync Link Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 502 described in the embodiments of the present invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0153] The memory 502 in the embodiment of the present invention is used to store various types of data to support the operation of the electronic device 500. Examples of such data include: any computer program for operating on the electronic device 500. The program for implementing the method of the embodiment of the present invention may be included in the memory 502.

[0154] The method disclosed in the above embodiment of the present invention can be applied to the processor 501, or implemented by the processor 501. The processor may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by an integrated logic circuit of hardware in the processor or an instruction in the form of software. The above processor may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor can implement or execute the methods, steps and logic block diagrams disclosed in the embodiment of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present invention, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in a memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0155] In an exemplary embodiment, the electronic device 500 can be implemented by one or more application specific integrated circuits (ASIC), DSP, programmable logic device (PLD), complex programmable logic device (CPLD), field programmable gate array (FPGA), general processor, controller, microcontroller (MCU), microprocessor, or other electronic components to execute the above method.

[0156] Based on the above embodiments, the embodiments of the present application further provide a computer product, including a computer program, which is executed by a processor to implement Figure 1 The corresponding embodiment provides steps in the error code display method.

[0157] Based on the above embodiments, the embodiments of the present application further provide a storage medium, wherein the storage medium stores computer executable instructions, and the computer executable instructions are configured to execute Figure 1 The corresponding embodiment provides an error code display method.

[0158] It should be noted that the above-mentioned computer storage medium can be a memory such as ROM, PROM, EPROM, EEPROM, FRAM, FlashMemory, magnetic surface storage, optical disk, or CD-ROM; it can also be various electronic devices including one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0159] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0160] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0161] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course, by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0162] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0163] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0164] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0165] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for displaying an error code, characterized in that: The method comprises: Get the language code of the domain-specific language; Analyze the language code to obtain an analysis result; If the analysis result indicates that an error code exists, error code prompt information is output based on the analysis result.

2. The method according to claim 1, characterized in that The step of obtaining the language code of the domain-specific language includes: Create domain-specific language threads independent of the main program; The language code is obtained based on the domain specific language thread.

3. The method according to claim 2, characterized in that The acquiring the language code based on the domain specific language thread includes: Importing a window listening function into the domain specific language thread; Obtaining window text based on the window listening function; The language code is obtained based on the window text.

4. The method according to claim 3, characterized in that The acquiring the language code based on the window text includes: Importing a validation function into the domain specific language thread; The language code is obtained from the window text based on the validation function.

5. The method according to claim 2, characterized in that: The analyzing the language code to obtain an analysis result includes: Importing a lexical analysis function into the domain specific language thread; Performing lexical analysis on the language code based on the lexical analysis function to obtain a first analysis result; If the first analysis result indicates that an error code exists, determining an error type and an error location based on the first analysis result; The error code prompt information is output based on the error type and the error location.

6. The method according to claim 2, characterized in that The analyzing the language code to obtain an analysis result includes: Importing a syntax analysis function into the domain specific language thread; Performing syntax analysis on the language code based on the syntax analysis function to obtain a second analysis result; If the second analysis result indicates that an error code exists, determining an error type and an error location based on the second analysis result; The error code prompt information is output based on the error type and the error location.

7. An error code display device, characterized in that: The device comprises: An acquisition unit, used for acquiring a language code of a domain specific language; A processing unit, used for analyzing the language code to obtain an analysis result; The processing unit is further configured to output error code prompt information based on the analysis result if the analysis result indicates that an error code exists.

8. An electronic device, characterized in that: include: a processor and a memory for storing a computer program capable of being executed on the processor, Wherein, when the processor is used to run the computer program, it executes the steps of the method described in any one of claims 1 to 6.

9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.