From 9447050dcf58cd650c25ed2a0cc2b6b12d2d024f Mon Sep 17 00:00:00 2001 From: Josh Hursey Date: Mon, 1 Aug 2005 21:14:09 +0000 Subject: [PATCH] Added comments to lex parser. Now you can have a hostfile that looks like: # # this is my hostfile # frogger1 frogger2 #frogger3 and it will only use frogger 1&2. This commit was SVN r6692. --- orte/mca/rds/hostfile/rds_hostfile_lex.l | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/orte/mca/rds/hostfile/rds_hostfile_lex.l b/orte/mca/rds/hostfile/rds_hostfile_lex.l index 4622dd72ab..7d377df9e8 100644 --- a/orte/mca/rds/hostfile/rds_hostfile_lex.l +++ b/orte/mca/rds/hostfile/rds_hostfile_lex.l @@ -37,15 +37,19 @@ bool orte_rds_hostfile_done = false; %} +WHITE [\f\t\v ] + %% -\n { orte_rds_hostfile_line++; +{WHITE}*\n { orte_rds_hostfile_line++; + return ORTE_RDS_HOSTFILE_NEWLINE; } +#.*\n { orte_rds_hostfile_line++; return ORTE_RDS_HOSTFILE_NEWLINE; } \"[^\"]*\" { orte_rds_hostfile_value.sval = yytext; return ORTE_RDS_HOSTFILE_QUOTED_STRING; } -[\f\t\v ] ; /* whitespace */ +{WHITE}+ ; /* whitespace */ "=" { return ORTE_RDS_HOSTFILE_EQUAL; }