/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/parsers/bison_lexer.txt

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Lexical analyzer rules
 
2
----------------------
 
3
    + does not include main()
 
4
    + the actions should return numeric codes of found tokens (the defines are
 
5
    available in name.tab.h
 
6
    + to return semantic value of token, the 'yylval' variable should be used,
 
7
    example (if one type is used):
 
8
        yylval = atoi(yytext)
 
9
        return INT_NUM;
 
10
    if '%union' types are used:
 
11
        yylval.int_type = atoi(yytext);
 
12
        return INT_NUM;
 
13
    +