Changeset 7c2bff65d061982575740ffc7a1cb7b7597e8607

Show
Ignore:
Timestamp:
05/28/2008 11:45:15 PM (7 months ago)
Author:
mitchell <mitchell@frost.(none)>
git-committer:
mitchell <mitchell@frost.(none)> 1212043515 -0400
git-parent:

[8aa59f943aceba9355319025a245ef8e0484b753]

git-author:
mitchell <mitchell@frost.(none)> 1212043515 -0400
Message:

Added #ifndef ... #endif around parsers; they are header files after all.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • PARSER_DOC

    r0844a1a r7c2bff6  
    2222 
    2323/************************* Required for every parser *************************/ 
     24#ifndef RAGEL_C_PARSER 
     25#define RAGEL_C_PARSER 
     26 
    2427#include "ragel_parser_macros.h" 
    2528 
     
    4245 
    4346  And the following at the bottom: 
     47 
     48/************************* Required for every parser *************************/ 
    4449 
    4550/* Parses a string buffer with C/C++ code. 
     
    7580} 
    7681 
     82#endif 
     83 
     84/*****************************************************************************/ 
     85 
    7786  (Your parser will go between these two blocks.) 
    7887 
    7988  The code can be found in the existing c.rl parser. You will need to change: 
     89    * RAGEL_[lang]_PARSER - Replace [lang] with your language name. So if you 
     90      are writing a C parser, it would be RAGEL_C_PARSER. 
    8091    * [lang]_LANG - Set the variable name to be [lang]_LANG and its value to be 
    81       the name of your language to parse. [lang] is your language name. So if 
    82       you are writing a C parser, it would be C_LANG. 
     92      the name of your language to parse. [lang] is your language name. For C it 
     93      would be C_LANG. 
    8394    * [lang]_entities - Set the variable name to be [lang]_entities (e.g. 
    8495      c_entries) The value is an array of string entities your language has. 
  • ext/ohcount_native/ragel_parsers/c.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_C_PARSER 
     5#define RAGEL_C_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    148151  *|; 
    149152}%% 
     153 
     154/************************* Required for every parser *************************/ 
    150155 
    151156/* Parses a string buffer with C/C++ code. 
     
    190195  C_LANG = ORIG_C_LANG; 
    191196} 
     197 
     198#endif 
     199 
     200/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/java.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_JAVA_PARSER 
     5#define RAGEL_JAVA_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    7679}%% 
    7780 
     81/************************* Required for every parser *************************/ 
     82 
    7883/* Parses a string buffer with Java code. 
    7984 * 
     
    107112  if (count) { process_last_line(JAVA_LANG) } 
    108113} 
     114 
     115#endif 
     116 
     117/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/lua.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_LUA_PARSER 
     5#define RAGEL_LUA_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    106109}%% 
    107110 
     111/************************* Required for every parser *************************/ 
     112 
    108113/* Parses a string buffer with Lua code. 
    109114 * 
     
    139144  if (count) { process_last_line(LUA_LANG) } 
    140145} 
     146 
     147#endif 
     148 
     149/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/objective_c.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_OBJECTIVE_C_PARSER 
     5#define RAGEL_OBJECTIVE_C_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    8184}%% 
    8285 
     86/************************* Required for every parser *************************/ 
     87 
    8388/* Parses a string buffer with Objective C code. 
    8489 * 
     
    112117  if (count) { process_last_line(OBJC_LANG) } 
    113118} 
     119 
     120#endif 
     121 
     122/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/ruby.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_RUBY_PARSER 
     5#define RAGEL_RUBY_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    151154}%% 
    152155 
     156/************************* Required for every parser *************************/ 
     157 
    153158/* Parses a string buffer with Ruby code. 
    154159 * 
     
    182187  if (count) { process_last_line(RUBY_LANG) } 
    183188} 
     189 
     190#endif 
     191 
     192/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/sql.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_SQL_PARSER 
     5#define RAGEL_SQL_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    8285}%% 
    8386 
     87/************************* Required for every parser *************************/ 
     88 
    8489/* Parses a string buffer with SQL code. 
    8590 * 
     
    113118  if (count) { process_last_line(SQL_LANG) } 
    114119} 
     120 
     121#endif 
     122 
     123/*****************************************************************************/ 
  • ext/ohcount_native/ragel_parsers/visual_basic.rl

    r0844a1a r7c2bff6  
    22 
    33/************************* Required for every parser *************************/ 
     4#ifndef RAGEL_VISUAL_BASIC_PARSER 
     5#define RAGEL_VISUAL_BASIC_PARSER 
     6 
    47#include "ragel_parser_macros.h" 
    58 
     
    6366}%% 
    6467 
     68/************************* Required for every parser *************************/ 
     69 
    6570/* Parses a string buffer with Visual Basic code. 
    6671 * 
     
    9499  if (count) { process_last_line(VB_LANG) } 
    95100} 
     101 
     102#endif 
     103 
     104/*****************************************************************************/