[jacorb-bugs] [Bug 933] New: jacidl fails when having '#' character inside string in included idl files
bugzilla-daemon at jacorb.org
bugzilla-daemon at jacorb.org
Wed Oct 17 15:24:15 CEST 2012
http://www.jacorb.org/cgi-bin/bugzilla/show_bug.cgi?id=933
Summary: jacidl fails when having '#' character inside string in
included idl files
Product: JacORB
Version: 3.1
Platform: All
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: IDL compiler
AssignedTo: jacorb-bugs at lists.spline.inf.fu-berlin.de
ReportedBy: kuba.gasiorowski at computaris.com
Hello,
according to the IDL standard, the #... is interpreted as a preprocessor
directive only if is the first character (excluding spaces) in the line:
'Lines beginning with # (also called "directives") communicate with this
preprocessor. White space may appear before the #.'
jacidl fails when processing files which contains the string like:
const string<100> structs1_str = "@(#)base0 2012/10/17" ;
in nested IDL files (in single files error does not occur), trying wrongly
interpret the string after '#' as preprocessor directive:
[jacidl] processing idl file: c:\Apps\jacidl_bug\base0.idl
[jacidl] processing idl file: c:\Apps\jacidl_bug\base1.idl
[jacidl] processing idl file: c:\Apps\jacidl_bug\structs0.idl
[jacidl] processing idl file: c:\Apps\jacidl_bug\structs1.idl
[jacidl] 2012-10-17 15:18:27 org.jacorb.idl.util.IDLLogger error
[jacidl] SEVERE: C:\Apps\jacidl_bug\base0.idl, line: 4(41): Unrecognized
preprocessor directive )base0
[jacidl] const string<100> base0_str = "@(#)base0
[jacidl] 2012-10-17 15:18:27 org.jacorb.idl.util.IDLLogger error
[jacidl] SEVERE: c:\Apps\jacidl_bug\structs1.idl, line: 69(1): 1 error(s).
[jacidl]
BUILD FAILED
c:\Apps\jacidl_bug\build.xml:18: org.jacorb.idl.ParseException: Parse error :
Lexer errors
at org.jacorb.idl.CUP$actions.CUP$do_action(parser.java:4345)
at org.jacorb.idl.parser.do_action(parser.java:990)
at org.jacorb.idl.runtime.lr_parser.parse(lr_parser.java:531)
at org.jacorb.idl.JacIDL.execute(JacIDL.java:502)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:392)
at org.apache.tools.ant.Target.performTasks(Target.java:413)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
at org.apache.tools.ant.Main.runBuild(Main.java:811)
at org.apache.tools.ant.Main.startAnt(Main.java:217)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Total time: 0 seconds
2012-10-17 15:18:27 org.jacorb.idl.util.IDLLogger error
SEVERE: C:\Apps\jacidl_bug\base0.idl, line: 4(41): Unrecognized preprocessor
directive )base0
const string<100> base0_str = "@(#)base0
2012-10-17 15:18:27 org.jacorb.idl.util.IDLLogger error
SEVERE: c:\Apps\jacidl_bug\structs1.idl, line: 69(1): 1 error(s).
I haven't found any workaround except of removing '#' from the strings.
Sample IDL files to reproduce the error attached.
--
Configure bugmail: http://www.jacorb.org/cgi-bin/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
More information about the jacorb-bugs
mailing list