mirror of
https://github.com/danog/liquid.git
synced 2025-01-23 02:11:16 +01:00
18 lines
244 B
Plaintext
18 lines
244 B
Plaintext
%{
|
|
package main
|
|
import (
|
|
_ "fmt"
|
|
)
|
|
%}
|
|
%union {
|
|
name string
|
|
val func(Context) interface{}
|
|
}
|
|
%type <val> expr
|
|
%token <val> LITERAL IDENTIFIER
|
|
%token <name> RELATION
|
|
%%
|
|
top: expr { yylex.(*lexer).val = $1 };
|
|
|
|
expr: LITERAL | IDENTIFIER;
|