Method and device for parsing logical expressions
A technology of logical expressions and analytical methods, applied in the field of computer data processing, can solve problems such as error-prone and low efficiency, and achieve the effect of avoiding complex logical operations and improving the accuracy of operations
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0023] figure 1 Embodiment 1 of the present invention provides a logical expression parsing method, which can be executed by a logical expression parsing device, wherein the parsing device can be implemented by software and / or hardware, and can generally be integrated into a computer.
[0024] see figure 1 , the method of this embodiment includes the following steps:
[0025] Step S100, obtaining a logical expression to be parsed.
[0026] During coding, it may often be necessary to parse logical expressions. When parsing of a logical expression is required, the logical expression to be parsed input by the user may be obtained. A logical expression is a sequence composed of operators, operands, parentheses or relational symbols, etc. It is a formula formed by connecting constants, variables, functions, etc. with operators. Logical expressions are the most basic elements that make up program code. Please refer to the following logical expression 1 and logical expression 2:...
Embodiment 2
[0056] figure 2 It is a schematic structural diagram of an apparatus for parsing logical expressions provided by Embodiment 2 of the present invention. The analysis device is configured in a computer. The parsing device in this embodiment specifically includes: an acquisition module 21 , a split module 22 , a value calculation module 23 , a substitution module 24 and a result calculation module 25 .
[0057] Wherein, the acquiring module 21 is configured to acquire the logic expression to be parsed. The logical expression may be a mixed expression or a general expression.
[0058] A splitting module 22, configured to split the logical expression to be parsed to obtain at least one operation unit. The above splitting is splitting by using a regular expression mixed expression to obtain at least one computing unit.
[0059] The value operation module 23 is configured to perform an operation on each operation unit to obtain an operation value of each operation unit. That is...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com