From: nishi Date: Sun, 9 Jun 2024 13:07:29 +0000 (+0000) Subject: add comment X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=bf0935ca2643f98e7464d506bda7dc048b7b9469;p=dataworks.git add comment git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@194 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Grammar/dw.l b/Grammar/dw.l index d275087..f41c6c8 100644 --- a/Grammar/dw.l +++ b/Grammar/dw.l @@ -37,6 +37,8 @@ double __dw_atof(const char* str); %% +#.* { return (COMMENT); } + ["][^"]*["] { yylval.node.string = strdup(yytext + 1); yylval.node.string[strlen(yylval.node.string) - 1] = 0; diff --git a/Grammar/dw.y b/Grammar/dw.y index 5866638..18e8f41 100644 --- a/Grammar/dw.y +++ b/Grammar/dw.y @@ -31,7 +31,7 @@ #include %} -%token IDENTIFIER STRING NUMBER SPACE +%token IDENTIFIER STRING NUMBER SPACE COMMENT %start command %union { @@ -152,6 +152,12 @@ command $$.nodes = $3.nodes; $$.type = $1.type; } + | COMMENT { + $$.string = NULL; + $$.ident = NULL; + $$.nodes = NULL; + $$.type = 'C'; + } ; %% diff --git a/PKGBUILD b/PKGBUILD index 7f37d84..154ba80 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -5,9 +5,9 @@ pkgver='0.1.0' pkgdesc='Database System' arch=('i686' 'x86_64') license=('BSD') -pkgrel='30' +pkgrel='31' makedepends=('byacc') -source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision=193') +source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision=194') sha256sums=('SKIP') build() { diff --git a/dataworks.vim b/dataworks.vim index 7ad7bef..bbb099a 100644 --- a/dataworks.vim +++ b/dataworks.vim @@ -11,7 +11,7 @@ endif syn match dataworksString /\v"[^"]+"/ display syn match dataworksString /\v'[^']+'/ display syn match dataworksNumber /\v[+-]?[0-9]+(\.[0-9]+)?/ display -syn match dataworksComment /\v#.+$/ display +syn match dataworksComment /\v#.*$/ display syn region dataworksArgument start='(' end=')' fold transparent syn match dataworksIdent /\v\c(create_table|use|insert|version)/ display diff --git a/increment-PKGBUILD b/increment-PKGBUILD index e85087a..f5c8955 100644 --- a/increment-PKGBUILD +++ b/increment-PKGBUILD @@ -1 +1 @@ -31 +32