Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Porting Enterprise Apps from UNIX to Linux

By Martyn Honeyford
2005-04-17


Parser Tools like lex/yacc

Be prepared that some portions of your grammar written on AIX or Solaris might not work directly on Linux. For example, some variables like yylineno (an undocumented lex scanner internal variable) might not be directly available on Linux by default. The following code snippet can be used to check if yylineno is directly supported or not. Open a file named a.l with following contents:

%{

%}
%%
%%
Then enter lex a.l. Search for "yylineno" in lex.yy.c. If the variable is not available, two possible solutions to supporting yylineno are to use the -l option for lex in Linux (in other words, do lex -l a.l) or change the code to the following:

%{

%}
%option yylineno
%%
%%
Some distributions (such as SLES 9) do not come packaged with yacc but come packaged with bison by default. If the requirement is for yacc, it may need to be downloaded.

Tutorial Pages:
» A Practical Checklist, Tips, and Insight Drawn from Experience
» Get the Build System Working
» Decide on a Viable Operating Environment
» Architecture-Specific Changes
» Choose an IPC Mechanism
» Select the Threading Model
» File System, Usage Parameters, Stacks
» Memory Maps and Using Shared Memory Segments
» Signaling
» Configure Kernel Karameters
» Parser Tools like lex/yacc
» Globalization Issues
» Security Concerns
» Locating Installed Packages and Variable Data
» Testing
» There's a Port in Every Storm
» Resources


First published by IBM DeveloperWorks


 | Bookmark
Related Tutorials:
» How to Install PHP 5 on Linux
» How to Install Apache 2 on Linux
» How to Install MySQL 5.0 on Linux
» SMB Caching
» Mound --Bind
» Tar Wild Card Interpretation