15.07.2013 Views

jgrasp handbook

jgrasp handbook

jgrasp handbook

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

18.15 GNU Extensions to C and C++<br />

DRAFT, February 18, 2003, Page 98<br />

Most of the GNU C and C++ extensions are supported for CSD generation. Additional extensions are<br />

supported if the "Allow GNU Extensions" box is checked in the compiler settings.<br />

Function attributes for C are not supported unless "Allow GNU Extensions" is checked because the<br />

syntax is too close to that of a K&R style function definition. You can get around this by defining<br />

__attribute__ to nothing in the predefined macros.<br />

Nested functions are not supported. These can not be distinguished from declarations without identifier<br />

context. Our C parser does not distinguish variables from type names, so that header parsing can be<br />

avoided.<br />

Breaking strings across lines without using backslashes will not be supported. CSD generation adds text<br />

at the beginning of lines, so the original string might not be recovered if there were a syntax error that<br />

caused the start of the string not be recognized. The backslash at the end of a line applies regardless of<br />

syntactic context, so there is no danger of corrupting backslash-continued strings during CSD generation.<br />

18.16 Extended Awk Regular Expressions<br />

From the ORO documentation:<br />

This is the traditional Awk syntax that is supported:<br />

Alternatives separated by |<br />

Quantified atoms<br />

Atoms<br />

Match 0 or more times.<br />

+ Match 1 or more times.<br />

? Match 0 or 1 times.<br />

regular expression within parentheses<br />

a . matches everything including newline<br />

a ^ is a null token matching the beginning of a string but has no relation to newlines (and is<br />

only valid at the beginning of a regex; this differs from traditional awk for the sake of<br />

efficiency in Java).<br />

a $ is a null token matching the end of a string but has no relation to newlines (and is only<br />

valid at the end of a regex; this differs from traditional awk for the sake of efficiency in<br />

Java).<br />

Character classes (e.g., [abcd]) and ranges (e.g. [a-z])<br />

Special backslashed characters work within a character class<br />

Special backslashed characters<br />

\b backspace<br />

\n newline<br />

\r carriage return<br />

\t tab<br />

\f formfeed

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!