FAQ
Cover
This is the archive Discourse for the Processing (ALPHA) software.
Please visit the new Processing forum for current information.

   Processing 1.0 _ALPHA_
   Bugs
   Bug Fixes, Implemented Suggestions
(Moderator: fry)
   colour coding
« Previous topic | Next topic »

Pages: 1 
   Author  Topic: colour coding  (Read 264 times)
benelek

35160983516098 WWW Email
colour coding
« on: Jun 6th, 2003, 10:00am »

ceil() and floor() aren't colour-coded as p5 syntax.
 
fry


WWW
Re: colour coding
« Reply #1 on: Jun 8th, 2003, 5:38pm »

thanks for the note. just fixed for 0056.
 
mKoser

WWW Email
Re: colour coding
« Reply #2 on: Jun 9th, 2003, 11:03am »

the same problem applies to String()
 
- mikkel
« Last Edit: Jun 9th, 2003, 11:03am by mKoser »  

mikkel crone koser | www.beyondthree.com | http://processing.beyondthree.com
fry


WWW
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

35160983516098 WWW Email
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


WWW
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.
 
Pages: 1 

« Previous topic | Next topic »