Search the site for the term 'parser'

13/01/2017
In this article I will present a custom DataGridView control that allows using formulas composed by arithmetic expressions and references to the different cells of the control. In addition to the class library with the control, I have prepared a small application to show how to use the different features it offers.
[Read More...] 
06/01/2017
BNFUP is a class library that implements an object compiler from the definition of a language using BNF rules. It also provides rule editing services. In this article I continue showing how to use the editor to compile and test your own objects using the language you have defined for that. I will also show you three examples of implementation.
[Read More...] 
05/01/2017
In this series of articles I will show a class library that implements a compiler that uses any language defined by BNF rules and that generates objects from a userwritten class library, which must implement a simple interface so that the compiler can construct and initialize them from the source code.
[Read More...] 
31/07/2016
The Tableaux is a logical calculus tool that is very useful to demonstrate a conclusion from a set of premises, find counterexamples or models of a set of logical formulas or demonstrate that a formula is a tautology, i.e., that is true in all possible cases. They can be used in artificial intelligence as the basis for implementing automated theorem proving.
[Read More...] 
23/07/2016
There is a very common problem in linear programming which consists to find the values that make maximum or minimum the value of a linear function, given a number of restrictions on the values of their variables. For example, you may want to find a minimum cost or maximum production function. To do this, there is an algorithm developed in 1947 by George Dantzig, called Simplex, which allows perform such calculations in a simple and effective way.
[Read More...] 
18/06/2016
In the previous article in this series I began to show how to implement an arithmetic expression analyzer, or parser, from the grammar rules in BNF notation, with classes which extract numbers, variables and constants. In this article I will finish the series with the implementation of the class focused in working with the main rule, which analyzes the expressions themselves. I will also provide a small sample application that draws the graph corresponding to the expression from the object generated by the compiler.
[Read More...] 
17/06/2016
In the previous article in this series I reviewed the main issues about the design of the grammar to build an analyzer, or parser, for arithmetic expressions. In this article I will show the first part of its implementation from the BNF grammar rules, converting the input expression, in the form of a text string, in a series of objects that we can use to evaluate it and give different values to the constants and variables that compose it.
[Read More...] 
14/06/2016
When we are working with mathematical functions, it is very convenient to have a parser that allows us to write and perform different versions of the equations that must be processed by the program, rather than having to modify and recompile the code to adapt it to these changes each time. In this series of articles I will show how to build a simple but powerful expressions analyzer, which can be extended easily to deal with more sophisticated expressions, starting by explaining in this article the basic theory necessary to successfully face this kind of development.
[Read More...]