Alexandre,

I'm trying the IDE now to check for possible remaining problems, but
looking quite good so far.
Added one test to your DRLIncompleteCodeTest that generates a fatal
error on a simple rule fragment:

        public void testIncompleteCode12() throws DroolsParserException,
RecognitionException {
                String input =
                        "package a.b.c " +
                        "import a.b.c.* " +
                        "rule MyRule" +
                        "  when " +
                        "    m: Message(  ) " +
                        "    " +
                        "  then" +
                        "end ";
                DrlParser parser = new DrlParser();
                PackageDescr descr = parser.parse(true, input);
                assertNotNull(descr);
                assertEquals("a.b.c", descr.getNamespace());
                assertEquals("a.b.c.*", ((ImportDescr)
descr.getImports().get(0)).getTarget());
        }
        
org.drools.compiler.DroolsParserException: Unknown error while
parsing. This is a bug. Please contact the Development team.
        at org.drools.compiler.DrlParser.compile(DrlParser.java:208)

If I remove the m: the error no longer appears.  Could you take a look?
I'll keep you updated if I find any more problems.

Kris

On Tue, Sep 2, 2008 at 5:10 AM, Alexandre Porcelli
<[EMAIL PROTECTED]> wrote:
> Hello All,
>
>  I made some changes on DrlParser, now all the previus parse methods
> signatures has a new one: adding a boolean in front of each signature.
>  What daes this booleans means? If this boolean is setted to true, it
> activates the parse in editor-mode. Editor-mode is focused on editor
> integration and it is not well optimized.
>  So unless you need editor information (like : Location and partial
> Descrs) you should not use the editor-mode.
>
> Kris:
>  I could provide you additional information for well formed sentences,
> but in most cases it just returns Descrs before the first syntax
> problem. Check this tes for a better reference on how to use this new
> editor-mode: 
> https://svn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-compiler/src/test/java/org/drools/lang/DRLIncompleteCodeTest.java
>
> []s
> Alexandre Porcelli
>
_______________________________________________
rules-dev mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-dev

Reply via email to