compiler /System.cs

Language C# Lines 36
MD5 Hash e4623f1640b27a1ce097e53754b396ed Estimated Cost $680 (why?)
Repository https://bitbucket.org/cvillamor/compiler.git View Raw File
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Compiler_
{
    class SystemC
    {
        private Dictionary<string, Record> m_SystemCalls;

        public SystemC()
        {
            m_SystemCalls = new Dictionary<string, Record>();
            CreateSystemFuncs();
            CreateSystemProcs();
        }

        public Dictionary<string, Record> SystemCalls
        {
            get { return m_SystemCalls; }
        }

        void CreateSystemFuncs()
        {
            SystemCalls.Add("abs", new SystemCallRecord("abs", TOKEN_TYPES.TK_SYS_FUNC, 1));
        }

        void CreateSystemProcs()
        {
            SystemCalls.Add("write", new SystemCallRecord("write", TOKEN_TYPES.TK_SYS_PROC, 1));
            SystemCalls.Add("writeln", new SystemCallRecord("writeln", TOKEN_TYPES.TK_SYS_PROC, 2));
        }
    }
}
Back to Top