From: Christian Bauer Date: Wed, 21 Jun 2000 21:05:38 +0000 (+0000) Subject: - '#' as the first character of a line starts a comment X-Git-Tag: release_0-6-2~4 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=2acf71f4ed17c31f59f0449efa6793cfeb28eb85;ds=sidebyside - '#' as the first character of a line starts a comment --- diff --git a/ginsh/ginsh.1 b/ginsh/ginsh.1 index b84aca96..199b0e85 100644 --- a/ginsh/ginsh.1 +++ b/ginsh/ginsh.1 @@ -39,7 +39,9 @@ or type an EOF (Ctrl-D) at the prompt. .SS COMMENTS Anything following a double slash .RB ( // ) -up to the end of the line is treated as a comment and ignored. +up to the end of the line, and all lines starting with a hash mark +.RB ( # ) +are treated as a comment and ignored. .SS NUMBERS ginsh accepts numbers in the usual decimal notations. This includes arbitrary precision integers and rationals as well as floating point numbers in standard diff --git a/ginsh/ginsh_lexer.ll b/ginsh/ginsh_lexer.ll index d27d0fe2..ff585dab 100644 --- a/ginsh/ginsh_lexer.ll +++ b/ginsh/ginsh_lexer.ll @@ -56,6 +56,7 @@ AN [0-9a-zA-Z_] [ \t\n]+ /* skip whitespace */ \\$ /* skip line continuations */ "//".* /* skip comments starting with "//" */ +^"#".* /* skip lines starting with "#" */ ^"!".* system(yytext + 1); /* execute shell command */ /* special values */