CN111639501A - Power grid service micro-service combination method based on AMSL - Google Patents
Power grid service micro-service combination method based on AMSL Download PDFInfo
- Publication number
- CN111639501A CN111639501A CN202010369956.4A CN202010369956A CN111639501A CN 111639501 A CN111639501 A CN 111639501A CN 202010369956 A CN202010369956 A CN 202010369956A CN 111639501 A CN111639501 A CN 111639501A
- Authority
- CN
- China
- Prior art keywords
- lexical
- amsl
- grammar
- rules
- analyzer
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 46
- 238000004458 analytical method Methods 0.000 claims abstract description 39
- 230000009471 action Effects 0.000 claims abstract description 16
- 230000014509 gene expression Effects 0.000 claims description 20
- 230000006870 function Effects 0.000 claims description 9
- 230000008569 process Effects 0.000 claims description 6
- 238000003672 processing method Methods 0.000 claims description 4
- 238000013519 translation Methods 0.000 claims description 3
- 238000004519 manufacturing process Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 abstract description 4
- 238000010276 construction Methods 0.000 description 4
- 239000000203 mixture Substances 0.000 description 4
- 239000012634 fragment Substances 0.000 description 3
- 238000002955 isolation Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 238000010606 normalization Methods 0.000 description 1
- 230000008520 organization Effects 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/163—Handling of whitespace
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/166—Editing, e.g. inserting or deleting
- G06F40/169—Annotation, e.g. comment data or footnotes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/205—Parsing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/20—Natural language analysis
- G06F40/253—Grammatical analysis; Style critique
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06Q—INFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
- G06Q50/00—Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
- G06Q50/06—Energy or water supply
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Health & Medical Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Artificial Intelligence (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Computational Linguistics (AREA)
- General Engineering & Computer Science (AREA)
- Business, Economics & Management (AREA)
- Economics (AREA)
- Public Health (AREA)
- Water Supply & Treatment (AREA)
- Human Resources & Organizations (AREA)
- Marketing (AREA)
- Primary Health Care (AREA)
- Strategic Management (AREA)
- Tourism & Hospitality (AREA)
- General Business, Economics & Management (AREA)
- Devices For Executing Special Programs (AREA)
Abstract
The embodiment of the application provides an AMSL-based power grid service microservice combination method, which comprises the following steps: defining lexical rules, and constructing an AMSL lexical analyzer based on the defined lexical rules by combining with an ANTLR tool; defining grammar rules, and constructing an AMSL parser based on the defined grammar rules by combining with an ANTLR tool; and traversing the abstract syntax tree generated after the syntax analysis is executed by using a tree analyzer, executing a specific semantic action, performing semantic analysis on the AMSL, and generating the target code of the source program based on the tree traversal form. The supplementary extension is based on the complicated structured activities such as concurrency, circulation, repetition and the like which are not considered in a specific language method, and simultaneously considers the dynamic characteristics of the micro-service combination example, so that the practicability of the micro-service combination is improved.
Description
Technical Field
The application belongs to the field of data processing, and particularly relates to an AMSL-based power grid service micro-service combination method.
Background
The power grid CPS aims to fully reflect the physical process and the information process of the power grid operation, embody the fusion mechanism and the interaction mechanism of the two, and hopefully improve the overall performance of the system and optimize the operation of the global system through a higher-level control mode, thereby improving the energy utilization rate, the equipment utilization potential and the reliability, the safety and the stability of the system.
In the power grid information physical system, the problems of information ownership, use right and the like still exist, the flexibility of the organization structure of the power grid information physical system is further increased, and proper management measures are needed to ensure the isolation among different services and ensure the normalization and the reliability of information services. Therefore, how to combine information isolation and service specification through a proper modeling and control technology becomes a research focus of the power grid information physical system.
Disclosure of Invention
In order to solve the defects and shortcomings in the prior art, the application provides the power grid service micro-service combination method based on the AMSL, and the method is used for supplementing and expanding complexity structural activities such as concurrency, circulation and repetition which are not considered in a specific language method, simultaneously considering the dynamic characteristics of a micro-service combination example, and improving the practicability of the micro-service combination.
Specifically, the micro-service combination method includes:
defining lexical rules, and constructing an AMSL lexical analyzer based on the defined lexical rules by combining with an ANTLR tool;
defining grammar rules, and constructing an AMSL parser based on the defined grammar rules by combining with an ANTLR tool;
and traversing the abstract syntax tree generated after the syntax analysis is executed by using a tree analyzer, executing a specific semantic action, performing semantic analysis on the AMSL, and generating the target code of the source program based on the tree traversal form.
Optionally, the defining the lexical rules, and constructing the AMSL lexical analyzer based on the defined lexical rules by combining with an ANTLR tool, include:
the method includes the steps that lexical rule elements are designed in combination with basic syntax elements required by a power grid service scene and required by reference to C language;
and automatically realizing a lexical analyzer by combining with an ANTLR tool based on the defined lexical rule, and decomposing the input character stream into a group of symbol streams by the lexical analyzer and providing the symbol streams to a syntax analyzer for syntax analysis.
Optionally, the lexical rule elements include:
a separator: when describing service combination, the method is used for separating a plurality of variables, data items or expressions;
identifier: the micro service combination description is a name self-defined by a user and is used for describing a symbol constant name, a variable name and a function used for realizing the micro service combination;
key words: the key is a reserved identifier;
numeric character string: the character string is mainly used for matching characters surrounded by double quotation marks input by a user;
note that: when the combined service is described, the lexical analyzer processes the characters according to the lexical rules;
blank symbol: a space for matching user input;
operator: symbols representing specific operations used to construct the expressions.
Optionally, the defining the grammar rule, and constructing, in combination with an ANTLR tool, an AMSL parser based on the defined grammar rule includes:
carrying out structural definition on grammar rules according to a conventional language mode;
combining with an ANTLR tool, constructing a grammar analyzer for performing grammar level analysis on the generated input symbol stream based on a defined grammar rule, and judging whether the provided word sequence can meet a sentence structure of the grammar rule;
if the input syntax structure is not satisfied, an abstract syntax tree representing the input syntax structure is generated, and if the input syntax structure is not satisfied, the input syntax problem is indicated and error details are indicated;
when starting from the start character of the ANTLR grammar, performing top-down analysis, and when a non-terminal character appears, repeatedly calling a corresponding processing method;
when the terminal character is met, matching operation is carried out, and the syntax analyzer can call the standby subprogram within the range of the K value according to the predefined K value;
a recursive descent production equation for the valued expression is determined.
Optionally, the structural definition of the grammar rule according to the conventional language model includes:
lexical dependencies, the lexical symbols being used to represent a match of one lexical symbol with one or more subsequent lexical symbols;
the sequence mode represents a sequence with any length, and elements in the sequence comprise lexical symbols or sub-rules;
the sequence pattern includes a sequence pattern with a terminator and a sequence pattern with a delimiter;
the symbols comprise lexical symbols or sub-rules and are used for defining parameter tables of functions and transferring parameters when the functions are called;
a selection mode, which is a set of group candidate branches, uses a 'symbolic expression selection mode' for separating a plurality of selectable grammar structures;
nested schema, which uses recursive rules to express self-similar language constructs.
Optionally, the determining a recursive descent to the valuation expression yields an equation, including:
the method resulting from the assign rule;
matching the ID with the current input symbol;
the expression is matched by calling expr.
Optionally, the method includes:
specifically calling the service combination flow involved in the input written script code to realize semantic execution of micro-service combination;
the grammar structure of AST is specified in ANTLR, and grammar translation is achieved by operating or simply traversing nodes.
Optionally, the step of traversing an abstract syntax tree generated after the syntax analysis is performed by using a tree analyzer, performing a specific semantic action, performing semantic analysis on the AMSL, and generating the target code of the source program based on a tree traversal form includes
Specifying a grammar structure of AST in ANTLR, traversing the abstract syntax tree by adopting a visitor mode, providing a controllable traversal mode and directly visiting the tree generated by the syntax analyzer through a visitor;
the tree analyzer traverses the nodes of the abstract syntax tree generated after the analysis execution, writes an implementation method for a series of generated visit abstract interfaces, and completes the specific semantic action calling;
specifically calling the service combination flow involved in the input written script code, executing semantic actions related to micro service combination, and generating the object code of the source program.
The beneficial effect that technical scheme that this application provided brought is:
the supplementary extension is based on the complicated structured activities such as concurrency, circulation, repetition and the like which are not considered in a specific language method, and simultaneously considers the dynamic characteristics of the micro-service combination example, so that the practicability of the micro-service combination is improved.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a schematic flowchart of a power grid service microservice combining method based on AMSL according to an embodiment of the present application.
Detailed Description
To make the structure and advantages of the present application clearer, the structure of the present application will be further described with reference to the accompanying drawings.
Example one
AMSL (ANTLR Microservice Description specificity Language, ANTLR micro service Description Specification Language)
The application discloses a micro-service combination method developed by an AMSL (anti LR micro service description Language) based power grid service micro-service combination method AMSL. As shown in fig. 1, the method comprises the following steps:
11. defining lexical rules, and constructing an AMSL lexical analyzer based on the defined lexical rules by combining with an ANTLR tool;
12. defining grammar rules, and constructing an AMSL parser based on the defined grammar rules by combining with an ANTLR tool;
13. and traversing the abstract syntax tree generated after the syntax analysis is executed by using a tree analyzer, executing a specific semantic action, performing semantic analysis on the AMSL, and generating the target code of the source program based on the tree traversal form.
In implementation, the implementation manner of step 11 is to define relevant lexical rules in combination with a power grid service scenario, construct an AMSL lexical analyzer, and automatically implement the lexical analyzer based on the defined lexical rules in combination with an ANTLR tool, where the lexical analyzer decomposes an input character stream (source program) into a set of symbol streams (Tokens streams) through lexical analysis and provides the symbol streams (Tokens streams) to a syntax analyzer for syntax analysis.
Construction of AMSL lexical analyzer: firstly, defining lexical rules, automatically realizing a lexical analyzer based on the defined lexical rules by combining with an ANTLR tool, and decomposing an input character stream (a source program) into a group of symbol streams (token streams) through lexical analysis by the lexical analyzer and providing the symbol streams (token streams) to a syntax analyzer for syntax analysis. The lexical rule is the most basic for designing the micro-service combination specification and is a necessary syntactic structure element, the lexical rule designed by the application is combined with basic syntactic elements required by a power grid service scene and necessary for a C language, and 8 types of lexical rule elements including separators, identifiers, keywords, numbers, character strings, comments, blank characters and operators are designed.
The implementation of step 12 is to construct an AMSL parser, define grammar rules and perform grammar level analysis on the lexical parser input symbol stream based on the grammar rules in combination with the parser to identify whether the provided word sequence can satisfy the sentence structure of the grammar rules, if so, an Abstract Syntax Tree (AST) representing the input grammar structure is generated for semantic analysis by the tree parser.
Construction of AMSL parser: firstly, defining grammar rules, automatically realizing a grammar analyzer based on the defined grammar rules by combining with an ANTLR tool, carrying out grammar level analysis on an input symbol stream of the grammar analyzer based on the grammar rules by the grammar analyzer so as to identify whether a provided word sequence can meet sentence structures of the grammar rules, and if so, generating an abstract grammar tree (AST) representing the input grammar structures; if not, the grammar problem of the input is indicated and error details are indicated. When ANTLR carries out top-down analysis, starting from the beginning character of grammar, when non-terminal character appears, its correspondent processing method is repeatedly called, and when terminal character is encountered, it makes matching operation, and according to predefined K value, the syntax analyzer can determine which standby subprogram is called in the range of K value. In ANTLR, a parser is composed of a combination of grammar rules. The grammar rule defines basic actions and operation elements related to the realization of the service composition, is used for realizing the attribute description and the behavior expression of the service composition process, and is a core element of the specification design of the micro-service composition description. The grammar rule of the application is structurally defined according to a conventional language mode, and mainly comprises four modes of sequence (scqune), selection (choic), nested (nested phrsc) and lexical dependence (token dependency).
AMSL semantic analysis: and traversing the abstract syntax tree generated after the syntax analysis is executed by using a tree analyzer so as to execute the specific semantic action related to the abstract syntax tree, completing the semantic analysis of the source program, and simultaneously generating the target code of the source program based on the tree traversal form. The method is specifically realized by specifically calling a service combination flow involved in an input and written script code, so as to realize semantic execution of micro-service combination. The grammar structure of the AST may be specified in ANTLR and grammar translation is achieved by manipulating or simply traversing the nodes. The tree parser is different from the syntax parser in that the tree parser treats a two-dimensional tree structure as a string of nodes, and the processing pair is an abstract syntax tree, while the syntax parser mainly processes a set of symbol streams.
Specifically, the construction of the AMSL lexical analyzer in step 11 is as follows:
step 1.1, defining lexical rules: the lexical rules designed by the application are combined with basic syntax elements required by a power grid service scene and necessary for a C language, and 8 types of lexical rule elements including separators, identifiers, keywords, numbers, character strings, comments, blank characters and operators are designed.
(1) A separator: when describing service combinations, special terminating symbols are needed, such as ' { } ', ' 0 ', '; ' etc. to separate a plurality of variables, data items or expressions;
(2) identifier: the micro service combination description is provided with a name customized by a user and is used for describing a symbolic constant name, a variable name, a function and the like used for realizing the micro service combination, and the expression rule of the micro service combination description can be defined as: IDENTIFIER [ "a-Z A-Z ] [" a-Z A-Z0-9 ];
(3) key words: keywords are reserved identifiers, such as 'if', 'else', 'while', 'and', etc., which cannot be user-defined identifiers;
(4) numeric character string: the character STRING is mainly used for matching characters surrounded by double quotation marks input by a user, and is represented by STRING: "(ESC |). 2? ", the numbers here only apply to the two forms int-type and float;
(5) note that: when describing a combined service, there may be a single line, multiple lines of annotations, denoted as both '// ' and '/·.
(6) Blank symbol: the device is used for matching and discarding the blank space, tab character, line feed character and the like input by a user, and has the expression form of WS [ \\ \ t \ r \ n ] + - > skip;
(7) operator: symbols indicating specific operations such as ' > ', ' <', and' ═ are mainly used to construct expressions.
And step 1.2, automatically realizing a lexical analyzer by combining with an ANTLR tool based on the defined lexical rules, and decomposing an input character stream (source program) into a group of symbol streams (Tokensstream) through lexical analysis by the lexical analyzer and providing the symbol streams (Tokensstream) to a syntax analyzer for syntax analysis.
The construction of the AMSL lexical analyzer described in step 2 is specifically as follows:
step 2.1, defining grammar rules: the grammar rule of the application is structurally defined according to a conventional language mode, and mainly comprises four types of sequences (scqune), choices (choic), nestings (nestedthrasc) and lexical dependencies (tokendependency).
(1) Dependence on lexical method
Lexical symbol dependencies are commonly used to indicate matching of one lexical symbol with one or more subsequent lexical symbols, and mainly include pairwise occurrences (.), { … }, [ … ], and so on, with the following example implementation:
fragment:'do″{'expr'}″while″('expr')'
|ID'['expr']'
|'<'ID(','ID)*'>';
(2) sequence mode
The pattern represents a sequence of arbitrary length, and the elements in the sequence can be lexical symbols or sub-rules. The sequence pattern can be subdivided into a sequence pattern with terminators and a sequence pattern with separators, an example of a sequence pattern using ANTLR tags is given below:
fragment: (state ') | (row \ n'); // sequence patterns with terminator
fragment: expr (', ' expr) ' stat (' - ' stat); // sequence patterns with separators
The symbol may also be a sub-rule. The sequence patterns with separators are usually separated by commas, semicolons or periods, wherein the elements can be lexical symbols or sub-rules, and are often used for defining parameter tables of functions, function call-time parameters and the like.
(3) Selecting a mode
The selection pattern is a collection of group candidate branches, and is usually expressed using "symbols" for separating multiple alternative syntax structures, the following example implementation:
rules:'on″('event')″then'rules
|'{'(rules|actions)*'}';
(4) nested mode
Nested patterns are "self-similar language structures that are typically expressed using recursive rules. The nested structure is used more in the syntax of service composition description, most typically an expression structure, which contains a plurality of nested sub-expressions separated by operators, and the specific examples are as follows:
expr:'!'expr
|expr'+'expr;
and 2.2, automatically realizing a grammar analyzer by combining with an ANTLR tool based on a defined grammar rule, wherein the grammar analyzer analyzes the input symbol stream generated in the step 1 on a grammar level based on the grammar rule so as to identify whether the provided word sequence can meet the sentence structure of the grammar rule.
Step 2.3, if the input syntax structure is satisfied, generating an Abstract Syntax Tree (AST) representing the input syntax structure; if not, the grammar problem of the input is indicated and error details are indicated. When ANTLR performs top-down analysis, usually starting from the beginning of the grammar, when non-terminal characters appear, its corresponding processing method is called repeatedly, and when terminal characters are encountered, matching operation is performed, and according to the predefined K value, the parser can decide which standby subprograms are called within the K value range.
Step 2.4, for example, assigning the expression "assign: ID ═ expr'; "the corresponding recursive dip yields the formula:
method for generating voidasign () {// by assign rule
match (ID); matching ID with current input symbol
match('=');
expr (); matching expressions by calling expr ()
match(';');
}。
The semantic analysis of the AMSL in step 3 is specifically as follows:
and 3.1, specifying a grammar structure of the AST in the ANTLR, traversing the abstract syntax tree by adopting a visitor mode, providing a controllable traversal mode and directly accessing the tree generated by the syntax analyzer through a visitor.
Step 3.2, the tree analyzer traverses the nodes of the abstract syntax tree generated after the syntax analysis in the step 2 is executed, and compiles a concrete implementation method for a series of visit abstract interfaces generated by the abstract syntax tree, so as to complete the calling of concrete semantic actions;
and 3.3, specifically calling the service combination flow related to the input and written script code, executing semantic actions related to micro service combination, and generating an object code of the source program.
The sequence numbers in the above embodiments are merely for description, and do not represent the sequence of the assembly or the use of the components.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the protection scope of the present application.
Claims (8)
1. The AMSL-based power grid service micro-service combination method is characterized by comprising the following steps:
defining lexical rules, and constructing an AMSL lexical analyzer based on the defined lexical rules by combining with an ANTLR tool;
defining grammar rules, and constructing an AMSL parser based on the defined grammar rules by combining with an ANTLR tool;
and traversing the abstract syntax tree generated after the syntax analysis is executed by using a tree analyzer, executing a specific semantic action, performing semantic analysis on the AMSL, and generating the target code of the source program based on the tree traversal form.
2. The AMSL-based power grid service micro-service combination method according to claim 1, wherein the defining lexical rules and the combining with ANTLR tools to construct the AMSL lexical analyzer based on the defined lexical rules comprise:
the method includes the steps that lexical rule elements are designed in combination with basic syntax elements required by a power grid service scene and required by reference to C language;
and automatically realizing a lexical analyzer by combining with an ANTLR tool based on the defined lexical rule, and decomposing the input character stream into a group of symbol streams by the lexical analyzer and providing the symbol streams to a syntax analyzer for syntax analysis.
3. The AMSL-based grid service microservice method according to claim 1, wherein the lexical rule elements comprise:
a separator: when describing service combination, the method is used for separating a plurality of variables, data items or expressions;
identifier: the micro service combination description is a name self-defined by a user and is used for describing a symbol constant name, a variable name and a function used for realizing the micro service combination;
key words: the key is a reserved identifier;
numeric character string: the character string is mainly used for matching characters surrounded by double quotation marks input by a user;
note that: when the combined service is described, the lexical analyzer processes the characters according to the lexical rules;
blank symbol: a space for matching user input;
operator: symbols representing specific operations used to construct the expressions.
4. The AMSL-based power grid service microservice combining method according to claim 1, wherein the defining grammar rules, in combination with ANTLR tools, constructs an AMSL parser based on the defined grammar rules, including:
carrying out structural definition on grammar rules according to a conventional language mode;
combining with an ANTLR tool, constructing a grammar analyzer for performing grammar level analysis on the generated input symbol stream based on a defined grammar rule, and judging whether the provided word sequence can meet a sentence structure of the grammar rule;
if the input syntax structure is not satisfied, an abstract syntax tree representing the input syntax structure is generated, and if the input syntax structure is not satisfied, the input syntax problem is indicated and error details are indicated;
when starting from the start character of the ANTLR grammar, performing top-down analysis, and when a non-terminal character appears, repeatedly calling a corresponding processing method;
when the terminal character is met, matching operation is carried out, and the syntax analyzer can call the standby subprogram within the range of the K value according to the predefined K value;
a recursive descent production equation for the valued expression is determined.
5. The AMSL-based grid service microservice combination method according to claim 4, wherein the grammar rules are structurally defined according to a conventional language model, and the method comprises the following steps:
lexical dependencies, the lexical symbols being used to represent a match of one lexical symbol with one or more subsequent lexical symbols;
the sequence mode represents a sequence with any length, and elements in the sequence comprise lexical symbols or sub-rules;
the sequence pattern includes a sequence pattern with a terminator and a sequence pattern with a delimiter;
the symbols comprise lexical symbols or sub-rules and are used for defining parameter tables of functions and transferring parameters when the functions are called;
a selection mode, which is a set of group candidate branches, uses a 'symbolic expression selection mode' for separating a plurality of selectable grammar structures;
nested schema, which uses recursive rules to express self-similar language constructs.
6. The AMSL-based grid service microservice combining method according to claim 4, wherein the determining a recursive descent result for an assignment expression comprises:
the method resulting from the assign rule;
matching the ID with the current input symbol;
the expression is matched by calling expr.
7. The AMSL-based grid service microservice combining method according to claim 1, wherein the method comprises:
specifically calling the service combination flow involved in the input written script code to realize semantic execution of micro-service combination;
the grammar structure of AST is specified in ANTLR, and grammar translation is achieved by operating or simply traversing nodes.
8. The AMSL-based power grid service microservice combination method according to claim 7, wherein the tree analyzer is used for traversing an abstract syntax tree generated after the syntax analysis is executed, executing a concrete semantic action, performing semantic analysis on the AMSL, and generating an object code of a source program based on the form of tree traversal, wherein the method comprises
Specifying a grammar structure of AST in ANTLR, traversing the abstract syntax tree by adopting a visitor mode, providing a controllable traversal mode and directly visiting the tree generated by the syntax analyzer through a visitor;
the tree analyzer traverses the nodes of the abstract syntax tree generated after the analysis execution, writes an implementation method for a series of generated visit abstract interfaces, and completes the specific semantic action calling;
specifically calling the service combination flow involved in the input written script code, executing semantic actions related to micro service combination, and generating the object code of the source program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010369956.4A CN111639501A (en) | 2020-05-04 | 2020-05-04 | Power grid service micro-service combination method based on AMSL |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010369956.4A CN111639501A (en) | 2020-05-04 | 2020-05-04 | Power grid service micro-service combination method based on AMSL |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111639501A true CN111639501A (en) | 2020-09-08 |
Family
ID=72331005
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010369956.4A Pending CN111639501A (en) | 2020-05-04 | 2020-05-04 | Power grid service micro-service combination method based on AMSL |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111639501A (en) |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112270175A (en) * | 2020-10-29 | 2021-01-26 | 成都四方伟业软件股份有限公司 | ANTLR-based complex report formula analysis method and device |
CN112507083A (en) * | 2020-12-16 | 2021-03-16 | 中国南方电网有限责任公司 | Anti-error rule base construction method based on scheduling anti-error field language |
CN112989345A (en) * | 2021-03-17 | 2021-06-18 | 北京安天网络安全技术有限公司 | Threat handling method and framework |
CN115145584A (en) * | 2022-07-15 | 2022-10-04 | 杭州博盾习言科技有限公司 | Parser generation method, data processing method, medium, and device |
CN116126304A (en) * | 2023-02-21 | 2023-05-16 | 北京计算机技术及应用研究所 | XML-based extended Lustre code generation method |
CN116150005A (en) * | 2023-01-16 | 2023-05-23 | 北京计算机技术及应用研究所 | Model form verification method based on extended Lustre language |
CN118012413A (en) * | 2024-04-09 | 2024-05-10 | 西安衍舆航天科技有限公司 | Satellite remote control operation script editing method and system based on graphics |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001005655A (en) * | 1999-06-24 | 2001-01-12 | Nec Corp | Device and method for aiding development of application generator |
CN104281096A (en) * | 2013-07-08 | 2015-01-14 | 广州中国科学院先进技术研究所 | Construction method of numerical-control code compiler |
CN106250199A (en) * | 2016-07-26 | 2016-12-21 | 北京北森云计算股份有限公司 | The dynamic micro services call method of a kind of multilingual cloud compiling and device |
CN109254776A (en) * | 2018-09-29 | 2019-01-22 | 深圳市雷赛控制技术有限公司 | Multilingual code compiling method and compiler |
CN110825384A (en) * | 2019-10-28 | 2020-02-21 | 国电南瑞科技股份有限公司 | ST language compiling method, system and compiler based on LLVM |
CN112270175A (en) * | 2020-10-29 | 2021-01-26 | 成都四方伟业软件股份有限公司 | ANTLR-based complex report formula analysis method and device |
-
2020
- 2020-05-04 CN CN202010369956.4A patent/CN111639501A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2001005655A (en) * | 1999-06-24 | 2001-01-12 | Nec Corp | Device and method for aiding development of application generator |
CN104281096A (en) * | 2013-07-08 | 2015-01-14 | 广州中国科学院先进技术研究所 | Construction method of numerical-control code compiler |
CN106250199A (en) * | 2016-07-26 | 2016-12-21 | 北京北森云计算股份有限公司 | The dynamic micro services call method of a kind of multilingual cloud compiling and device |
CN109254776A (en) * | 2018-09-29 | 2019-01-22 | 深圳市雷赛控制技术有限公司 | Multilingual code compiling method and compiler |
CN110825384A (en) * | 2019-10-28 | 2020-02-21 | 国电南瑞科技股份有限公司 | ST language compiling method, system and compiler based on LLVM |
CN112270175A (en) * | 2020-10-29 | 2021-01-26 | 成都四方伟业软件股份有限公司 | ANTLR-based complex report formula analysis method and device |
Non-Patent Citations (1)
Title |
---|
田兵等: "基于微服务架构的应用性能监控平台研究" * |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112270175A (en) * | 2020-10-29 | 2021-01-26 | 成都四方伟业软件股份有限公司 | ANTLR-based complex report formula analysis method and device |
CN112507083A (en) * | 2020-12-16 | 2021-03-16 | 中国南方电网有限责任公司 | Anti-error rule base construction method based on scheduling anti-error field language |
CN112989345A (en) * | 2021-03-17 | 2021-06-18 | 北京安天网络安全技术有限公司 | Threat handling method and framework |
CN112989345B (en) * | 2021-03-17 | 2024-04-12 | 北京安天网络安全技术有限公司 | Threat handling method and framework |
CN115145584A (en) * | 2022-07-15 | 2022-10-04 | 杭州博盾习言科技有限公司 | Parser generation method, data processing method, medium, and device |
CN116150005A (en) * | 2023-01-16 | 2023-05-23 | 北京计算机技术及应用研究所 | Model form verification method based on extended Lustre language |
CN116150005B (en) * | 2023-01-16 | 2023-11-28 | 北京计算机技术及应用研究所 | Model form verification method based on extended Lustre language |
CN116126304A (en) * | 2023-02-21 | 2023-05-16 | 北京计算机技术及应用研究所 | XML-based extended Lustre code generation method |
CN116126304B (en) * | 2023-02-21 | 2023-12-22 | 北京计算机技术及应用研究所 | XML-based extended Lustre code generation method |
CN118012413A (en) * | 2024-04-09 | 2024-05-10 | 西安衍舆航天科技有限公司 | Satellite remote control operation script editing method and system based on graphics |
CN118012413B (en) * | 2024-04-09 | 2024-06-11 | 西安衍舆航天科技有限公司 | Satellite remote control operation script editing method and system based on graphics |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111639501A (en) | Power grid service micro-service combination method based on AMSL | |
US7818311B2 (en) | Complex regular expression construction | |
US8850414B2 (en) | Direct access of language metadata | |
US8838440B2 (en) | Generating parser combination by combining language processing parsers | |
CN112765209A (en) | SQL statement syntax migration method and system between databases | |
Fedorchenko et al. | Equivalent transformations and regularization in context-free grammars | |
CN109857458B (en) | ANTLR-based AltaRica3.0 flattening transformation method | |
Pratt | Definition of programming language semantics using grammars for hierarchical graphs | |
CN116010444A (en) | Low-code interactive graph query statement construction method | |
CN111859929B (en) | Data visualization method and device and related equipment thereof | |
CN112306470B (en) | Method for simplifying, converting and automatically verifying complex synchronous language program | |
Zaytsev | Software Language Engineering by Intentional Rewriting | |
JP2007122187A (en) | Program code generation device | |
Masiero et al. | Development and instantiation of a generic application generator | |
Grigorev et al. | String-embedded language support in integrated development environment | |
Memeti | Automatic Java Code Generator for Regular Expressions and Finite Automata | |
Bhadauria et al. | Design and Implementation of HSQL: A SQL-like language for Data Analysis in Distributed Systems | |
JP5425417B2 (en) | Name database creation apparatus, method and program | |
KR101974804B1 (en) | Flow diagram generation method and apparatus performing the same | |
CN115167837A (en) | Layout rule checking method for CA-CCML language visualization model | |
van Staden et al. | Parsing Semi-structured Languages: A Crochet Pattern to Diagram Translation | |
Macedo et al. | InDubio: A Combinator Library to Disambiguate Ambiguous Grammars | |
Tirri et al. | ALCHEMIST/spl minus/an object-oriented tool to build transformations between heterogeneous data representations | |
CN117215535A (en) | Statement processing method, device and equipment based on building data exchange standard | |
Botnaru et al. | Domain specific language chart representation of data |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200908 |