diff --git a/drools-examples/src/main/resources/org/drools/examples/troubleticketWithDSL/TroubleTicketWithDSL.dslr b/drools-examples/src/main/resources/org/drools/examples/troubleticketWithDSL/TroubleTicketWithDSL.dslr index 0724162fb72..3d3a6d66dec 100644 --- a/drools-examples/src/main/resources/org/drools/examples/troubleticketWithDSL/TroubleTicketWithDSL.dslr +++ b/drools-examples/src/main/resources/org/drools/examples/troubleticketWithDSL/TroubleTicketWithDSL.dslr @@ -1,3 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + package org.drools.examples.troubleticket expander ticketing.dsl diff --git a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/lang/ErrorsParserTest.java b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/lang/ErrorsParserTest.java index 3296e941654..397dc192bdf 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/lang/ErrorsParserTest.java +++ b/drools-test-coverage/test-compiler-integration/src/test/java/org/drools/mvel/compiler/lang/ErrorsParserTest.java @@ -48,14 +48,14 @@ public void testExpanderErrorsAfterExpansion() throws Exception { String name = "expander_post_errors.dslr"; Expander expander = new DefaultExpander(); String expanded = expander.expand( this.getReader( name ) ); - + DRLParser parser = parse( name, expanded ); parser.compilationUnit(); assertThat(parser.hasErrors()).isTrue(); assertThat(parser.getErrors().size()).isEqualTo(1); DroolsParserException err = parser.getErrors().get(0); - assertThat(err.getLineNumber()).isEqualTo(6); + assertThat(err.getLineNumber()).isEqualTo(7); } @Test diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/dsl/test_expansion.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/dsl/test_expansion.dslr index a2a7d74a9d6..bea217a6aa3 100755 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/dsl/test_expansion.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/dsl/test_expansion.dslr @@ -1,4 +1,22 @@ -# Example DRL with expansion +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +# Example DRL with expansion # (ie "domain specific language") # declare expanders for domain specific and natural language extensions diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_line_errors.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_line_errors.dslr index 23eb4caf3fd..d6f5e7ddf10 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_line_errors.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_line_errors.dslr @@ -1,3 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + #this will show error line numbers due to failure to expand package expanderFoo diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints.dslr index cfb3bdf78b9..3d520dd6eef 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints.dslr @@ -1,3 +1,22 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + //created on: 13/04/2006 package mydsl diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints_flush.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints_flush.dslr index f352d9196fa..329f3b1addc 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints_flush.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_multiple_constraints_flush.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ //created on: 13/04/2006 package mydsl diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_post_errors.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_post_errors.dslr index e57ce42eccc..ccc97d2d9d5 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_post_errors.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_post_errors.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ //this will show error line numbers post expansion expander foo.dsl diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_spread_lines.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_spread_lines.dslr index 02ae6b5bcca..4e2ccc15ac1 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_spread_lines.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/compiler/lang/expander_spread_lines.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ //created on: 13/04/2006 package mydsl diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl.dslr index d38e5dfcd19..6045cc2a5a2 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package test // must be in the following order. diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl_more.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl_more.dslr index 6e58f5c977a..be3ef2d8bdd 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl_more.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_dsl_more.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package test // must be in the following order. diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_multiline.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_multiline.dslr index 287f88821f0..3e76a7dcd07 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_multiline.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/rule_with_expander_multiline.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ Add 2 percent to all Red cars diff --git a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_dslWithIndividualConstraints.dslr b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_dslWithIndividualConstraints.dslr index f0248a49998..f42217a3838 100644 --- a/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_dslWithIndividualConstraints.dslr +++ b/drools-test-coverage/test-compiler-integration/src/test/resources/org/drools/mvel/integrationtests/test_dslWithIndividualConstraints.dslr @@ -1,3 +1,21 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ package org.drools.mvel.compiler global java.util.List results