token.phrase.structure.grammar.syntax.

Token.
something serving as an indication,proof,or expression of something else.
Phrase.
Two or more words in sequence that form a syntactic unit that is less
than a complete sentence.
Structure.
mode of arrangement of parts.
Grammar.
The elements of any science , art , or subject.
Syntax.
The study of rules for the formation of grammatical sentences in a language.


Reference/Source:
http://www.thefreedictionary.com/token
http://www.thefreedictionary.com/phrases
http://dictionary.reference.com/browse/syntax
http://dictionary.reference.com/browse/structure
http://dictionary.reference.com/browse/grammar

Lexical Analysis

Lexical analysis is the process of taking an input string
of characters (such as the source code of a computer
program) and producing a sequence of symbols called
"lexical tokens", or just "tokens", which may be handled
more easily by a parser.
A token, in computing, is a segment of text, regardess
whether it be readable or comprised of symbols. Tokens
are generally defined abstractly in a context free grammar,
which is fed into a program such as yacc which checks the
stream of tokens for conformity to this grammar.
A parser is a computer program or a component of a program
that analyses the grammatical structure of an input, with
respect to a given formal grammar, a process known as parsing.
In linguistics, grammar is the set of structural rules that govern
the composition of sentences, phrases, and words in any given
natural language.

Related Notes :

Lexical analysis is concerned with scanning the
input for significant clusters of characters called tokens.
The input stream of characters is analyzed using delimiters
and a careful description of the way various types tokens
may be constructed.


Reference/Source :
http://en.wikipedia.org/wiki/Grammar
http://www.wordiq.com/definition/Parser
http://www.wordiq.com/definition/Token_(parser)
http://www.wordiq.com/definition/Lexical_analysis
D. Soda, G. W. Zobrist
February 1989
CSC '89: Proceedings of the 17th conference on ACM Annual Computer Science Conference

object oriented programming

Class Definition Related


div.entry h2.title, div.entry h1.title
{ padding-bottom: 22px; background-color: #4e9258 ; font-family: serif; font-size:150%;}

Object-oriented programming (OOP) is a programming paradigm
that uses "objects" – data structures consisting of data fields and
methods together with their interactions – to design applications
and computer programs

Reference/Source: http://en.wikipedia.org/wiki/Object-oriented_programming


Code Exposition


p.first{ color: blue; }
p.second{ color: red; }
<html>
<body>
<p>This is a normal paragraph.</p>

<p class="first">This is a paragraph that uses the p.first CSS code ! </p>
<p class="second">This is a paragraph that uses the p.second CSS code!</p>
...

Reference/Source:
http://www.tizag.com/cssT/class.php

Related Research

Actually, every OOP language should be concurrent in nature.
As previously stated, OOP attempts to model objects found in
the real world, and in the real world many of these objects con-
currently exist and communicate with one another. In the 'ideal'
environment (sort of a virtual machine), every object would have
its own processor as well as its own memory space, allowing
maximum concurrency at all times. Inherently concurrent obje-
cts could even have multiple processors assigned to them.

CONCURRENCY IN CONVENTIONAL OOP LANGUAGES
C-Based Languages. C++ [Str86, WP88] and Objective-C
[Cox86] do not include any constructs for handling concur-
rency. However, since they are extensions of C [KR78], they
can do anything that C can do. Although C itself does not
support concurrency, any extension to C could most likely
be implemented in a C-based OOP language. Additionally,
any scheme in which C is allowed to make a call to the
operating system to start (spawn) a new process could also
be accomplished from a C-based OOP language. Eiffel
[Mey88] does not include any form of concurrency, but they
are reportedly making an effort in this direction.

Lisp-Based Languages. Similar to C-based languages, CLOS
[BDG88, Kee89, Moo89] (an extension of Common Lisp
[Ste84]), does not include any  constructs for handling concurrency
and, unfortunately, Common Lisp does not support concurrency
in any form either. However, as Lisp is a form of functional
programming (which is based on the lambda calculus), some
form of concurrency is possible. In pure functional programming,
a program may be expressed as a single function call, with the
arguments to the function themselves being function calls; the
arguments to these functions can in turn be function calls, etc.
Since the value returned by a pure function is determined solely
by the arguments passed to it, implementations can be devised
which allow for all of the arguments

which are function calls to be executed in parallel. The arguments
of these function calls which are themselves functions can then be
executed in parallel, and so on. This is sometimes referred to as
divide and conquer in that a program is divided up into concurrent
subprograms (the arguments which are function  calls) which can
then be conquered (solved) by again using the divide and conquer
 scheme [Pey87].

Reference/Source:
CONCURRENCY & OBJECT-ORIENTED PROGRAMMING
Michael L. Nelson, Major, USAF
Department of Computer Science
Naval Postgraduate School
Monterey, CA 93943

gcc limits and -Wformat



#include <stdio.h>
#include <limits.h>
int main (void)
{
unsigned long ul = LONG_MAX;
short int si = SHRT_MIN;
printf ("%d\n", ul);
printf ("%s\n", si);
return 0;
}


$gcc printme.c
$./a.out
-1
Segmentation fault
$gcc printme.c -Wformat
printme.c: In function ‘main’:
printme.c:7: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘long unsigned int’
printme.c:8: warning: format ‘%s’ expects type ‘char *’, but argument 2 has type ‘int’
$

The <limits.h> header shall define various symbolic names.
The names represent various limits on resources that the
implementation imposes on applications.

about "-Wformat"
Check calls to printf and scanf, etc., to make sure that the
arguments supplied have types appropriate to the format
string specified, and that the conversions specified in the
format string make sense
 
Reference/Source:
The Definitive Guide to GCC Second Edition
William von Hagen
http://www.opengroup.org/onlinepubs/009695399/basedefs/limits.h.html
http://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html

gcc options.



$gcc hello.c -o hello
$du -h hello
8.0K hello
$gcc -pg hello.c -o hello
$du -h hello
8.0K hello
$ls -l hello
-rwxr-xr-x 1 7417 Nov 2 05:46 hello
$rm hello
$gcc hello.c -o hello
$ls -l hello
-rwxr-xr-x 1 6593 Nov 2 05:47 hello
$
some content supressed.

The gcc compiler accepts both single-letter options, such as
-o, and multiletter options, such as -ansi. Because it accepts both
types of options you cannot group multiple single-letter options
together as you may be used to doing in many GNU and Unix
/Linux programs. For example, the multiletter option -pg is not
the same as the two single-letter options -p -g. The -pg option
creates extra code in the final binary that outputs profile information
for the GNU code profiler, gprof. On the other hand, the -p -g options
generate extra code in the resulting binary that produces profiling
information for use by the prof code profiler (-p) and causes gcc to
generate debugging information using the operating system’s normal
format (-g).


Reference/Source:
The Definitive Guide to GCC Second Edition
William von Hagen

Languages

There are three types of languages:
1. Imperative.
2. Functional.
3. Logical.

In computer science, imperative programming is a programming
paradigm that describes computation in terms of statements that
change a program state. In much the same way that imperative
mood in natural languages expresses commands to take action,
imperative programs define sequences of commands for the
computer to perform.

In computer science, functional programming is a programming
paradigm that treats computation as the evaluation of mathematical
functions and avoids state and mutable data. It emphasizes the
application of functions, in contrast to the imperative programming
style, which emphasizes changes in state.[1] Functional programming
has its roots in lambda calculus, a formal system developed in the
1930s to investigate function definition, function application, and
recursion. Many functional programming languages can be viewed as
elaborations on the lambda calculus.[1]

Logic programming languages, of which PROLOG (programming
in logic) is the best known, state a program as a set of logical
relations (e.g., a grandparent is the parent of a parent of someone).
Such languages are similar to the SQL database language. A
program is executed by an “inference engine” that answers a query
by searching these relations systematically to make inferences
that will answer a query. PROLOG has been used extensively in
natural language processing and other AI programs.


Reference/Source:
http://en.wikipedia.org/wiki/Imperative_programming
http://en.wikipedia.org/wiki/Functional_programming
http://www.britannica.com/EBchecked/topic/130670/computer-programming-language/248126/Declarative-languages?anchor=ref849840

find command part 1



$cat 1
$
$cat 2
$
$find
.
./2
./1
$find .
.
./2
./1
$ls
1 2
$find . -print
.
./2
./1
$find -print
.
./2
./1
$find -name 1
./1
$

The find command is used to locate files on a Unix
or Linux system. find will search any set of director-
ies you specify for files that match the supplied se-
arch criteria. You can search for files by name, owner,
group, type, permissions, date, and other criteria.
The search is recursive in that it will search all subd-
irectories too.
The syntax looks like this:
find where-to-look criteria what-to-do
explanation for -print switch follows…
-print True; print the full file name on the standard
output, followed by a newline.
Refernece/Source :
http://content.hccfl.edu/pollock/unix/findcmd.htm
Debian manual for find command.

Package: findutils
Homepage: http://savannah.gnu.org/projects/findutils/
Maintainer: Andreas Metzler <ametzler@debian.org>

Yauap . simple audio player



$yauap physics.mp3/Joy\ of\ science/Joy\ of\ Science.18.The\ Bohr\ Atom.mp3
yauap 0.2.4 (C) 2006-2008 Sascha Sommer
loading url file:///home/jeffrin/Music/physics.mp3/Joy of science/Joy of Science.18.The Bohr Atom.mp3
Cannot connect to server socket err = No such file or directory
Cannot connect to server socket
jack server is not running or cannot be started
title=The Bohr Atom
artist=Audio Books
album=The Joy Of Science
track-number=18
genre=Speech
container-format=ID3 tag
samplerate=22050
channels=1
length=1802475
title=The Bohr Atom
artist=Audio Books
album=The Joy Of Science
track-number=18
genre=Speech
container-format=ID3 tag
audio-codec=MPEG 2 Audio, Layer 3 (MP3)
samplerate=22050
channels=1
length=1802475
title=The Bohr Atom
artist=Audio Books
album=The Joy Of Science
track-number=18
genre=Speech
container-format=ID3 tag
audio-codec=MPEG 2 Audio, Layer 3 (MP3)
bitrate=32000
channel-mode=mono
samplerate=22050
channels=1
length=1802475
title=The Bohr Atom
artist=Audio Books
album=The Joy Of Science
track-number=18
genre=Speech
container-format=ID3 tag
audio-codec=MPEG 2 Audio, Layer 3 (MP3)
bitrate=32000
channel-mode=mono
layer=3
mode=mono
emphasis=none
samplerate=22050
channels=1
length=1802475
Time: 0:00:06.779 / 0:30:02.475

$

Yauap is a simple commandline audio player based
on the GStreamer multimedia framework. It also ex-
poses a DBus interface which allows other applicatio-
ns to use Yauap as a playback backend for audio files
and streams.
Reference/Source:
Debian documentation.