Java Doc for TestSemanticPredicates.java in  » Parser » antlr-3.0.1 » org » antlr » test » 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 » Parser » antlr 3.0.1 » org.antlr.test 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.antlr.test.BaseTest
   org.antlr.test.TestSemanticPredicates

TestSemanticPredicates
public class TestSemanticPredicates extends BaseTest (Code)



Constructor Summary
public  TestSemanticPredicates()
    

Method Summary
public  void_template()
    
protected  voidcheckDecision(Grammar g, int decision, String expecting, int[] expectingUnreachableAlts, int[] expectingNonDetAlts, String expectingAmbigInput, int[] expectingInsufficientPredAlts, int[] expectingDanglingAlts, int expectingNumWarnings)
    
protected  GrammarNonDeterminismMessagegetNonDeterminismMessage(List warnings)
    
protected  Stringstr(int[] elements)
    
public  voidtestAndPredicates()
    
public  voidtestDefaultPredNakedAltIsLast()
    
public  voidtestDefaultPredNakedAltNotLast()
    
public  voidtestGatedPred()
    
public  voidtestGatedPredDoesNotForceAllToBeGated()
    
public  voidtestGatedPredDoesNotForceAllToBeGated2()
    
public  voidtestGatedPredHoistsAndCanBeInStopState()
    
public  voidtestGatedPredInCyclicDFA()
    
public  voidtestGatedPredNotActuallyUsedOnEdges()
    
public  voidtestHoist2()
    
public  voidtestHoistCorrectContext()
    
public  voidtestIgnorePredFromLL2AltLastAltIsDefaultTrue()
    
public  voidtestIgnorePredFromLL2AltPredUnionNeeded()
    
public  voidtestIgnoresHoistingDepthGreaterThanZero()
    
public  voidtestIncompleteSemanticHoistedContext()
     The following grammar should yield an error that rule 'a' has insufficient semantic info pulled from 'b'.
public  voidtestIncompleteSemanticHoistedContext2()
     The following grammar should yield an error that rule 'a' has insufficient semantic info pulled from 'b'.
public  voidtestLL_1_Pred()
    
public  voidtestLL_2_Pred()
    
public  voidtestLeftRecursivePred()
    
public  voidtestLexerMatchesLongestThenTestPred()
    
public  voidtestMatchesLongestThenTestPred()
    
public  voidtestORGatedPred()
    
public  voidtestOrPredicates()
    
public  voidtestPredGets2SymbolSyntacticContext()
    
public  voidtestPredWithArbitraryLookahead()
    
public  voidtestPredWithK1()
    
public  voidtestPredicatedLoop()
    
public  voidtestPredicatedToStayInLoop()
    
public  voidtestPredsButSyntaxResolves()
    
public  voidtestPredsUsedAfterRecursionOverflow()
    
public  voidtestTooFewSemanticPredicates()
    
public  voidtestUniquePredicateOR()
     For a DFA state with lots of configurations that have the same predicate, don't just OR them all together as it's a waste to test a||a||b||a||a etc...


Constructor Detail
TestSemanticPredicates
public TestSemanticPredicates()(Code)
Public default constructor used by TestRig




Method Detail
_template
public void _template() throws Exception(Code)



checkDecision
protected void checkDecision(Grammar g, int decision, String expecting, int[] expectingUnreachableAlts, int[] expectingNonDetAlts, String expectingAmbigInput, int[] expectingInsufficientPredAlts, int[] expectingDanglingAlts, int expectingNumWarnings) throws Exception(Code)



getNonDeterminismMessage
protected GrammarNonDeterminismMessage getNonDeterminismMessage(List warnings)(Code)



str
protected String str(int[] elements)(Code)



testAndPredicates
public void testAndPredicates() throws Exception(Code)



testDefaultPredNakedAltIsLast
public void testDefaultPredNakedAltIsLast() throws Exception(Code)



testDefaultPredNakedAltNotLast
public void testDefaultPredNakedAltNotLast() throws Exception(Code)



testGatedPred
public void testGatedPred() throws Exception(Code)



testGatedPredDoesNotForceAllToBeGated
public void testGatedPredDoesNotForceAllToBeGated() throws Exception(Code)



testGatedPredDoesNotForceAllToBeGated2
public void testGatedPredDoesNotForceAllToBeGated2() throws Exception(Code)



testGatedPredHoistsAndCanBeInStopState
public void testGatedPredHoistsAndCanBeInStopState() throws Exception(Code)



testGatedPredInCyclicDFA
public void testGatedPredInCyclicDFA() throws Exception(Code)



testGatedPredNotActuallyUsedOnEdges
public void testGatedPredNotActuallyUsedOnEdges() throws Exception(Code)



testHoist2
public void testHoist2() throws Exception(Code)



testHoistCorrectContext
public void testHoistCorrectContext() throws Exception(Code)



testIgnorePredFromLL2AltLastAltIsDefaultTrue
public void testIgnorePredFromLL2AltLastAltIsDefaultTrue() throws Exception(Code)



testIgnorePredFromLL2AltPredUnionNeeded
public void testIgnorePredFromLL2AltPredUnionNeeded() throws Exception(Code)



testIgnoresHoistingDepthGreaterThanZero
public void testIgnoresHoistingDepthGreaterThanZero() throws Exception(Code)



testIncompleteSemanticHoistedContext
public void testIncompleteSemanticHoistedContext() throws Exception(Code)
The following grammar should yield an error that rule 'a' has insufficient semantic info pulled from 'b'.



testIncompleteSemanticHoistedContext2
public void testIncompleteSemanticHoistedContext2() throws Exception(Code)
The following grammar should yield an error that rule 'a' has insufficient semantic info pulled from 'b'. This is the same as the previous case except that the D prevents the B path from "pinching" together into a single NFA state. This test also demonstrates that just because B D could predict alt 1 in rule 'a', it is unnecessary to continue NFA->DFA conversion to include an edge for D. Alt 1 is the only possible prediction because we resolve the ambiguity by choosing alt 1.



testLL_1_Pred
public void testLL_1_Pred() throws Exception(Code)



testLL_2_Pred
public void testLL_2_Pred() throws Exception(Code)



testLeftRecursivePred
public void testLeftRecursivePred() throws Exception(Code)



testLexerMatchesLongestThenTestPred
public void testLexerMatchesLongestThenTestPred() throws Exception(Code)



testMatchesLongestThenTestPred
public void testMatchesLongestThenTestPred() throws Exception(Code)



testORGatedPred
public void testORGatedPred() throws Exception(Code)



testOrPredicates
public void testOrPredicates() throws Exception(Code)



testPredGets2SymbolSyntacticContext
public void testPredGets2SymbolSyntacticContext() throws Exception(Code)



testPredWithArbitraryLookahead
public void testPredWithArbitraryLookahead() throws Exception(Code)



testPredWithK1
public void testPredWithK1() throws Exception(Code)



testPredicatedLoop
public void testPredicatedLoop() throws Exception(Code)



testPredicatedToStayInLoop
public void testPredicatedToStayInLoop() throws Exception(Code)



testPredsButSyntaxResolves
public void testPredsButSyntaxResolves() throws Exception(Code)



testPredsUsedAfterRecursionOverflow
public void testPredsUsedAfterRecursionOverflow() throws Exception(Code)



testTooFewSemanticPredicates
public void testTooFewSemanticPredicates() throws Exception(Code)



testUniquePredicateOR
public void testUniquePredicateOR() throws Exception(Code)
For a DFA state with lots of configurations that have the same predicate, don't just OR them all together as it's a waste to test a||a||b||a||a etc... ANTLR makes a unique set and THEN OR's them together.



Fields inherited from org.antlr.test.BaseTest
final public static String CLASSPATH(Code)(Java Doc)
final public static String jikes(Code)(Java Doc)
final public static String pathSep(Code)(Java Doc)
protected String stderr(Code)(Java Doc)
final public static String tmpdir(Code)(Java Doc)

Methods inherited from org.antlr.test.BaseTest
protected boolean antlr(String fileName, String grammarFileName, String grammarStr, boolean debug)(Code)(Java Doc)
protected boolean compile(String fileName)(Code)(Java Doc)
protected void eraseFiles(String filesEndingWith)(Code)(Java Doc)
protected String execParser(String grammarFileName, String grammarStr, String parserName, String lexerName, String startRuleName, String input, boolean debug)(Code)(Java Doc)
protected String execTreeParser(String parserGrammarFileName, String parserGrammarStr, String parserName, String treeParserGrammarFileName, String treeParserGrammarStr, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, String input)(Code)(Java Doc)
protected String execTreeParser(String parserGrammarFileName, String parserGrammarStr, String parserName, String treeParserGrammarFileName, String treeParserGrammarStr, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, String input, boolean debug)(Code)(Java Doc)
public String getFirstLineOfException()(Code)(Java Doc)
protected void mkdir(String dir)(Code)(Java Doc)
protected Tool newTool()(Code)(Java Doc)
protected String rawExecRecognizer(String parserName, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, boolean parserBuildsTrees, boolean parserBuildsTemplate, boolean debug)(Code)(Java Doc)
protected boolean rawGenerateAndBuildRecognizer(String grammarFileName, String grammarStr, String parserName, String lexerName, boolean debug)(Code)(Java Doc)
protected void writeFile(String dir, String fileName, String content)(Code)(Java Doc)
protected void writeTemplateTestFile(String parserName, String lexerName, String parserStartRuleName, boolean debug)(Code)(Java Doc)
protected void writeTestFile(String parserName, String lexerName, String parserStartRuleName, boolean debug)(Code)(Java Doc)
protected void writeTreeTestFile(String parserName, String treeParserName, String lexerName, String parserStartRuleName, String treeParserStartRuleName, boolean debug)(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.