Name identifiers with line and character position information.
Exemple #1
0
        internal STModel GetST(Identifier name)
        {
            STModel st = null;
            if (stMap.TryGetValue(name.Name, out st))
                return st;
            else
            {
                BekProgram prog = null;
                if (bekMap.TryGetValue(name.Name, out prog))
                {
                    if (converter == null)  //same local functions for all bek programs
                        converter = BekConverter.MkBekToSTbConverter(solver, prog.ast.funcs, prog.ast.name);

                    st = converter.Convert(prog).ExploreBools().ToST();
                    st.Name = name.Name;
                    stMap[name.Name] = st;
                    return st;
                }
                else
                {
                    throw new QueryParseException(name.Line, name.Pos, string.Format("Undefined transducer: {0}", name));
                }
            }
        }
Exemple #2
0
 internal Expression(Identifier symb, ExpressionKind kind, params Expression[] exprs)
 {
     this.symbol = symb;
     this.kind = kind;
     this.subexpressions = new List<Expression>(exprs);
 }
Exemple #3
0
 internal SFAModel GetSFA(Identifier name)
 {
     SFAModel sfa = null;
     if (sfaMap.TryGetValue(name.Name, out sfa))
         return sfa;
     else
         throw new QueryParseException(name.Line, name.Pos, string.Format("Undefined automaton '{0}'", name.Name));
 }
Exemple #4
0
 internal Expression(string symb, ExpressionKind kind, params Expression[] exprs)
 {
     this.symbol = new Identifier(symb,1,1) ;
     this.kind = kind;
     this.subexpressions = new List<Expression>(exprs);
 }
Exemple #5
0
 public DotExpression(Expression expr, Identifier count)
     : base("dot", ExpressionKind.Query, expr)
 {
     int k;
     if (!int.TryParse(count.Name, out k))
         throw new Bek.Query.QueryParseException(count.Line, count.Pos, "Invalid element count");
     NrOfElements = k;
 }
Exemple #6
0
 public VariableExpression(Identifier s)
     : base(s, ExpressionKind.Variable)
 {
 }
Exemple #7
0
 internal static StringExpression Mk(Identifier id)
 {
     return new StringExpression(id, PreProcessString(id.Name));
 }
Exemple #8
0
 StringExpression(Identifier id, string s_val)
     : base(id, ExpressionKind.Automaton)
 {
     this.s_value = s_val;
 }