]> Nishi Git Mirror - dataworks.git/commitdiff
add comment
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sun, 9 Jun 2024 13:07:29 +0000 (13:07 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sun, 9 Jun 2024 13:07:29 +0000 (13:07 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@194 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Grammar/dw.l
Grammar/dw.y
PKGBUILD
dataworks.vim
increment-PKGBUILD

index d275087836ce054781890d6f0341806863ea67cb..f41c6c81f08499b0eb26fd23ee5686206feaf0af 100644 (file)
@@ -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;
index 58666381a3f35d75736cfc6e2bd5d6b2d73c63d0..18e8f41aed85fe08829a6caf416c4ff9f5726d91 100644 (file)
@@ -31,7 +31,7 @@
 #include <stdio.h>
 %}
 
-%token IDENTIFIER STRING NUMBER SPACE
+%token IDENTIFIER STRING NUMBER SPACE COMMENT
 %start command
 
 %union {
@@ -152,6 +152,12 @@ command
                $<node>$.nodes = $<node>3.nodes;
                $<node>$.type = $<node>1.type;
        }
+       | COMMENT {
+               $<node>$.string = NULL;
+               $<node>$.ident = NULL;
+               $<node>$.nodes = NULL;
+               $<node>$.type = 'C';
+       }
        ;
 
 %%
index 7f37d8498b7ae68583b125d83333ff949565685e..154ba801317469e553d363c2510c2dc3a9540f10 100644 (file)
--- 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() {
index 7ad7bef336d3cd9c502a9321ea73af42a83dc4c0..bbb099a65329fee5bcbb3f2702c0ec2cba8ff073 100644 (file)
@@ -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
 
index e85087affded170efcbc6f9672a6fc671d839ed0..f5c89552bd3e62bfce023a230e90d141f7a46b2f 100644 (file)
@@ -1 +1 @@
-31
+32