Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Solaris 8: USB and modem support

807559May 23 2001 — edited May 27 2001
Does Solaris 8 IA support USB modems? And if so, what do I have to do to make Solaris talk to my modem using the USB connector?

Thank you!

Dirk

Comments

Answer

PlSqlCustom3:

( [node^) function_call

| [node^) datetime_literal

| [node^) function_expression

) & ?node = 'TO_DATE'

& ([arg) expr

| [arg) string_literal

| [arg) pls_expr )

& node^ < arg

& [arg+1) ')'

& [arg-1) '('

;

To work out a problem like this it is better to start with expanded parse tree in the structure panel

datetime_literal_parse_tree.png

Witness the parse tree branches of interest highlighted in orange. Apparently, the parser hasn't been consistent, and in all three TO_DATE calls has been recognized differently. This is why we have to use disjunction. Our first query attempt then is:

AllFunctionCalls:

( [node) function_call

| [node) datetime_literal

| [node) function_expression

) ;

Next, we want only TO_DATE calls which, and the function call name is the child of the node that we just have identified. At this point we could have introduced another attribute, but I have chosen to reidentify the node with TO_DATE, and make the parent to be a function call:

AllToDateCalls:

( [node^) function_call

| [node^) datetime_literal

| [node^) function_expression

) & ?node = 'TO_DATE'

;

Next, we have to introduce the second attribute -- arg, and, again, the grammar payload is different in 3 cases. More important, how to connect these two attributes, the node and the arg? It is ancestor-descendant relation, more specifically the closest ancestor-descendant. It is described at page 12 of

https://vadimtropashko.files.wordpress.com/2019/05/arbori-1.pdf

Actually, since we renamed the node to be the function call name only, it is the parent -- node^ -- which is the ancestor of the arg.

The final condition is that a single argument of the TO_DATE function call would have the open and closed parenthesis as sibling parse tree nodes. The result:

datetime_literal_syntax_colors.png

Marked as Answer by Mike Kutz · Sep 27 2020
1 - 1
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 24 2001
Added on May 23 2001
1 comment
105 views