Java Doc for PerlPatternParser.java in  » RSS-RDF » Jena-2.5.5 » com » hp » hpl » jena » graph » query » regexptrees » 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 » RSS RDF » Jena 2.5.5 » com.hp.hpl.jena.graph.query.regexptrees 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.hp.hpl.jena.graph.query.regexptrees.PerlPatternParser

PerlPatternParser
public class PerlPatternParser (Code)
Parse Perl5 patterns into RegexpTree structures, or throw an exception for cases that haven't been implemented.
author:
   hedgehog

Inner Class :public static class SyntaxException extends RuntimeException

Field Summary
final public static  Stringdigits
     The digits, in order.
protected  RegexpTreeGeneratorgenerator
     The generator for the RegexpTree nodes to be used in the parse.
final protected  intlimit
     The length of the string to parse, used as a limit.
protected  intmatchPointsSeen
     Count of how many back-references match-points seen so far.
protected  intpointer
     The index into the string of the next undealt-with character, ie, it starts at 0.
final protected  StringtoParse
     The string being parsed, as supplied to the constructor(s).
final public static  StringwordChars
     The characters that are (non-)matchable by \w[W].

Constructor Summary
public  PerlPatternParser(String toParse)
     Initialise this parser with the string to parse and with the default generator (SimpleGenerator).
public  PerlPatternParser(String toParse, RegexpTreeGenerator gen)
     Initialise this parser with the string to parse and with the generator to use for node construction.

Method Summary
protected  RegexpTreebackReferenceOrOctalChar(char ch)
     Answer the backreference or octal character described by \nnnn sequences.
protected  RegexpTreecontrol(char ch)
     Answer a RegexpTree representing the single character which is CTRL-ch.
public  intgetPointer()
     Answer the current index into the parse string.
public  StringgetString()
     Answer the string that this parser is parsing.
protected  RegexpTreehexEscape()
     Answer a RegexpTree representing the single character whose value is given by the next two hexadecimal digits.
protected  charnextChar()
     Answer the character under the pointer, and advance the pointer.
protected  charnumeric(char[] chars, int base, int limit)
     Answer the numeric value represented by chars[0..limit-1] in the given base.
public static  RegexpTreeparse(String string)
     Answer the result of parsing the given string as a sequence of alternatives.
public static  RegexpTreeparse(String string, RegexpTreeGenerator gen)
     Answer the result of parsing the given string as a sequence of alternatives, using the supplied generator for the pattern nodes.
public  RegexpTreeparseAlts()
     Parse an alternation of sequences and answer an alternative tree (or the single component if there is just one alternative).
public  RegexpTreeparseAtom()
     Parse a single atom and return the tree for it, advancing the pointer.
protected  RegexpTreeparseClass()
     Parse a class expression and answer an appropriate tree.
protected  booleanparseClassNegation()
    
public  RegexpTreeparseElement()
     Parse an element (an atom and any following quantifier) and answer the possibly-quantified tree.
protected  RegexpTreeparseParens()
     Parse a parenthesised expression.
public  RegexpTreeparseQuantifier(RegexpTree d)
     Parse any quantifier and answer the quantified version of the argument tree d.
public  RegexpTreeparseSeq()
     Parse a sequence of elements [possibly-quantified atoms] and answer the sequence (singular sequences may be reduced to its single element).

Field Detail
digits
final public static String digits(Code)
The digits, in order.



generator
protected RegexpTreeGenerator generator(Code)
The generator for the RegexpTree nodes to be used in the parse.



limit
final protected int limit(Code)
The length of the string to parse, used as a limit.



matchPointsSeen
protected int matchPointsSeen(Code)
Count of how many back-references match-points seen so far.



pointer
protected int pointer(Code)
The index into the string of the next undealt-with character, ie, it starts at 0.



toParse
final protected String toParse(Code)
The string being parsed, as supplied to the constructor(s).



wordChars
final public static String wordChars(Code)
The characters that are (non-)matchable by \w[W].




Constructor Detail
PerlPatternParser
public PerlPatternParser(String toParse)(Code)
Initialise this parser with the string to parse and with the default generator (SimpleGenerator).



PerlPatternParser
public PerlPatternParser(String toParse, RegexpTreeGenerator gen)(Code)
Initialise this parser with the string to parse and with the generator to use for node construction.




Method Detail
backReferenceOrOctalChar
protected RegexpTree backReferenceOrOctalChar(char ch)(Code)
Answer the backreference or octal character described by \nnnn sequences.



control
protected RegexpTree control(char ch)(Code)
Answer a RegexpTree representing the single character which is CTRL-ch.



getPointer
public int getPointer()(Code)
Answer the current index into the parse string.



getString
public String getString()(Code)
Answer the string that this parser is parsing.



hexEscape
protected RegexpTree hexEscape()(Code)
Answer a RegexpTree representing the single character whose value is given by the next two hexadecimal digits.



nextChar
protected char nextChar()(Code)
Answer the character under the pointer, and advance the pointer.



numeric
protected char numeric(char[] chars, int base, int limit)(Code)
Answer the numeric value represented by chars[0..limit-1] in the given base.



parse
public static RegexpTree parse(String string)(Code)
Answer the result of parsing the given string as a sequence of alternatives.



parse
public static RegexpTree parse(String string, RegexpTreeGenerator gen)(Code)
Answer the result of parsing the given string as a sequence of alternatives, using the supplied generator for the pattern nodes.



parseAlts
public RegexpTree parseAlts()(Code)
Parse an alternation of sequences and answer an alternative tree (or the single component if there is just one alternative).



parseAtom
public RegexpTree parseAtom()(Code)
Parse a single atom and return the tree for it, advancing the pointer. This does not deal with quantifiers, for which see parseQuantifier. Unmatched right parentheses, unexpected (hence unbound) quantifiers, and those things that aren't implemented, throw exceptions. An empty atom is permitted (at the end of a string or before a |).



parseClass
protected RegexpTree parseClass()(Code)
Parse a class expression and answer an appropriate tree.



parseClassNegation
protected boolean parseClassNegation()(Code)



parseElement
public RegexpTree parseElement()(Code)
Parse an element (an atom and any following quantifier) and answer the possibly-quantified tree.



parseParens
protected RegexpTree parseParens()(Code)
Parse a parenthesised expression. Throw a SyntaxException if the closing bracket is missing. Answer the wrapped sub-expression. Does not cater for the (? ...) stuff.



parseQuantifier
public RegexpTree parseQuantifier(RegexpTree d)(Code)
Parse any quantifier and answer the quantified version of the argument tree d. TODO: handle non-greedy quantifiers. (These will currently generate syntax errors when their flagging ? is encountered by parseAtom.)



parseSeq
public RegexpTree parseSeq()(Code)
Parse a sequence of elements [possibly-quantified atoms] and answer the sequence (singular sequences may be reduced to its single element).



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

w_w_w_._j___a__v_a___2__s__.__c_om___ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.