cogitolearning
October 17, 2013
Android, Tutorials
android, animation, java, tutorial
Previously I showed you how to create View animations using XML resources. I just wrote a few lines of actual Java code that was only needed to start the animation. In this post I will show you how you can…
Read more
cogitolearning
June 24, 2013
Android, Tutorials
activity, android, application, java, thread
In the last post, I talked about the difference between a service and a background thread in Android. In this post I want to talk about updating an activity from a background thread that runs in the application context. As you…
Read more
cogitolearning
June 11, 2013
Android
activity, android, java, service, thread
A question that is asked by many new Android developers is when to use a service and when to use a background thread for some task that threatens to block the UI thread. This question is somewhat misleading because it…
Read more
cogitolearning
May 9, 2013
Java, Parser
design pattern, java, parser, tutorial, visitor
During the course of this series we have written a tokenizer, designed a grammar, implemented the grammar in a recursive descent parser and built an expression tree that corresponds to the mathematical expression and that is able to calculate a…
Read more
cogitolearning
May 7, 2013
Java, Parser
java, parser, recursive descent, tree, tutorial
In the last post I created classes that can represent a mathematical expression in the form of a tree data structure. We saw how expressions could be stored and evaluated but the code was not linked to the parser yet….
Read more
cogitolearning
May 3, 2013
Java, Parser
data structure, java, parser, tree, tutorial
The last post in this series showed you how a mathematical expression parser was implemented from the grammar that we designed earlier. This was all fine and good but the parser did not do much except confirm if a mathematical…
Read more
cogitolearning
May 1, 2013
Java, Parser
grammar, java, parser, recursive descent, tutorial
In the last post about the Java expression parser we designed a grammar for analysing a mathematical expression. That was certainly all a bit abstract and theoretical for many readers. Now we are ready to put some meat on these…
Read more
cogitolearning
April 25, 2013
Java, Parser
grammar, java, parser, tutorial
Previously I introduced the concept on the LL(1) grammar and explained how a parser would go about parsing an input. In this post I want to design a grammar that is capable of parsing mathematical expressions. Before we actually get…
Read more
cogitolearning
April 16, 2013
Java, Parser
grammar, java, parser, tutorial
In the previous post in this series we wrote a tokenizer which splits the input into short segments called tokens. Each type of token is given a unique code and the input is reduced to a series of token codes….
Read more
cogitolearning
April 8, 2013
Java, Parser
java, parser, tokenizer, tutorial
In this short series I am talking about how to write a parser that analyses mathematical expressions and turns them into an object tree that is able to evaluate that expression. The first step in writing a parser is to…
Read more