-module(xref_parser).
-define(THIS_MODULE, xref_parser).
-export([parse/1, parse_and_scan/1, format_error/1]).

-export([t2s/1]).

-import(lists, [concat/1, flatten/1]).

%%% Syntax of the parse tree:
%%% Start = [Statement]
%%% Statement = {assign, AOp, VarName, Expr}
%%%           | Expr
%%% AOp = tmp | user
%%% Expr = Constants | Variable | Unary | Binary | RegExpr
%%% Constants = {list, [Constant]}  % not empty list
%%%           | {tuple, [Constant]}
%%%           | Constant % only to avoid [ and ] in error messages...
%%% Constant = {constant, 'Fun', vertex, MFA} | 
%%%            {constant, AtomType, vertex, atom()} |
%%%            {constant, 'Fun', edge, {MFA, MFA}} | 
%%%            {constant, AtomType, edge, {atom(), atom()}}
%%% Variable = {variable, VarName}
%%% VarName = atom()
%%% Unary = {set, SetUOp, Expr} 
%%%       | {graph, GraphUOp, Expr}
%%%       | {type, {TypeOp, Type}, Expr}
%%%       | {numeric, NumOp, Expr, Expr}
%%% SetUOp = range | domain | weak | strict
%%% GraphUOp = components | condensation | closure
%%% Binary = {set, SetBOp, Expr, Expr}
%%%        | {restr, RestrOp, Expr, Expr}
%%%        | {path, Expr, Expr}
%%% SetBOp = union | intersection | difference
%%% RestrOp = '|' | '||' | '|||'
%%% TypeOp = type | convert
%%% NumOp = '#'
%%% RegExpr = {regexpr, RExpr, Type}
%%% RExpr = string() | {AtomReg, AtomReg, IntReg}
%%% AtomReg = string() | atom() | variable()
%%% IntReg = string() | integer()
%%% MFA = {atom(), atom(), integer()}
%%% Type = 'Rel' | 'App' | 'Mod' | 'Fun'
%%%      | 'Lin' | 'LLin' | 'XLin' | 'ELin' | 'XXL'
%%% AtomType = unknown | 'Rel' | 'App' | 'Mod'

value_of(Token) ->
    element(3, Token).

prefix(Op, Expr) ->
    case is_prefix_op(Op) of
	false ->
	    return_error(0, ["invalid_operator", Op]);
	UOp ->
	    {UOp, Op, Expr}
    end.

is_prefix_op(range) -> set;
is_prefix_op(domain) -> set;
is_prefix_op(weak) -> set;
is_prefix_op(strict) -> set;
is_prefix_op(components) -> graph;
is_prefix_op(condensation) -> graph;
is_prefix_op(closure) -> graph;
is_prefix_op('#') -> numeric;
is_prefix_op(_) -> false.

check_regexp(String) ->
    case regexp:parse(String) of
	{ok, _Expr} ->
	    {regexpr, String};
	{error, Reason} ->
	    F = regexp:format_error(Reason),
	    return_error(0, ["invalid_regexp", String, F])
    end.

check_regexp_variable('_') ->
    variable;
check_regexp_variable(Var) ->
    return_error(0, ["invalid_regexp_variable", Var]).

regexp(func, RExpr, unknown) ->
    {regexpr, RExpr, 'Fun'};
regexp(_, RExpr, unknown) ->
    return_error(0, ["missing_type", t2s({regexpr, RExpr, unknown})]);
regexp(Kind, RExpr, Type) ->
    E = {type, {type, Type}, {regexpr, RExpr, Type}},
    case Type of
	'Fun' when Kind == func -> E;
	'Mod' when Kind == atom -> E;
	'App' when Kind == atom -> E;
	'Rel' when Kind == atom -> E;
	_Else -> return_error(0, ["type_mismatch", t2s(E)])
    end.

type(Expr, unknown) ->
    Expr;
type(Expr, Type) ->
    {type, {type, Type}, type_constants(Expr, Type, Expr)}.

type_constants({list, L}, Type, E) ->
    {list, type_constants(L, Type, E)};
type_constants({tuple, L}, Type, E) ->
    {tuple, type_constants(L, Type, E)};
type_constants([C | Cs], Type, E) ->
    [type_constants(C, Type, E) | type_constants(Cs, Type, E)];
type_constants([], _Type, _E) ->
    [];
type_constants({constant, unknown, OType, Con}, 'Rel', _E) ->
    {constant, 'Rel', OType, Con};
type_constants({constant, unknown, OType, Con}, 'App', _E) ->
    {constant, 'App', OType, Con};
type_constants({constant, unknown, OType, Con}, 'Mod', _E) ->
    {constant, 'Mod', OType, Con};
type_constants(C={constant, Type, _OType, _Con}, Type, _E) ->
    C;
type_constants(_C, Type, E) ->
    return_error(0, ["type_mismatch", t2s({type, {type, Type}, E})]).

t2s(T) ->
    concat(flatten(e2s(T, 0))).

%% Does not handle list of statements.
e2s({assign, VarType, Name, E}, P) ->
    [left(P, 100), Name, name_it(VarType), e2s(E, 100), right(P, 100)];
e2s({constant, 'Fun', vertex, MFA}, _P) ->
    mfa2s(MFA);
e2s({constant, _Type, vertex, A}, _P) ->
    [c2s(A)];
e2s({constant, 'Fun', edge, {MFA1,MFA2}}, _P) ->
    [mfa2s(MFA1),' -> ',mfa2s(MFA2)];
e2s({constant, _Type, edge, {A1,A2}}, _P) ->
    [c2s(A1),' -> ',c2s(A2)];
e2s({variable, Name}, _P) ->
    [Name];
e2s({list, E}, _P) ->
    ['[', e2s(E, 0), ']'];
e2s({tuple, E}, _P) ->
    ['{', e2s(E, 0), '}'];
e2s({type, {convert, Type}, E}, P) ->
    [left(P, 700), '(',Type,') ', e2s(E, 700), right(P, 700)];
e2s({type, {type, Type}, E}, P) ->
    [left(P, 700), e2s(E, 700), ' : ', Type, right(P, 700)];
e2s({set, Op, E}, P) ->
    [left(P, 700), name_it(Op), ' ', e2s(E, 700), right(P, 700)];
e2s({graph, Op, E}, P) ->
    [left(P, 700), name_it(Op), ' ', e2s(E, 700), right(P, 700)];
e2s({numeric, Op, E}, P) ->
    [left(P, 400), name_it(Op), ' ', e2s(E, 400), right(P, 400)];
e2s({set, Op, E1, E2}, P) ->
    P1 = prio(Op),
    [left(P, P1), e2s(E1, P1),name_it(Op),e2s(E2, P1+50), right(P, P1)];
e2s({path, E1, E2}, P) ->
    P1 = 600,
    [left(P, P1), e2s(E1, P1),' of ',e2s(E2, P1+50), right(P, P1)];
e2s({regexpr, Expr={regexpr,_}, _Type}, _P) ->
    [re(Expr)];
e2s({regexpr, {M,F,A}, _Type}, _P) ->
    [re(M),':',re(F),'/', re(A)];
e2s({restr, Op, E1, E2}, P) ->
    P1 = 500,
    [left(P, P1), e2s(E1, P1),name_it(Op),e2s(E2, P1+50), right(P, P1)];
e2s([], _P) ->
    [];
e2s([E], P) ->
    e2s(E, P);
e2s([E | Es], P) ->
    [e2s(E, P),', ',e2s(Es, P)].

mfa2s({M,F,A}) ->
    [c2s(M),':',c2s(F),'/',A].

c2s(C) ->
    [S] = io_lib:format("~p", [C]),
    list_to_atom(S).

re(variable) -> ['_'];
re({atom, Atom}) -> [Atom];
re({integer, Int}) -> [Int];
re({regexpr, Str}) -> ['"',erlang:list_to_atom(Str),'"'].

left(P1, P2) when P1 > P2 -> ['('];
left(_P1, _P2) -> [].

right(P1, P2) when P1 > P2 -> [')'];
right(_P1, _P2) -> [].

prio(intersection) -> 300;
prio(difference)   -> 200;
prio(union)        -> 200.

name_it(tmp)           -> ' = ';
name_it(user)          -> ' := ';
name_it('|')           -> ' | ';
name_it('||')          -> ' || ';
name_it('|||')         -> ' ||| ';
name_it(union)         -> ' + ';
name_it(intersection)  -> ' * ';
name_it(difference)    -> ' - ';
name_it(Name) -> Name.   

%% ``The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved via the world wide web at http://www.erlang.org/.
%% 
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%% 
%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
%% AB. All Rights Reserved.''
%% 
%%     $Id$
%%

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% The parser generator will insert appropriate declarations before this line.%

parse(Tokens) ->
    case catch yeccpars1(Tokens, false, 0, [], []) of
	error ->
	    Errorline =
		if Tokens == [] -> 0; true -> element(2, hd(Tokens)) end,
	    {error,
	     {Errorline, ?THIS_MODULE, "syntax error at or after this line."}};
	Other ->
	    Other
    end.

parse_and_scan({Mod, Fun, Args}) ->
    case apply(Mod, Fun, Args) of
	{eof, _} ->
	    {ok, eof};
	{error, Descriptor, _} ->
	    {error, Descriptor};
	{ok, Tokens, _} ->
	    yeccpars1(Tokens, {Mod, Fun, Args}, 0, [], [])
    end.

format_error(Message) ->
    case io_lib:deep_char_list(Message) of
	true ->
	    Message;
	_ ->
	    io_lib:write(Message)
    end.

% To be used in grammar files to throw an error message to the parser toplevel.
% Doesn't have to be exported!
return_error(Line, Message) ->
    throw({error, {Line, ?THIS_MODULE, Message}}).


% Don't change yeccpars1/6 too much, it is called recursively by yeccpars2/8!
yeccpars1([Token | Tokens], Tokenizer, State, States, Vstack) ->
    yeccpars2(State, element(1, Token), States, Vstack, Token, Tokens,
	      Tokenizer);
yeccpars1([], {M, F, A}, State, States, Vstack) ->
    case catch apply(M, F, A) of
        {eof, _Endline} ->
            yeccpars1([], false, State, States, Vstack);
        {error, Descriptor, _Endline} ->
            {error, Descriptor};
        {'EXIT', Reason} ->
            {error, {0, ?THIS_MODULE, Reason}};
        {ok, Tokens, _Endline} ->
	    case catch yeccpars1(Tokens, {M, F, A}, State, States, Vstack) of
		error ->
		    Errorline = element(2, hd(Tokens)),
		    {error, {Errorline, ?THIS_MODULE,
			     "syntax error at or after this line."}};
		Other ->
		    Other
	    end
    end;
yeccpars1([], false, State, States, Vstack) ->
    yeccpars2(State, '$end', States, Vstack, {'$end', 999999}, [], false).

% For internal use only.
yeccerror(Token) ->
    {error,
     {element(2, Token), ?THIS_MODULE,
      ["syntax error before: ", yecctoken2string(Token)]}}.

yecctoken2string({atom, _, A}) -> io_lib:write(A);
yecctoken2string({integer,_,N}) -> io_lib:write(N);
yecctoken2string({float,_,F}) -> io_lib:write(F);
yecctoken2string({char,_,C}) -> io_lib:write_char(C);
yecctoken2string({var,_,V}) -> io_lib:format('~s', [V]);
yecctoken2string({string,_,S}) -> io_lib:write_string(S);
yecctoken2string({reserved_symbol, _, A}) -> io_lib:format('~w', [A]);
yecctoken2string({_Cat, _, Val}) -> io_lib:format('~w', [Val]);

yecctoken2string({'dot', _}) -> io_lib:format('~w', ['.']);
yecctoken2string({'$end', _}) ->
    [];
yecctoken2string({Other, _}) when atom(Other) ->
    io_lib:format('~w', [Other]);
yecctoken2string(Other) ->
    io_lib:write(Other).

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


yeccpars2(0, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [0 | __Ss], [__T | __Stack]);
yeccpars2(0, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(1, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  '#',
 yeccpars2(yeccgoto(count_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(2, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, 'cast', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 76, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [2 | __Ss], [__T | __Stack]);
yeccpars2(2, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(3, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [3 | __Ss], [__T | __Stack]);
yeccpars2(3, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [3 | __Ss], [__T | __Stack]);
yeccpars2(3, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [3 | __Ss], [__T | __Stack]);
yeccpars2(3, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(4, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__1),
 yeccpars2(yeccgoto(id, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(5, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [5 | __Ss], [__T | __Stack]);
yeccpars2(5, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(6, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(constant, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(7, 'decl', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 30, [7 | __Ss], [__T | __Stack]);
yeccpars2(7, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  unknown,
 yeccpars2(70, __Cat, [7 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(8, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [8 | __Ss], [__T | __Stack]);
yeccpars2(8, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(9, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__1),
 yeccpars2(yeccgoto(const, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(10, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '*', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 39, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '-', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 41, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, '+', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 40, [10 | __Ss], [__T | __Stack]);
yeccpars2(10, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  [__1],
 yeccpars2(yeccgoto(statements, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(11, ':', __Ss, [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {atom,__1},
 yeccpars2(yeccgoto(regatom, hd(__Ss)), ':', __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(11, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), '#', __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), '(', __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), '[', __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), atom, __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), edge, __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), string, __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), var, __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), vertex, __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(prefix_op, hd(__Ss)), '{', __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(11, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {constant,unknown,vertex,__1},
 yeccpars2(yeccgoto(const, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(12, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [12 | __Ss], [__T | __Stack]);
yeccpars2(12, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(13, ':', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 57, [13 | __Ss], [__T | __Stack]);
yeccpars2(13, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(14, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(expr, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(15, 'decl', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 30, [15 | __Ss], [__T | __Stack]);
yeccpars2(15, ':', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars2(yeccgoto(regatom, hd(__Ss)), ':', __Ss, __Stack, __T, __Ts, __Tzr);
yeccpars2(15, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  unknown,
 yeccpars2(56, __Cat, [15 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(16, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(regatom, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(17, ',', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 54, [17 | __Ss], [__T | __Stack]);
yeccpars2(17, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  [__1],
 yeccpars2(yeccgoto(statements, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(18, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(xref, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(19, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  check_regexp(value_of(__1)),
 yeccpars2(yeccgoto(regstr, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(20, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__1),
 yeccpars2(yeccgoto(variable, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(21, ':', __Ss, [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  check_regexp_variable(__1),
 yeccpars2(yeccgoto(regvar, hd(__Ss)), ':', __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(21, ':=', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 34, [21 | __Ss], [__T | __Stack]);
yeccpars2(21, '=', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 35, [21 | __Ss], [__T | __Stack]);
yeccpars2(21, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {variable,__1},
 yeccpars2(yeccgoto(expr, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(22, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__1),
 yeccpars2(yeccgoto(const, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(23, '$end', _, __Stack, _, _, _) ->
 {ok, hd(__Stack)};
yeccpars2(23, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(24, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [24 | __Ss], [__T | __Stack]);
yeccpars2(24, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [24 | __Ss], [__T | __Stack]);
yeccpars2(24, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [24 | __Ss], [__T | __Stack]);
yeccpars2(24, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(25, ',', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 27, [25 | __Ss], [__T | __Stack]);
yeccpars2(25, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  [],
 yeccpars2(28, __Cat, [25 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(26, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {constant,unknown,vertex,__1},
 yeccpars2(yeccgoto(const, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(27, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [27 | __Ss], [__T | __Stack]);
yeccpars2(27, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [27 | __Ss], [__T | __Stack]);
yeccpars2(27, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [27 | __Ss], [__T | __Stack]);
yeccpars2(27, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(28, '}', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 29, [28 | __Ss], [__T | __Stack]);
yeccpars2(28, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(29, 'decl', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 30, [29 | __Ss], [__T | __Stack]);
yeccpars2(29, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  unknown,
 yeccpars2(31, __Cat, [29 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(30, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__1),
 yeccpars2(yeccgoto(type, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(31, __Cat, __Ss,  [__5,__4,__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  type({tuple,[__2|__3]},__5),
 __Nss = lists:nthtail(4, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(32, ',', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 27, [32 | __Ss], [__T | __Stack]);
yeccpars2(32, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  [],
 yeccpars2(33, __Cat, [32 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(33, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  [__2|__3],
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(constants, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(34, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  user,
 yeccpars2(yeccgoto(assign_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(35, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  tmp,
 yeccpars2(yeccgoto(assign_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(36, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [36 | __Ss], [__T | __Stack]);
yeccpars2(36, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(37, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '*', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 39, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '-', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 41, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, '+', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 40, [37 | __Ss], [__T | __Stack]);
yeccpars2(37, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {assign,__2,__1,__3},
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(statement, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(38, ':', __Ss, [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  check_regexp_variable(__1),
 yeccpars2(yeccgoto(regvar, hd(__Ss)), ':', __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(38, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {variable,__1},
 yeccpars2(yeccgoto(expr, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(39, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  intersection,
 yeccpars2(yeccgoto(mult_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(40, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  union,
 yeccpars2(yeccgoto(add_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(41, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  difference,
 yeccpars2(yeccgoto(add_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(42, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [42 | __Ss], [__T | __Stack]);
yeccpars2(42, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(43, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [43 | __Ss], [__T | __Stack]);
yeccpars2(43, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(44, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  'of',
 yeccpars2(yeccgoto(path_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(45, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [45 | __Ss], [__T | __Stack]);
yeccpars2(45, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(46, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [46 | __Ss], [__T | __Stack]);
yeccpars2(46, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(47, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  '|',
 yeccpars2(yeccgoto(restr_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(48, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  '||',
 yeccpars2(yeccgoto(restr_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(49, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  '|||',
 yeccpars2(yeccgoto(restr_op, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(50, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [50 | __Ss], [__T | __Stack]);
yeccpars2(50, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {restr,__2,__1,__3},
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(51, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {path,__1,__3},
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(52, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [52 | __Ss], [__T | __Stack]);
yeccpars2(52, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [52 | __Ss], [__T | __Stack]);
yeccpars2(52, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [52 | __Ss], [__T | __Stack]);
yeccpars2(52, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [52 | __Ss], [__T | __Stack]);
yeccpars2(52, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {set,__2,__1,__3},
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(53, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [53 | __Ss], [__T | __Stack]);
yeccpars2(53, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [53 | __Ss], [__T | __Stack]);
yeccpars2(53, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [53 | __Ss], [__T | __Stack]);
yeccpars2(53, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [53 | __Ss], [__T | __Stack]);
yeccpars2(53, '*', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 39, [53 | __Ss], [__T | __Stack]);
yeccpars2(53, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {set,__2,__1,__3},
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(54, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, 'vertex', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 22, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, 'edge', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 9, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, '(', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 2, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, '{', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 24, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, '[', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 3, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, '#', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 1, [54 | __Ss], [__T | __Stack]);
yeccpars2(54, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(55, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  [__1|__3],
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(statements, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(56, __Cat, __Ss,  [__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  regexp(atom,__1,__2),
 __Nss = lists:nthtail(1, __Ss),
 yeccpars2(yeccgoto(regexp, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(57, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [57 | __Ss], [__T | __Stack]);
yeccpars2(57, 'atom', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 4, [57 | __Ss], [__T | __Stack]);
yeccpars2(57, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [57 | __Ss], [__T | __Stack]);
yeccpars2(57, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(58, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {atom,__1},
 yeccpars2(yeccgoto(regatom, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(59, '/', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 62, [59 | __Ss], [__T | __Stack]);
yeccpars2(59, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(60, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(regatom, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(61, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  check_regexp_variable(__1),
 yeccpars2(yeccgoto(regvar, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(62, 'var', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 20, [62 | __Ss], [__T | __Stack]);
yeccpars2(62, 'string', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 19, [62 | __Ss], [__T | __Stack]);
yeccpars2(62, 'integer', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 63, [62 | __Ss], [__T | __Stack]);
yeccpars2(62, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(63, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {integer,value_of(__1)},
 yeccpars2(yeccgoto(regint, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(64, 'decl', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 30, [64 | __Ss], [__T | __Stack]);
yeccpars2(64, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  unknown,
 yeccpars2(67, __Cat, [64 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(65, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(regint, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(66, __Cat, __Ss,  [__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __1,
 yeccpars2(yeccgoto(regint, hd(__Ss)), __Cat, __Ss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(67, __Cat, __Ss,  [__6,__5,__4,__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  regexp(func,{__1,__3,__5},__6),
 __Nss = lists:nthtail(5, __Ss),
 yeccpars2(yeccgoto(regexp, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(68, __Cat, __Ss,  [__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  prefix(__1,__2),
 __Nss = lists:nthtail(1, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(69, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [69 | __Ss], [__T | __Stack]);
yeccpars2(69, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [69 | __Ss], [__T | __Stack]);
yeccpars2(69, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [69 | __Ss], [__T | __Stack]);
yeccpars2(69, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [69 | __Ss], [__T | __Stack]);
yeccpars2(69, __Cat, __Ss,  [__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  prefix(__1,__2),
 __Nss = lists:nthtail(1, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(70, __Cat, __Ss,  [__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  type(__1,__2),
 __Nss = lists:nthtail(1, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(71, __Cat, __Ss,  [__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  {type,{convert,__1},__2},
 __Nss = lists:nthtail(1, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(72, ',', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 27, [72 | __Ss], [__T | __Stack]);
yeccpars2(72, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  [],
 yeccpars2(73, __Cat, [72 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(73, ']', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 74, [73 | __Ss], [__T | __Stack]);
yeccpars2(73, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(74, 'decl', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 30, [74 | __Ss], [__T | __Stack]);
yeccpars2(74, __Cat, __Ss,  __Stack, __T, __Ts, __Tzr) ->
 __Val =  unknown,
 yeccpars2(75, __Cat, [74 | __Ss], [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(75, __Cat, __Ss,  [__5,__4,__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  type({list,[__2|__3]},__5),
 __Nss = lists:nthtail(4, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(76, ')', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 79, [76 | __Ss], [__T | __Stack]);
yeccpars2(76, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(77, ')', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 78, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, 'of', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 44, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '|||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 49, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '||', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 48, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '|', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 47, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '*', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 39, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '-', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 41, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, '+', __Ss, __Stack, __T, __Ts, __Tzr) ->
 yeccpars1(__Ts, __Tzr, 40, [77 | __Ss], [__T | __Stack]);
yeccpars2(77, _, _, _, __T, _, _) ->
 yeccerror(__T);
yeccpars2(78, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  __2,
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(expr, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(79, __Cat, __Ss,  [__3,__2,__1|__Stack], __T, __Ts, __Tzr) ->
 __Val =  value_of(__2),
 __Nss = lists:nthtail(2, __Ss),
 yeccpars2(yeccgoto(cast_op, hd(__Nss)), __Cat, __Nss, [__Val | __Stack], __T, __Ts, __Tzr);
yeccpars2(__Other, _, _, _, _, _, _) ->
 exit({parser, __Other, missing_state_in_action_table}).

yeccgoto(add_op, 10) ->
 42;
yeccgoto(add_op, 37) ->
 42;
yeccgoto(add_op, 50) ->
 42;
yeccgoto(add_op, 51) ->
 42;
yeccgoto(add_op, 52) ->
 42;
yeccgoto(add_op, 53) ->
 42;
yeccgoto(add_op, 68) ->
 42;
yeccgoto(add_op, 69) ->
 42;
yeccgoto(add_op, 71) ->
 42;
yeccgoto(add_op, 77) ->
 42;
yeccgoto(assign_op, 21) ->
 36;
yeccgoto(cast_op, 0) ->
 5;
yeccgoto(cast_op, 2) ->
 5;
yeccgoto(cast_op, 5) ->
 5;
yeccgoto(cast_op, 8) ->
 5;
yeccgoto(cast_op, 12) ->
 5;
yeccgoto(cast_op, 36) ->
 5;
yeccgoto(cast_op, 42) ->
 5;
yeccgoto(cast_op, 43) ->
 5;
yeccgoto(cast_op, 45) ->
 5;
yeccgoto(cast_op, 46) ->
 5;
yeccgoto(cast_op, 54) ->
 5;
yeccgoto(const, 0) ->
 6;
yeccgoto(const, 2) ->
 6;
yeccgoto(const, 3) ->
 6;
yeccgoto(const, 5) ->
 6;
yeccgoto(const, 8) ->
 6;
yeccgoto(const, 12) ->
 6;
yeccgoto(const, 24) ->
 6;
yeccgoto(const, 27) ->
 6;
yeccgoto(const, 36) ->
 6;
yeccgoto(const, 42) ->
 6;
yeccgoto(const, 43) ->
 6;
yeccgoto(const, 45) ->
 6;
yeccgoto(const, 46) ->
 6;
yeccgoto(const, 54) ->
 6;
yeccgoto(constant, 0) ->
 7;
yeccgoto(constant, 2) ->
 7;
yeccgoto(constant, 3) ->
 72;
yeccgoto(constant, 5) ->
 7;
yeccgoto(constant, 8) ->
 7;
yeccgoto(constant, 12) ->
 7;
yeccgoto(constant, 24) ->
 25;
yeccgoto(constant, 27) ->
 32;
yeccgoto(constant, 36) ->
 7;
yeccgoto(constant, 42) ->
 7;
yeccgoto(constant, 43) ->
 7;
yeccgoto(constant, 45) ->
 7;
yeccgoto(constant, 46) ->
 7;
yeccgoto(constant, 54) ->
 7;
yeccgoto(constants, 25) ->
 28;
yeccgoto(constants, 32) ->
 33;
yeccgoto(constants, 72) ->
 73;
yeccgoto(count_op, 0) ->
 8;
yeccgoto(count_op, 2) ->
 8;
yeccgoto(count_op, 5) ->
 8;
yeccgoto(count_op, 8) ->
 8;
yeccgoto(count_op, 12) ->
 8;
yeccgoto(count_op, 36) ->
 8;
yeccgoto(count_op, 42) ->
 8;
yeccgoto(count_op, 43) ->
 8;
yeccgoto(count_op, 45) ->
 8;
yeccgoto(count_op, 46) ->
 8;
yeccgoto(count_op, 54) ->
 8;
yeccgoto(expr, 0) ->
 10;
yeccgoto(expr, 2) ->
 77;
yeccgoto(expr, 5) ->
 71;
yeccgoto(expr, 8) ->
 69;
yeccgoto(expr, 12) ->
 68;
yeccgoto(expr, 36) ->
 37;
yeccgoto(expr, 42) ->
 53;
yeccgoto(expr, 43) ->
 52;
yeccgoto(expr, 45) ->
 51;
yeccgoto(expr, 46) ->
 50;
yeccgoto(expr, 54) ->
 10;
yeccgoto(id, 0) ->
 11;
yeccgoto(id, 2) ->
 11;
yeccgoto(id, 3) ->
 26;
yeccgoto(id, 5) ->
 11;
yeccgoto(id, 8) ->
 11;
yeccgoto(id, 12) ->
 11;
yeccgoto(id, 24) ->
 26;
yeccgoto(id, 27) ->
 26;
yeccgoto(id, 36) ->
 11;
yeccgoto(id, 42) ->
 11;
yeccgoto(id, 43) ->
 11;
yeccgoto(id, 45) ->
 11;
yeccgoto(id, 46) ->
 11;
yeccgoto(id, 54) ->
 11;
yeccgoto(id, 57) ->
 58;
yeccgoto(mult_op, 10) ->
 43;
yeccgoto(mult_op, 37) ->
 43;
yeccgoto(mult_op, 50) ->
 43;
yeccgoto(mult_op, 51) ->
 43;
yeccgoto(mult_op, 52) ->
 43;
yeccgoto(mult_op, 53) ->
 43;
yeccgoto(mult_op, 68) ->
 43;
yeccgoto(mult_op, 69) ->
 43;
yeccgoto(mult_op, 71) ->
 43;
yeccgoto(mult_op, 77) ->
 43;
yeccgoto(path_op, 10) ->
 45;
yeccgoto(path_op, 37) ->
 45;
yeccgoto(path_op, 50) ->
 45;
yeccgoto(path_op, 51) ->
 45;
yeccgoto(path_op, 52) ->
 45;
yeccgoto(path_op, 53) ->
 45;
yeccgoto(path_op, 68) ->
 45;
yeccgoto(path_op, 69) ->
 45;
yeccgoto(path_op, 71) ->
 45;
yeccgoto(path_op, 77) ->
 45;
yeccgoto(prefix_op, 0) ->
 12;
yeccgoto(prefix_op, 2) ->
 12;
yeccgoto(prefix_op, 5) ->
 12;
yeccgoto(prefix_op, 8) ->
 12;
yeccgoto(prefix_op, 12) ->
 12;
yeccgoto(prefix_op, 36) ->
 12;
yeccgoto(prefix_op, 42) ->
 12;
yeccgoto(prefix_op, 43) ->
 12;
yeccgoto(prefix_op, 45) ->
 12;
yeccgoto(prefix_op, 46) ->
 12;
yeccgoto(prefix_op, 54) ->
 12;
yeccgoto(regatom, 0) ->
 13;
yeccgoto(regatom, 2) ->
 13;
yeccgoto(regatom, 5) ->
 13;
yeccgoto(regatom, 8) ->
 13;
yeccgoto(regatom, 12) ->
 13;
yeccgoto(regatom, 36) ->
 13;
yeccgoto(regatom, 42) ->
 13;
yeccgoto(regatom, 43) ->
 13;
yeccgoto(regatom, 45) ->
 13;
yeccgoto(regatom, 46) ->
 13;
yeccgoto(regatom, 54) ->
 13;
yeccgoto(regatom, 57) ->
 59;
yeccgoto(regexp, 0) ->
 14;
yeccgoto(regexp, 2) ->
 14;
yeccgoto(regexp, 5) ->
 14;
yeccgoto(regexp, 8) ->
 14;
yeccgoto(regexp, 12) ->
 14;
yeccgoto(regexp, 36) ->
 14;
yeccgoto(regexp, 42) ->
 14;
yeccgoto(regexp, 43) ->
 14;
yeccgoto(regexp, 45) ->
 14;
yeccgoto(regexp, 46) ->
 14;
yeccgoto(regexp, 54) ->
 14;
yeccgoto(regint, 62) ->
 64;
yeccgoto(regstr, 0) ->
 15;
yeccgoto(regstr, 2) ->
 15;
yeccgoto(regstr, 5) ->
 15;
yeccgoto(regstr, 8) ->
 15;
yeccgoto(regstr, 12) ->
 15;
yeccgoto(regstr, 36) ->
 15;
yeccgoto(regstr, 42) ->
 15;
yeccgoto(regstr, 43) ->
 15;
yeccgoto(regstr, 45) ->
 15;
yeccgoto(regstr, 46) ->
 15;
yeccgoto(regstr, 54) ->
 15;
yeccgoto(regstr, 57) ->
 60;
yeccgoto(regstr, 62) ->
 65;
yeccgoto(regvar, 0) ->
 16;
yeccgoto(regvar, 2) ->
 16;
yeccgoto(regvar, 5) ->
 16;
yeccgoto(regvar, 8) ->
 16;
yeccgoto(regvar, 12) ->
 16;
yeccgoto(regvar, 36) ->
 16;
yeccgoto(regvar, 42) ->
 16;
yeccgoto(regvar, 43) ->
 16;
yeccgoto(regvar, 45) ->
 16;
yeccgoto(regvar, 46) ->
 16;
yeccgoto(regvar, 54) ->
 16;
yeccgoto(regvar, 57) ->
 16;
yeccgoto(regvar, 62) ->
 66;
yeccgoto(restr_op, 10) ->
 46;
yeccgoto(restr_op, 37) ->
 46;
yeccgoto(restr_op, 50) ->
 46;
yeccgoto(restr_op, 51) ->
 46;
yeccgoto(restr_op, 52) ->
 46;
yeccgoto(restr_op, 53) ->
 46;
yeccgoto(restr_op, 68) ->
 46;
yeccgoto(restr_op, 69) ->
 46;
yeccgoto(restr_op, 71) ->
 46;
yeccgoto(restr_op, 77) ->
 46;
yeccgoto(statement, 0) ->
 17;
yeccgoto(statement, 54) ->
 17;
yeccgoto(statements, 0) ->
 18;
yeccgoto(statements, 54) ->
 55;
yeccgoto(type, 7) ->
 70;
yeccgoto(type, 15) ->
 56;
yeccgoto(type, 29) ->
 31;
yeccgoto(type, 64) ->
 67;
yeccgoto(type, 74) ->
 75;
yeccgoto(variable, 0) ->
 21;
yeccgoto(variable, 2) ->
 38;
yeccgoto(variable, 5) ->
 38;
yeccgoto(variable, 8) ->
 38;
yeccgoto(variable, 12) ->
 38;
yeccgoto(variable, 36) ->
 38;
yeccgoto(variable, 42) ->
 38;
yeccgoto(variable, 43) ->
 38;
yeccgoto(variable, 45) ->
 38;
yeccgoto(variable, 46) ->
 38;
yeccgoto(variable, 54) ->
 21;
yeccgoto(variable, 57) ->
 61;
yeccgoto(variable, 62) ->
 61;
yeccgoto(xref, 0) ->
 23;
yeccgoto(__Symbol, __State) ->
 exit({__Symbol, __State, missing_in_goto_table}).


