|
Author |
Topic: colour coding (Read 264 times) |
|
benelek
|
colour coding
« on: Jun 6th, 2003, 10:00am » |
|
ceil() and floor() aren't colour-coded as p5 syntax.
|
|
|
|
fry
|
Re: colour coding
« Reply #1 on: Jun 8th, 2003, 5:38pm » |
|
thanks for the note. just fixed for 0056.
|
|
|
|
fry
|
Re: colour coding
« Reply #3 on: Jun 9th, 2003, 2:38pm » |
|
k, i've added a few of the classes from java.lang as well. for the time being, the coloring is dumb, that it just uses word matching. hopefully we'll have a context-based colorer soon.
|
|
|
|
benelek
|
Re: colour coding
« Reply #4 on: Jun 9th, 2003, 3:06pm » |
|
sorry to ask this before you've put it into effect, but how would a context colouring engine work? i'd love to be able to map out the relationships between parts of the java language without typing it in manually... if only for the purposes of info.vis.
|
|
|
|
fry
|
Re: colour coding
« Reply #5 on: Jun 9th, 2003, 5:58pm » |
|
it's based on the way a real parser works.. that the language is broken down into tokens, and actually has a hierarchy based on how its parsed. so for instance a line like: int a = 4; breaks into something like: [ VARIABLE_TYPE ] [ VARIABLE_NAME ] [ ASSIGNMENT_OPERATOR ] [ CONSTANT ] [ TERMINATOR ] and each of those 'types' of structure have a color assigned to them. so we'd have one color for "VARIABLE_TYPE", rather than trying to guess what types everyone will use (int, char, String, etc) that's not the actual phrasing from the parser, it's only an example. but a place to start would be looking into "javacup" (which is a java-based parser) and bnf grammars (the type of 'grammar' used to break up syntax). cool, if mind bending, stuff.
|
|
|
|
|