Q:

"Syntax in assignment statement l-value" Why is this code not compiling? 

module FiniteStateMachine(output reg [2:0] Count, input clock, reset);
reg[2:0] state, next_state;

parameter S0 = 3'b000, S1 = 3'b001, S2 = 3'b010, S3 = 3'b011, S4 = 3'b100, S5 = 3'b101, S6 = 3'b110, S7 = 3'b111;
always @ (posedge clock, negedge reset)
    if(reset==0) state<=S0;
    else state <= next_state;

always @ (state)
    case(state)
        S0: begin
                Count = S0;
                next_state = S1;
            end
        S1: begin
                Count = S1;
                next_state = S2;
            end
        S2: begin
                Count = S3;
                next_state = S3;
            end
        S3: begin
                Count = S7;
                next_state = S4:
            end
        S4: begin
                Count = S6;
                next_state = S5;
            end
        S5: begin
            Count = S4;
                next_state = S0;
            end
        endcase
endmodule

Getting the error "Syntax in assignment statement l-value".  I've also tried "<=" instead of "=" for all the assignments in case, but I'm getting the same error. 

A:

You used a colon instead of a semicolon.   Change:
        next_state = S4:

to:
        next_state = S4;

