cover of computer careers book

 

 

 

 

 

 

 

Discover the 8 Reasons Why Now is the Best Time Ever to Change to a Computer Career

lex for Not Yet Techies

"Computer Careers: Using This Unix Software Tool to Help You Create Applications"

by Richard Stooker, President Info Ring Press and author of Secrets of Changing to a Computer Career

 

lex is a Unix software tool, often used in conjunction with yacc and compiler writing, that generates programs for simple lexical tasks. Yet lex may be used as a standalone utility generating code automatically and more reliably than a programmer might do.

lex source files are short and easier to read than the equivalent C code and thus produce more maintainable products.

It is very similar to awk, so we can sometimes replace awk-based solutions which normally involve shell scripts and multiple tools with a single based process.

Because lex has strong similarities to awk and uses the common syntax of 'regular expressions' and 'C' it is easy to learn

It is a compiler writing tool and is also well suited to scanning an input stream of characters for transformation or analysis. Like awk, a source file of patterns and their associated actions is provided as an input script. Each time a pattern (using regular expressions and literals) maps to the input data it triggers an action(s). Unlike awk it does not perform the action immediately but instead generates a C source file containing a C function called yylex().

3 reasons programmers do not use lex:

  1. The standard documentation can be a barrier
  2. It is usually in the shadow of yacc and therefore often overlooked as a standalone software tool
  3. Simple problems can be solved simply in conventional programming language

Yet it can be used to implement even simple programs more quickly than a conventional programming language.

A script is usually much more readable than a conventional programming language.

lex is easy to learn, especially if one is familiar with the syntax of C and regular expressions.

Next: mod_perl

Use Your New Computer Career as a Stepping Stone to Even Greater Success

Send off for your free 7-part Techie Plus eCourse now. So that you can learn:

  • The 7 most important skills to even greater business achievement -- not to mention wealth and (maybe) fame
  • Why techies are expendable in bad times and how to protect yourself from them
  • Why the world's richest computer programmer has not written any code in ages
  • How one ex-engineer now makes $500,000 a year
  • The abilities most techies don't even realize they don't have -- which confines their success to their technical abilities
  • Why techies are expendable in bad times and how to protect yourself from them

It's fast and easy. You will receive the first part in your email box within minutes.

I respect your privacy. I will never sell, rent or trade your email address.

After you subscribe, the form will redirect you to a thank you page.

Subscribe now to free 7 part Techie Plus eCourse
Your Name:
Your Email:

Check Out Email Aces Today!
- Powered By Email Aces -

Thank you!

Rick Stooker

Permission is granted to reprint the above article in an ezine or on a website as long as it is reprinted in full, with no changes, with full credit and with this contact information and link included at the bottom. All other rights reserved.

Copyright 2007 by Info Ring Press

All Rights Reserved.

Computer Careers (Home)   Sitemap   Contact   Privacy  

Info Ring Press
Richard Stooker
PO Box 617
130-G Ballwin Manor Dr
Ballwin, MO 63011
(636) 394-2052
rick@inforingpress.com