URI: 
       tnew backquote syntax - plan9port - [fork] Plan 9 from user space
  HTML git clone git://src.adamsgaard.dk/plan9port
   DIR Log
   DIR Files
   DIR Refs
   DIR README
   DIR LICENSE
       ---
   DIR commit 6c7ed6b0e6086e32710a0d42e034bce6bdaad7b0
   DIR parent c8661ffad4c2bbf1dd9138c4e8de7d86396cd070
  HTML Author: rsc <devnull@localhost>
       Date:   Tue, 29 Nov 2005 04:23:33 +0000
       
       new backquote syntax
       
       Diffstat:
         M src/cmd/acid/lex.c                  |      30 ++++++++++++++++++++++++++++++
       
       1 file changed, 30 insertions(+), 0 deletions(-)
       ---
   DIR diff --git a/src/cmd/acid/lex.c b/src/cmd/acid/lex.c
       t@@ -342,6 +342,33 @@ eatnl(void)
        }
        
        int
       +bqsymbol(void)
       +{
       +        int c;
       +        char *p;
       +        Lsym *s;
       +
       +        symbol[0] = 0;
       +        p = symbol;
       +        while((c = lexc()) != '`'){
       +                if(c == Eof)
       +                        error("eof in backquote");
       +                if(c == '\n')
       +                        error("newline in backquote");
       +                *p++ = c;
       +        }
       +        if(p >= symbol+sizeof symbol)
       +                sysfatal("overflow in bqsymbol");
       +        *p = 0;
       +        
       +        s = look(symbol);
       +        if(s == 0)
       +                s = enter(symbol, Tid);
       +        yylval.sym = s;
       +        return s->lexval;
       +}
       +
       +int
        yylex(void)
        {
                int c;
       t@@ -360,6 +387,9 @@ loop:
                        }
                        return Eof;
        
       +        case '`':
       +                return bqsymbol();
       +
                case '"':
                        eatstring();
                        return Tstring;