Marpa brings back the feeling of being as a child listening to my father 
giving a lecture to a graduate class in partial differential equations - I 
could see the x's the y's but how things work were far beyond my 
comprehension. I'm sure my head would be a lot less sore and Jeffrey richer 
if instead of bouncing my head against the wall I were to donate another 
collar but I am hardly the Duke of Brunswick-Lüneburg.
(Maybe I should just say "I'm just too stupid!", give up and see if I can 
successfully twiddle my thumbs.) 

 
The data consists of (physical) lines terminated by a newline. A line may 
be:
 1) <name> = <boolean>
 2) '/'<regexp>'/' = <boolean>
Comments begin with '--' and are end of line type comments.

Shouldn't I be able to say that anything else is an error? ie:

    :default ::= action => [values]
    lexeme default = latm => 1
    :start ::= lines
    lines ::= line+
    line  ::= <name> ('=') <boolean> (NEWLINE) action => doName
            | ('/') <regexp> ('/') ('=') <boolean> (NEWLINE) action => 
doRegexp
    # would like the following to catch everything else
           || <bad stuff> (NEWLINE) action => doError rank => -1
    #

    <name>    ~ <unquoted name> | <quoted name>
    <unquoted name> ~ ALPHA  | ALPHA ALPHANUMERICS
    <quoted name> ~ '"' <quoted name body> '"'
    <quoted name body> ~ [\w]+            # for now

    <regexp> ~ [$(|)\w^]+

    #
    <bad stuff> ~ ANYTHING+
    #

    <boolean>   ~ TRUE | FALSE
    FALSE       ~ 'FALSE':i | 'F':i | '0'
    TRUE        ~ 'TRUE':i | 'T':i |'1'

    ALPHA         ~ [a-z]:i
    ALPHANUMERICS ~ [\w]*

    :discard       ~ COMMENT
    COMMENT        ~ '--' <comment body>
    <comment body> ~ ANYTHING*

    ANYTHING       ~ [^\x{A}\x{B}\x{C}\x{D}\x{2028}\x{2029}]
    :discard       ~ WHITESPACE
    WHITESPACE     ~ [ \t]+

    NEWLINE        ~ [\n]

CAVEAT: <name> is going to be an Oracle identifier and they are weird!

-- 
You received this message because you are subscribed to the Google Groups 
"marpa parser" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/marpa-parser/d07a1e10-3244-4899-b73f-ba7deb0369e7n%40googlegroups.com.

Reply via email to