Pages: [1]   Go Down
Author Topic: Arduino Asterisk Parsing Error  (Read 1236 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 1
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hello. I'm new to the forum, so i hope that i'm posting in the right place.

I'm currently working on an OSC pattern matching (similar to regex) for the Arduino. An important matching symbol is the ASTERISK ( * ). OSC messages are backslash delimited and when put a pattern like this for example:

Code:
OSCMessage.match("/*/?");

Even thought the "/*" is clearly in quotes, i get the error:

Code:
java.lang.RuntimeException: Missing the */ from the end of a /* comment */
at processing.app.Sketch.scrubComments(Sketch.java:1738)
at processing.app.preproc.PdePreprocessor.writePrefix(PdePreprocessor.java:105)
at processing.app.Sketch.preprocess(Sketch.java:1336)
at processing.app.Sketch.preprocess(Sketch.java:1288)
at processing.app.Sketch.build(Sketch.java:1570)
at processing.app.Sketch.build(Sketch.java:1552)
at processing.app.Editor$DefaultRunHandler.run(Editor.java:1954)
at java.lang.Thread.run(Thread.java:680)

I've tried alternates to the "/*" like "\u002A", but that also doesn't work. this seems like an IDE bug to me.

any work arounds would be greatly appreciated.
Logged

North Queensland, Australia
Online Online
Edison Member
*
Karma: 69
Posts: 2165
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Not sure if it is error, but try a completely different approach until you work it out.

Code:
char c_In[] = { '/', '*', '/', '?', '\0' };
OSCMessage.match(c_In);
« Last Edit: January 04, 2012, 09:10:02 pm by pYro_65 » Logged


Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12844
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Code:
OSCMessage.match("/" "*/?");

Should also work.
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1122
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I've also found this error when constructing a HTTP 1.1 header
Code:
WiFly.println("Accept: */*");
Did it get reported to those who need to know?

Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Global Moderator
Dallas
Offline Offline
Shannon Member
*****
Karma: 205
Posts: 12844
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset


Please check here...
http://code.google.com/p/arduino/issues/list
Logged

Brisbane, Australia
Offline Offline
Edison Member
*
Karma: 33
Posts: 1122
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I didn't find it, so added Issue 817: Comment /* */ parsing should ignore these sequences in string constants,  hopefully it isn't a duplicate but if it is at least it's covered.

Cheers !
Geoff
Logged

"There is no problem so bad you can't make it worse"
- retired astronaut Chris Hadfield

Pages: [1]   Go Up
Jump to: