Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Regular expression extension method and system for YAML and push-down automaton

An extension method and expression technology, applied in the field of regular expression extension, can solve problems such as difficult to read and understand, difficult to maintain, and unable to solve the problem of mutual reference between strings

Pending Publication Date: 2022-08-02
杭州笨马网络技术有限公司
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, neither the POSIX standard regular expressions nor the PCRE standard can solve the matching problems of mutual references, interrelated inclusions, etc. in strings. If you want to borrow such regular expressions to match a certain structured programming language, it is very difficult complex
In addition, traditional regular expressions are also difficult to read and understand, and difficult to maintain

Method used

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
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Regular expression extension method and system for YAML and push-down automaton

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0023] The following description serves to disclose the invention to enable those skilled in the art to practice the invention. The preferred embodiments described below are given by way of example only, and other obvious modifications will occur to those skilled in the art. The basic principles of the invention defined in the following description may be applied to other embodiments, variations, improvements, equivalents, and other technical solutions without departing from the spirit and scope of the invention.

[0024] It should be understood that the term "a" should be understood as "at least one" or "one or more", that is, in one embodiment, the number of an element may be one, while in another embodiment, the number of the element may be one. The number may be plural, and the term "one" should not be understood as a limitation on the number.

[0025] Please refer to figure 1 The invention discloses a regular expression extension method and system for YAML and pushdown ...

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

PUM

No PUM Login to View More

Abstract

The invention discloses a regular expression extension method and system for a YAML and a push-down automaton, and the method comprises the steps: inputting a prefabricated command and a node in the YAML, constructing a YAML regular matching tree, and generating a regular matcher according to the regular matching tree; the nodes comprise variable definition nodes, variable reference nodes and variable expression nodes, and link is established between the variable definition nodes and the variable reference nodes; recursively matching prefabricated nodes through the regular matcher, and executing a prefabricated command according to the node type; constructing a push-down matching logic, and if the current node is successfully matched, executing matching state maintenance of the current node and the current child node according to the push-down matching logic and the prefabricated command; and reading all successfully matched variable expression node contents, and calling a corresponding regular expression from a regular expression library of the language according to the contents.

Description

technical field [0001] The invention relates to the technical field of computer code regular expressions, in particular to a regular expression extension method and system for YAML and pushdown automata. Background technique [0002] At present, there are two standards for traditional regular expressions. In addition to the POSIX standard, there is also a Perl standard. The POSIX standard is more classic and is also a built-in implementation of many other programming languages. The Perl standard has carried out basic regular expressions. Expansion, adding functions such as pattern recursive matching. However, neither the POSIX standard regular expressions nor the PCRE standard can solve the matching problem of patterns such as mutual reference and interrelated inclusion in strings. If you want to borrow such regular expressions to match a structured programming language, it is also very important complex. In addition, traditional regular expressions are also difficult to r...

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

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F16/903G06F16/901
CPCG06F16/90344G06F16/9027
Inventor 顾士豪
Owner 杭州笨马网络技术有限公司
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products