Ejemplo n.º 1
0
 private static void updateChecksum(Checksum checksum, int value)
 {
     checksum.Update((value) & 0xFF);
     checksum.Update((int)((uint)value >> 8) & 0xFF);
     checksum.Update((int)((uint)value >> 16) & 0xFF);
     checksum.Update((int)((uint)value >> 24) & 0xFF);
 }
Ejemplo n.º 2
0
        private static void updateChecksum(Checksum checksum, IToken token)
        {
            if (token == null)
            {
                checksum.Update(0);
                return;
            }

            updateChecksum(checksum, token.StartIndex);
            updateChecksum(checksum, token.StopIndex);
            updateChecksum(checksum, token.Line);
            updateChecksum(checksum, token.Column);
            updateChecksum(checksum, token.Type);
            updateChecksum(checksum, token.Channel);
        }
Ejemplo n.º 3
0
        private static void updateChecksum(Checksum checksum, IToken token)
        {
            if (token == null)
            {
                checksum.Update(0);
                return;
            }

            updateChecksum(checksum, token.StartIndex);
            updateChecksum(checksum, token.StopIndex);
            updateChecksum(checksum, token.Line);
            updateChecksum(checksum, token.Column);
            updateChecksum(checksum, token.Type);
            updateChecksum(checksum, token.Channel);
        }
Ejemplo n.º 4
0
 public void VisitTerminal(ITerminalNode node)
 {
     checksum.Update(VISIT_TERMINAL);
     updateChecksum(checksum, node.Symbol);
 }
Ejemplo n.º 5
0
 private static void updateChecksum(Checksum checksum, int value)
 {
     checksum.Update((value) & 0xFF);
     checksum.Update((int)((uint)value >> 8) & 0xFF);
     checksum.Update((int)((uint)value >> 16) & 0xFF);
     checksum.Update((int)((uint)value >> 24) & 0xFF);
 }