Source Code Cross Referenced for PerlTokenMarker.java in  » IDE » bluej-editor » org » syntax » jedit » tokenmarker » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE » bluej editor » org.syntax.jedit.tokenmarker 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * PerlTokenMarker.java - Perl token marker
003:         * Copyright (C) 1998, 1999 Slava Pestov
004:         *
005:         * You may use and modify this package for any purpose. Redistribution is
006:         * permitted, in both source and binary form, provided that this notice
007:         * remains intact in all source distributions of this package.
008:         */
009:
010:        package org.syntax.jedit.tokenmarker;
011:
012:        import org.syntax.jedit.*;
013:        import javax.swing.text.Segment;
014:
015:        /**
016:         * Perl token marker.
017:         *
018:         * @author Slava Pestov
019:         * @version $Id: PerlTokenMarker.java 3074 2004-11-08 04:24:58Z bquig $
020:         */
021:        public class PerlTokenMarker extends TokenMarker {
022:            // public members
023:            public static final byte S_ONE = Token.INTERNAL_FIRST;
024:            public static final byte S_TWO = (byte) (Token.INTERNAL_FIRST + 1);
025:            public static final byte S_END = (byte) (Token.INTERNAL_FIRST + 2);
026:
027:            public PerlTokenMarker() {
028:                this (getKeywords());
029:            }
030:
031:            public PerlTokenMarker(KeywordMap keywords) {
032:                this .keywords = keywords;
033:            }
034:
035:            public byte markTokensImpl(byte _token, Segment line, int lineIndex) {
036:                char[] array = line.array;
037:                int offset = line.offset;
038:                token = _token;
039:                lastOffset = offset;
040:                lastKeyword = offset;
041:                matchChar = '\0';
042:                matchCharBracket = false;
043:                matchSpacesAllowed = false;
044:                int length = line.count + offset;
045:
046:                if (token == Token.LITERAL1 && lineIndex != 0
047:                        && lineInfo[lineIndex - 1].obj != null) {
048:                    String str = (String) lineInfo[lineIndex - 1].obj;
049:                    if (str != null
050:                            && str.length() == line.count
051:                            && SyntaxUtilities.regionMatches(false, line,
052:                                    offset, str)) {
053:                        addToken(line.count, token);
054:                        return Token.NULL;
055:                    } else {
056:                        addToken(line.count, token);
057:                        lineInfo[lineIndex].obj = str;
058:                        return token;
059:                    }
060:                }
061:
062:                boolean backslash = false;
063:                loop: for (int i = offset; i < length; i++) {
064:                    int i1 = (i + 1);
065:
066:                    char c = array[i];
067:                    if (c == '\\') {
068:                        backslash = !backslash;
069:                        continue;
070:                    }
071:
072:                    switch (token) {
073:                    case Token.NULL:
074:                        switch (c) {
075:                        case '#':
076:                            if (doKeyword(line, i, c))
077:                                break;
078:                            if (backslash)
079:                                backslash = false;
080:                            else {
081:                                addToken(i - lastOffset, token);
082:                                addToken(length - i, Token.COMMENT1);
083:                                lastOffset = lastKeyword = length;
084:                                break loop;
085:                            }
086:                            break;
087:                        case '=':
088:                            backslash = false;
089:                            if (i == offset) {
090:                                token = Token.COMMENT2;
091:                                addToken(length - i, token);
092:                                lastOffset = lastKeyword = length;
093:                                break loop;
094:                            } else
095:                                doKeyword(line, i, c);
096:                            break;
097:                        case '$':
098:                        case '&':
099:                        case '%':
100:                        case '@':
101:                            backslash = false;
102:                            if (doKeyword(line, i, c))
103:                                break;
104:                            if (length - i > 1) {
105:                                if (c == '&'
106:                                        && (array[i1] == '&' || Character
107:                                                .isWhitespace(array[i1])))
108:                                    i++;
109:                                else {
110:                                    addToken(i - lastOffset, token);
111:                                    lastOffset = lastKeyword = i;
112:                                    token = Token.KEYWORD2;
113:                                }
114:                            }
115:                            break;
116:                        case '"':
117:                            if (doKeyword(line, i, c))
118:                                break;
119:                            if (backslash)
120:                                backslash = false;
121:                            else {
122:                                addToken(i - lastOffset, token);
123:                                token = Token.LITERAL1;
124:                                lineInfo[lineIndex].obj = null;
125:                                lastOffset = lastKeyword = i;
126:                            }
127:                            break;
128:                        case '\'':
129:                            if (backslash)
130:                                backslash = false;
131:                            else {
132:                                int oldLastKeyword = lastKeyword;
133:                                if (doKeyword(line, i, c))
134:                                    break;
135:                                if (i != oldLastKeyword)
136:                                    break;
137:                                addToken(i - lastOffset, token);
138:                                token = Token.LITERAL2;
139:                                lastOffset = lastKeyword = i;
140:                            }
141:                            break;
142:                        case '`':
143:                            if (doKeyword(line, i, c))
144:                                break;
145:                            if (backslash)
146:                                backslash = false;
147:                            else {
148:                                addToken(i - lastOffset, token);
149:                                token = Token.OPERATOR;
150:                                lastOffset = lastKeyword = i;
151:                            }
152:                            break;
153:                        case '<':
154:                            if (doKeyword(line, i, c))
155:                                break;
156:                            if (backslash)
157:                                backslash = false;
158:                            else {
159:                                if (length - i > 2
160:                                        && array[i1] == '<'
161:                                        && !Character
162:                                                .isWhitespace(array[i + 2])) {
163:                                    addToken(i - lastOffset, token);
164:                                    lastOffset = lastKeyword = i;
165:                                    token = Token.LITERAL1;
166:                                    int len = length - (i + 2);
167:                                    if (array[length - 1] == ';')
168:                                        len--;
169:                                    lineInfo[lineIndex].obj = createReadinString(
170:                                            array, i + 2, len);
171:                                }
172:                            }
173:                            break;
174:                        case ':':
175:                            backslash = false;
176:                            if (doKeyword(line, i, c))
177:                                break;
178:                            // Doesn't pick up all labels,
179:                            // but at least doesn't mess up
180:                            // XXX::YYY
181:                            if (lastKeyword != 0)
182:                                break;
183:                            addToken(i1 - lastOffset, Token.LABEL);
184:                            lastOffset = lastKeyword = i1;
185:                            break;
186:                        case '-':
187:                            backslash = false;
188:                            if (doKeyword(line, i, c))
189:                                break;
190:                            if (i != lastKeyword || length - i <= 1)
191:                                break;
192:                            switch (array[i1]) {
193:                            case 'r':
194:                            case 'w':
195:                            case 'x':
196:                            case 'o':
197:                            case 'R':
198:                            case 'W':
199:                            case 'X':
200:                            case 'O':
201:                            case 'e':
202:                            case 'z':
203:                            case 's':
204:                            case 'f':
205:                            case 'd':
206:                            case 'l':
207:                            case 'p':
208:                            case 'S':
209:                            case 'b':
210:                            case 'c':
211:                            case 't':
212:                            case 'u':
213:                            case 'g':
214:                            case 'k':
215:                            case 'T':
216:                            case 'B':
217:                            case 'M':
218:                            case 'A':
219:                            case 'C':
220:                                addToken(i - lastOffset, token);
221:                                addToken(2, Token.KEYWORD3);
222:                                lastOffset = lastKeyword = i + 2;
223:                                i++;
224:                            }
225:                            break;
226:                        case '/':
227:                        case '?':
228:                            if (doKeyword(line, i, c))
229:                                break;
230:                            if (length - i > 1) {
231:                                backslash = false;
232:                                char ch = array[i1];
233:                                if (Character.isWhitespace(ch))
234:                                    break;
235:                                matchChar = c;
236:                                matchSpacesAllowed = false;
237:                                addToken(i - lastOffset, token);
238:                                token = S_ONE;
239:                                lastOffset = lastKeyword = i;
240:                            }
241:                            break;
242:                        default:
243:                            backslash = false;
244:                            if (!Character.isLetterOrDigit(c) && c != '_')
245:                                doKeyword(line, i, c);
246:                            break;
247:                        }
248:                        break;
249:                    case Token.KEYWORD2:
250:                        backslash = false;
251:                        // This test checks for an end-of-variable
252:                        // condition
253:                        if (!Character.isLetterOrDigit(c) && c != '_'
254:                                && c != '#' && c != '\'' && c != ':'
255:                                && c != '&') {
256:                            // If this is the first character
257:                            // of the variable name ($'aaa)
258:                            // ignore it
259:                            if (i != offset && array[i - 1] == '$') {
260:                                addToken(i1 - lastOffset, token);
261:                                lastOffset = lastKeyword = i1;
262:                            }
263:                            // Otherwise, end of variable...
264:                            else {
265:                                addToken(i - lastOffset, token);
266:                                lastOffset = lastKeyword = i;
267:                                // Wind back so that stuff
268:                                // like $hello$fred is picked
269:                                // up
270:                                i--;
271:                                token = Token.NULL;
272:                            }
273:                        }
274:                        break;
275:                    case S_ONE:
276:                    case S_TWO:
277:                        if (backslash)
278:                            backslash = false;
279:                        else {
280:                            if (matchChar == '\0') {
281:                                if (Character.isWhitespace(matchChar)
282:                                        && !matchSpacesAllowed)
283:                                    break;
284:                                else
285:                                    matchChar = c;
286:                            } else {
287:                                switch (matchChar) {
288:                                case '(':
289:                                    matchChar = ')';
290:                                    matchCharBracket = true;
291:                                    break;
292:                                case '[':
293:                                    matchChar = ']';
294:                                    matchCharBracket = true;
295:                                    break;
296:                                case '{':
297:                                    matchChar = '}';
298:                                    matchCharBracket = true;
299:                                    break;
300:                                case '<':
301:                                    matchChar = '>';
302:                                    matchCharBracket = true;
303:                                    break;
304:                                default:
305:                                    matchCharBracket = false;
306:                                    break;
307:                                }
308:                                if (c != matchChar)
309:                                    break;
310:                                if (token == S_TWO) {
311:                                    token = S_ONE;
312:                                    if (matchCharBracket)
313:                                        matchChar = '\0';
314:                                } else {
315:                                    token = S_END;
316:                                    addToken(i1 - lastOffset, Token.LITERAL2);
317:                                    lastOffset = lastKeyword = i1;
318:                                }
319:                            }
320:                        }
321:                        break;
322:                    case S_END:
323:                        backslash = false;
324:                        if (!Character.isLetterOrDigit(c) && c != '_')
325:                            doKeyword(line, i, c);
326:                        break;
327:                    case Token.COMMENT2:
328:                        backslash = false;
329:                        if (i == offset) {
330:                            addToken(line.count, token);
331:                            if (length - i > 3
332:                                    && SyntaxUtilities.regionMatches(false,
333:                                            line, offset, "=cut"))
334:                                token = Token.NULL;
335:                            lastOffset = lastKeyword = length;
336:                            break loop;
337:                        }
338:                        break;
339:                    case Token.LITERAL1:
340:                        if (backslash)
341:                            backslash = false;
342:                        /* else if(c == '$')
343:                        	backslash = true; */
344:                        else if (c == '"') {
345:                            addToken(i1 - lastOffset, token);
346:                            token = Token.NULL;
347:                            lastOffset = lastKeyword = i1;
348:                        }
349:                        break;
350:                    case Token.LITERAL2:
351:                        if (backslash)
352:                            backslash = false;
353:                        /* else if(c == '$')
354:                        	backslash = true; */
355:                        else if (c == '\'') {
356:                            addToken(i1 - lastOffset, Token.LITERAL1);
357:                            token = Token.NULL;
358:                            lastOffset = lastKeyword = i1;
359:                        }
360:                        break;
361:                    case Token.OPERATOR:
362:                        if (backslash)
363:                            backslash = false;
364:                        else if (c == '`') {
365:                            addToken(i1 - lastOffset, token);
366:                            token = Token.NULL;
367:                            lastOffset = lastKeyword = i1;
368:                        }
369:                        break;
370:                    default:
371:                        throw new InternalError("Invalid state: " + token);
372:                    }
373:                }
374:
375:                if (token == Token.NULL)
376:                    doKeyword(line, length, '\0');
377:
378:                switch (token) {
379:                case Token.KEYWORD2:
380:                    addToken(length - lastOffset, token);
381:                    token = Token.NULL;
382:                    break;
383:                case Token.LITERAL2:
384:                    addToken(length - lastOffset, Token.LITERAL1);
385:                    break;
386:                case S_END:
387:                    addToken(length - lastOffset, Token.LITERAL2);
388:                    token = Token.NULL;
389:                    break;
390:                case S_ONE:
391:                case S_TWO:
392:                    addToken(length - lastOffset, Token.INVALID); // XXX
393:                    token = Token.NULL;
394:                    break;
395:                default:
396:                    addToken(length - lastOffset, token);
397:                    break;
398:                }
399:                return token;
400:            }
401:
402:            // private members
403:            private KeywordMap keywords;
404:            private byte token;
405:            private int lastOffset;
406:            private int lastKeyword;
407:            private char matchChar;
408:            private boolean matchCharBracket;
409:            private boolean matchSpacesAllowed;
410:
411:            private boolean doKeyword(Segment line, int i, char c) {
412:                int i1 = i + 1;
413:
414:                if (token == S_END) {
415:                    addToken(i - lastOffset, Token.LITERAL2);
416:                    token = Token.NULL;
417:                    lastOffset = i;
418:                    lastKeyword = i1;
419:                    return false;
420:                }
421:
422:                int len = i - lastKeyword;
423:                byte id = keywords.lookup(line, lastKeyword, len);
424:                if (id == S_ONE || id == S_TWO) {
425:                    if (lastKeyword != lastOffset)
426:                        addToken(lastKeyword - lastOffset, Token.NULL);
427:                    addToken(len, Token.LITERAL2);
428:                    lastOffset = i;
429:                    lastKeyword = i1;
430:                    if (Character.isWhitespace(c))
431:                        matchChar = '\0';
432:                    else
433:                        matchChar = c;
434:                    matchSpacesAllowed = true;
435:                    token = id;
436:                    return true;
437:                } else if (id != Token.NULL) {
438:                    if (lastKeyword != lastOffset)
439:                        addToken(lastKeyword - lastOffset, Token.NULL);
440:                    addToken(len, id);
441:                    lastOffset = i;
442:                }
443:                lastKeyword = i1;
444:                return false;
445:            }
446:
447:            // Converts < EOF >, < 'EOF' >, etc to <EOF>
448:            private String createReadinString(char[] array, int start, int len) {
449:                int idx1 = start;
450:                int idx2 = start + len - 1;
451:
452:                while ((idx1 <= idx2)
453:                        && (!Character.isLetterOrDigit(array[idx1])))
454:                    idx1++;
455:
456:                while ((idx1 <= idx2)
457:                        && (!Character.isLetterOrDigit(array[idx2])))
458:                    idx2--;
459:
460:                return new String(array, idx1, idx2 - idx1 + 1);
461:            }
462:
463:            private static KeywordMap perlKeywords;
464:
465:            private static KeywordMap getKeywords() {
466:                if (perlKeywords == null) {
467:                    perlKeywords = new KeywordMap(false);
468:                    perlKeywords.add("my", Token.KEYWORD1);
469:                    perlKeywords.add("local", Token.KEYWORD1);
470:                    perlKeywords.add("new", Token.KEYWORD1);
471:                    perlKeywords.add("if", Token.KEYWORD1);
472:                    perlKeywords.add("until", Token.KEYWORD1);
473:                    perlKeywords.add("while", Token.KEYWORD1);
474:                    perlKeywords.add("elsif", Token.KEYWORD1);
475:                    perlKeywords.add("else", Token.KEYWORD1);
476:                    perlKeywords.add("eval", Token.KEYWORD1);
477:                    perlKeywords.add("unless", Token.KEYWORD1);
478:                    perlKeywords.add("foreach", Token.KEYWORD1);
479:                    perlKeywords.add("continue", Token.KEYWORD1);
480:                    perlKeywords.add("exit", Token.KEYWORD1);
481:                    perlKeywords.add("die", Token.KEYWORD1);
482:                    perlKeywords.add("last", Token.KEYWORD1);
483:                    perlKeywords.add("goto", Token.KEYWORD1);
484:                    perlKeywords.add("next", Token.KEYWORD1);
485:                    perlKeywords.add("redo", Token.KEYWORD1);
486:                    perlKeywords.add("goto", Token.KEYWORD1);
487:                    perlKeywords.add("return", Token.KEYWORD1);
488:                    perlKeywords.add("do", Token.KEYWORD1);
489:                    perlKeywords.add("sub", Token.KEYWORD1);
490:                    perlKeywords.add("use", Token.KEYWORD1);
491:                    perlKeywords.add("require", Token.KEYWORD1);
492:                    perlKeywords.add("package", Token.KEYWORD1);
493:                    perlKeywords.add("BEGIN", Token.KEYWORD1);
494:                    perlKeywords.add("END", Token.KEYWORD1);
495:                    perlKeywords.add("eq", Token.OPERATOR);
496:                    perlKeywords.add("ne", Token.OPERATOR);
497:                    perlKeywords.add("not", Token.OPERATOR);
498:                    perlKeywords.add("and", Token.OPERATOR);
499:                    perlKeywords.add("or", Token.OPERATOR);
500:
501:                    perlKeywords.add("abs", Token.KEYWORD3);
502:                    perlKeywords.add("accept", Token.KEYWORD3);
503:                    perlKeywords.add("alarm", Token.KEYWORD3);
504:                    perlKeywords.add("atan2", Token.KEYWORD3);
505:                    perlKeywords.add("bind", Token.KEYWORD3);
506:                    perlKeywords.add("binmode", Token.KEYWORD3);
507:                    perlKeywords.add("bless", Token.KEYWORD3);
508:                    perlKeywords.add("caller", Token.KEYWORD3);
509:                    perlKeywords.add("chdir", Token.KEYWORD3);
510:                    perlKeywords.add("chmod", Token.KEYWORD3);
511:                    perlKeywords.add("chomp", Token.KEYWORD3);
512:                    perlKeywords.add("chr", Token.KEYWORD3);
513:                    perlKeywords.add("chroot", Token.KEYWORD3);
514:                    perlKeywords.add("chown", Token.KEYWORD3);
515:                    perlKeywords.add("closedir", Token.KEYWORD3);
516:                    perlKeywords.add("close", Token.KEYWORD3);
517:                    perlKeywords.add("connect", Token.KEYWORD3);
518:                    perlKeywords.add("cos", Token.KEYWORD3);
519:                    perlKeywords.add("crypt", Token.KEYWORD3);
520:                    perlKeywords.add("dbmclose", Token.KEYWORD3);
521:                    perlKeywords.add("dbmopen", Token.KEYWORD3);
522:                    perlKeywords.add("defined", Token.KEYWORD3);
523:                    perlKeywords.add("delete", Token.KEYWORD3);
524:                    perlKeywords.add("die", Token.KEYWORD3);
525:                    perlKeywords.add("dump", Token.KEYWORD3);
526:                    perlKeywords.add("each", Token.KEYWORD3);
527:                    perlKeywords.add("endgrent", Token.KEYWORD3);
528:                    perlKeywords.add("endhostent", Token.KEYWORD3);
529:                    perlKeywords.add("endnetent", Token.KEYWORD3);
530:                    perlKeywords.add("endprotoent", Token.KEYWORD3);
531:                    perlKeywords.add("endpwent", Token.KEYWORD3);
532:                    perlKeywords.add("endservent", Token.KEYWORD3);
533:                    perlKeywords.add("eof", Token.KEYWORD3);
534:                    perlKeywords.add("exec", Token.KEYWORD3);
535:                    perlKeywords.add("exists", Token.KEYWORD3);
536:                    perlKeywords.add("exp", Token.KEYWORD3);
537:                    perlKeywords.add("fctnl", Token.KEYWORD3);
538:                    perlKeywords.add("fileno", Token.KEYWORD3);
539:                    perlKeywords.add("flock", Token.KEYWORD3);
540:                    perlKeywords.add("fork", Token.KEYWORD3);
541:                    perlKeywords.add("format", Token.KEYWORD3);
542:                    perlKeywords.add("formline", Token.KEYWORD3);
543:                    perlKeywords.add("getc", Token.KEYWORD3);
544:                    perlKeywords.add("getgrent", Token.KEYWORD3);
545:                    perlKeywords.add("getgrgid", Token.KEYWORD3);
546:                    perlKeywords.add("getgrnam", Token.KEYWORD3);
547:                    perlKeywords.add("gethostbyaddr", Token.KEYWORD3);
548:                    perlKeywords.add("gethostbyname", Token.KEYWORD3);
549:                    perlKeywords.add("gethostent", Token.KEYWORD3);
550:                    perlKeywords.add("getlogin", Token.KEYWORD3);
551:                    perlKeywords.add("getnetbyaddr", Token.KEYWORD3);
552:                    perlKeywords.add("getnetbyname", Token.KEYWORD3);
553:                    perlKeywords.add("getnetent", Token.KEYWORD3);
554:                    perlKeywords.add("getpeername", Token.KEYWORD3);
555:                    perlKeywords.add("getpgrp", Token.KEYWORD3);
556:                    perlKeywords.add("getppid", Token.KEYWORD3);
557:                    perlKeywords.add("getpriority", Token.KEYWORD3);
558:                    perlKeywords.add("getprotobyname", Token.KEYWORD3);
559:                    perlKeywords.add("getprotobynumber", Token.KEYWORD3);
560:                    perlKeywords.add("getprotoent", Token.KEYWORD3);
561:                    perlKeywords.add("getpwent", Token.KEYWORD3);
562:                    perlKeywords.add("getpwnam", Token.KEYWORD3);
563:                    perlKeywords.add("getpwuid", Token.KEYWORD3);
564:                    perlKeywords.add("getservbyname", Token.KEYWORD3);
565:                    perlKeywords.add("getservbyport", Token.KEYWORD3);
566:                    perlKeywords.add("getservent", Token.KEYWORD3);
567:                    perlKeywords.add("getsockname", Token.KEYWORD3);
568:                    perlKeywords.add("getsockopt", Token.KEYWORD3);
569:                    perlKeywords.add("glob", Token.KEYWORD3);
570:                    perlKeywords.add("gmtime", Token.KEYWORD3);
571:                    perlKeywords.add("grep", Token.KEYWORD3);
572:                    perlKeywords.add("hex", Token.KEYWORD3);
573:                    perlKeywords.add("import", Token.KEYWORD3);
574:                    perlKeywords.add("index", Token.KEYWORD3);
575:                    perlKeywords.add("int", Token.KEYWORD3);
576:                    perlKeywords.add("ioctl", Token.KEYWORD3);
577:                    perlKeywords.add("join", Token.KEYWORD3);
578:                    perlKeywords.add("keys", Token.KEYWORD3);
579:                    perlKeywords.add("kill", Token.KEYWORD3);
580:                    perlKeywords.add("lcfirst", Token.KEYWORD3);
581:                    perlKeywords.add("lc", Token.KEYWORD3);
582:                    perlKeywords.add("length", Token.KEYWORD3);
583:                    perlKeywords.add("link", Token.KEYWORD3);
584:                    perlKeywords.add("listen", Token.KEYWORD3);
585:                    perlKeywords.add("log", Token.KEYWORD3);
586:                    perlKeywords.add("localtime", Token.KEYWORD3);
587:                    perlKeywords.add("lstat", Token.KEYWORD3);
588:                    perlKeywords.add("map", Token.KEYWORD3);
589:                    perlKeywords.add("mkdir", Token.KEYWORD3);
590:                    perlKeywords.add("msgctl", Token.KEYWORD3);
591:                    perlKeywords.add("msgget", Token.KEYWORD3);
592:                    perlKeywords.add("msgrcv", Token.KEYWORD3);
593:                    perlKeywords.add("no", Token.KEYWORD3);
594:                    perlKeywords.add("oct", Token.KEYWORD3);
595:                    perlKeywords.add("opendir", Token.KEYWORD3);
596:                    perlKeywords.add("open", Token.KEYWORD3);
597:                    perlKeywords.add("ord", Token.KEYWORD3);
598:                    perlKeywords.add("pack", Token.KEYWORD3);
599:                    perlKeywords.add("pipe", Token.KEYWORD3);
600:                    perlKeywords.add("pop", Token.KEYWORD3);
601:                    perlKeywords.add("pos", Token.KEYWORD3);
602:                    perlKeywords.add("printf", Token.KEYWORD3);
603:                    perlKeywords.add("print", Token.KEYWORD3);
604:                    perlKeywords.add("push", Token.KEYWORD3);
605:                    perlKeywords.add("quotemeta", Token.KEYWORD3);
606:                    perlKeywords.add("rand", Token.KEYWORD3);
607:                    perlKeywords.add("readdir", Token.KEYWORD3);
608:                    perlKeywords.add("read", Token.KEYWORD3);
609:                    perlKeywords.add("readlink", Token.KEYWORD3);
610:                    perlKeywords.add("recv", Token.KEYWORD3);
611:                    perlKeywords.add("ref", Token.KEYWORD3);
612:                    perlKeywords.add("rename", Token.KEYWORD3);
613:                    perlKeywords.add("reset", Token.KEYWORD3);
614:                    perlKeywords.add("reverse", Token.KEYWORD3);
615:                    perlKeywords.add("rewinddir", Token.KEYWORD3);
616:                    perlKeywords.add("rindex", Token.KEYWORD3);
617:                    perlKeywords.add("rmdir", Token.KEYWORD3);
618:                    perlKeywords.add("scalar", Token.KEYWORD3);
619:                    perlKeywords.add("seekdir", Token.KEYWORD3);
620:                    perlKeywords.add("seek", Token.KEYWORD3);
621:                    perlKeywords.add("select", Token.KEYWORD3);
622:                    perlKeywords.add("semctl", Token.KEYWORD3);
623:                    perlKeywords.add("semget", Token.KEYWORD3);
624:                    perlKeywords.add("semop", Token.KEYWORD3);
625:                    perlKeywords.add("send", Token.KEYWORD3);
626:                    perlKeywords.add("setgrent", Token.KEYWORD3);
627:                    perlKeywords.add("sethostent", Token.KEYWORD3);
628:                    perlKeywords.add("setnetent", Token.KEYWORD3);
629:                    perlKeywords.add("setpgrp", Token.KEYWORD3);
630:                    perlKeywords.add("setpriority", Token.KEYWORD3);
631:                    perlKeywords.add("setprotoent", Token.KEYWORD3);
632:                    perlKeywords.add("setpwent", Token.KEYWORD3);
633:                    perlKeywords.add("setsockopt", Token.KEYWORD3);
634:                    perlKeywords.add("shift", Token.KEYWORD3);
635:                    perlKeywords.add("shmctl", Token.KEYWORD3);
636:                    perlKeywords.add("shmget", Token.KEYWORD3);
637:                    perlKeywords.add("shmread", Token.KEYWORD3);
638:                    perlKeywords.add("shmwrite", Token.KEYWORD3);
639:                    perlKeywords.add("shutdown", Token.KEYWORD3);
640:                    perlKeywords.add("sin", Token.KEYWORD3);
641:                    perlKeywords.add("sleep", Token.KEYWORD3);
642:                    perlKeywords.add("socket", Token.KEYWORD3);
643:                    perlKeywords.add("socketpair", Token.KEYWORD3);
644:                    perlKeywords.add("sort", Token.KEYWORD3);
645:                    perlKeywords.add("splice", Token.KEYWORD3);
646:                    perlKeywords.add("split", Token.KEYWORD3);
647:                    perlKeywords.add("sprintf", Token.KEYWORD3);
648:                    perlKeywords.add("sqrt", Token.KEYWORD3);
649:                    perlKeywords.add("srand", Token.KEYWORD3);
650:                    perlKeywords.add("stat", Token.KEYWORD3);
651:                    perlKeywords.add("study", Token.KEYWORD3);
652:                    perlKeywords.add("substr", Token.KEYWORD3);
653:                    perlKeywords.add("symlink", Token.KEYWORD3);
654:                    perlKeywords.add("syscall", Token.KEYWORD3);
655:                    perlKeywords.add("sysopen", Token.KEYWORD3);
656:                    perlKeywords.add("sysread", Token.KEYWORD3);
657:                    perlKeywords.add("syswrite", Token.KEYWORD3);
658:                    perlKeywords.add("telldir", Token.KEYWORD3);
659:                    perlKeywords.add("tell", Token.KEYWORD3);
660:                    perlKeywords.add("tie", Token.KEYWORD3);
661:                    perlKeywords.add("tied", Token.KEYWORD3);
662:                    perlKeywords.add("time", Token.KEYWORD3);
663:                    perlKeywords.add("times", Token.KEYWORD3);
664:                    perlKeywords.add("truncate", Token.KEYWORD3);
665:                    perlKeywords.add("uc", Token.KEYWORD3);
666:                    perlKeywords.add("ucfirst", Token.KEYWORD3);
667:                    perlKeywords.add("umask", Token.KEYWORD3);
668:                    perlKeywords.add("undef", Token.KEYWORD3);
669:                    perlKeywords.add("unlink", Token.KEYWORD3);
670:                    perlKeywords.add("unpack", Token.KEYWORD3);
671:                    perlKeywords.add("unshift", Token.KEYWORD3);
672:                    perlKeywords.add("untie", Token.KEYWORD3);
673:                    perlKeywords.add("utime", Token.KEYWORD3);
674:                    perlKeywords.add("values", Token.KEYWORD3);
675:                    perlKeywords.add("vec", Token.KEYWORD3);
676:                    perlKeywords.add("wait", Token.KEYWORD3);
677:                    perlKeywords.add("waitpid", Token.KEYWORD3);
678:                    perlKeywords.add("wantarray", Token.KEYWORD3);
679:                    perlKeywords.add("warn", Token.KEYWORD3);
680:                    perlKeywords.add("write", Token.KEYWORD3);
681:
682:                    perlKeywords.add("m", S_ONE);
683:                    perlKeywords.add("q", S_ONE);
684:                    perlKeywords.add("qq", S_ONE);
685:                    perlKeywords.add("qw", S_ONE);
686:                    perlKeywords.add("qx", S_ONE);
687:                    perlKeywords.add("s", S_TWO);
688:                    perlKeywords.add("tr", S_TWO);
689:                    perlKeywords.add("y", S_TWO);
690:                }
691:                return perlKeywords;
692:            }
693:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.