summaryrefslogtreecommitdiff
path: root/g.peg
diff options
context:
space:
mode:
Diffstat (limited to 'g.peg')
-rw-r--r--g.peg2
1 files changed, 2 insertions, 0 deletions
diff --git a/g.peg b/g.peg
index 3c75ab9..172938f 100644
--- a/g.peg
+++ b/g.peg
@@ -25,6 +25,7 @@ expr <-
l:list { $$ = l; }
/ n:number { $$ = n; }
/ s:symbol { $$ = s; }
+ / t:string { $$ = t; }
list <- { $$ = astnode_new_list(); }
'('
@@ -34,6 +35,7 @@ list <- { $$ = astnode_new_list(); }
number <- < [0-9]+ > (! ident_char) _ { $$ = astnode_new_num(atoi($1)); }
symbol <- < ident_char+ > _ { $$ = astnode_new_symbol(strdup($1)); }
+string <- '"' < [^"]+ > '"' { $$ = astnode_new_string(strdup($1)); }
ident_char <- [-_a-zA-Z'+*0-9]
_ <- [ \t\n]*