diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-24 18:53:04 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2008-01-24 18:53:04 -0800 |
commit | d6e59241730e6f458da6e77368b8b6b4d2626150 (patch) | |
tree | 318efd0ccccbcc6767198a7d4de1b8d6aa064791 /src | |
parent | 484806de2ad2ce204e840160e0714049e8e316cf (diff) | |
download | vyatta-cfg-d6e59241730e6f458da6e77368b8b6b4d2626150.tar.gz vyatta-cfg-d6e59241730e6f458da6e77368b8b6b4d2626150.zip |
allow non-indented line continuation
Diffstat (limited to 'src')
-rw-r--r-- | src/cli_def.l | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/cli_def.l b/src/cli_def.l index df768c1..8f32c51 100644 --- a/src/cli_def.l +++ b/src/cli_def.l @@ -334,14 +334,18 @@ RE_ACT_FIELD (help|syntax|commit|delete|update|activate|create|begin|end|comp_he return return_act_field(yy_cli_def_text); } -<action>\n[^ \t] { +<action>\n({RE_REG_FIELD}|{RE_ACT_FIELD}):.* { + int i = 0; + char *tmp = strdup(yy_cli_def_text); BEGIN(INITIAL); - unput( yy_cli_def_text[1] ); - unput( yy_cli_def_text[0] ); + for (i = yy_cli_def_leng - 1; i >= 0; --i) { + unput( tmp[i] ); + } + free(tmp); return return_action(); } -<action>(\n[ \t]+)?.* { +<action>\n?.* { append_action(yy_cli_def_text); } |