syntax docker

list -i instruction \
    ADD CMD COPY ENTRYPOINT ENV EXPOSE FROM MAINTAINER ONBUILD RUN \
    USER VOLUME WORKDIR

state start
    char -b a-zA-Z ident
    char # comment
    char -n " \t\n" bad
    eat this

state ident
    char -b a-zA-Z this
    char -bn " \t\n" bad error
    inlist instruction arguments keyword
    noeat -b bad

state arguments
    str "\\\n" this
    char "\n" start
    eat this

state comment
    char "\n" start
    eat this

state bad error
    recolor error
    char " \t" arguments
    char "\n" start
    eat this
