diff --git a/lel_parser.cpp b/lel_parser.cpp index 3af72bc..754c92b 100644 --- a/lel_parser.cpp +++ b/lel_parser.cpp @@ -7,7 +7,7 @@ namespace lel { -#line 40 "lel_parser.rl" +#line 41 "lel_parser.rl" @@ -84,7 +84,7 @@ static const int Parser_error = 0; static const int Parser_en_main = 1; -#line 43 "lel_parser.rl" +#line 44 "lel_parser.rl" bool Parser::parse(std::string input) { reset(); @@ -101,7 +101,7 @@ bool Parser::parse(std::string input) { cs = Parser_start; } -#line 54 "lel_parser.rl" +#line 55 "lel_parser.rl" #line 94 "lel_parser.cpp" { @@ -246,7 +246,7 @@ _again: _out: {} } -#line 55 "lel_parser.rl" +#line 56 "lel_parser.rl" bool good = pe - p == 0; if(good) { diff --git a/lel_parser.rl b/lel_parser.rl index 784d639..9feff87 100644 --- a/lel_parser.rl +++ b/lel_parser.rl @@ -33,8 +33,9 @@ namespace lel { number = digit+ >{ start = fpc; } %token; setw = ("(" number %setwidth ("," number %setheight)? ")") ; modifiers = (percent | center | expand | valign | halign | setw); - id = modifiers* ((alpha | '_')+ :>> (alnum | '_')*) >{start = fpc;} %id; - row = space* ltab space* id space* (col space* id space*)* space* rtab space*; + id = ((alpha | '_')+ :>> (alnum | '_')*) >{start = fpc;} %id; + cell = modifiers* id; + row = space* ltab space* cell space* (col space* cell space*)* space* rtab space*; main := row+; }%%