You are not logged in.

#1 2011-02-27 14:56:54

abarahc
Member
Registered: 2010-04-30
Posts: 128

improving syntax java.nanorc

I'm trying to resolve the java.nanorc RE, but I'm not getting much success! itself is the problem with the comment lines

## Here is an example for Java.
##
syntax "java" "\.java$"
color green "\<(boolean|byte|char|double|float|int|long|new|short|this|transient|void)\>"
color red "\<(break|case|catch|continue|default|do|else|finally|for|if|return|switch|throw|try|while)\>"
color cyan "\<(abstract|class|extends|final|implements|import|instanceof|interface|native|package|private|protected|public|static|strictfp|super|synchronized|throws|volatile)\>"
color magenta "\<(\+|\-)\>"
color red ""[^"]*""
color yellow "\<(true|false|null)\>"
color blue "//.*"
color blue start="/\*" end="\*/"
color brightblue start="/\*\*" end="\*/"
color ,white "[[:space:]]+$"

when I am concatenating strings ("a" + "b ") the syntax works. but when there are events such as spices ("jdbc: mysql ://"+"...")
rules give priority to the "//" that is marked as comment. how can I filter these special events in the strings?


user@localhost $ grep -rnw "." -e "hacking"

Offline

Board footer

Powered by FluxBB