Skip to content

heartleth/Lan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1f64ff6 · Jan 18, 2024

History

47 Commits
Oct 9, 2023
Oct 9, 2023
Jul 31, 2022
Oct 6, 2023
Oct 6, 2023
Jan 18, 2024

Repository files navigation

LAN 표기법

PART NaturalNumber
    # :n | explaination of nth parameter (zero-based)
    # comment
    
    # production rule
    RULE number     *numeric ?$NaturalNumber
    
    # *category : category's vocabulary in dictionary file
    # $NonTerminalSymbol
    # ?*category, ?$Sym : can be omitted
    # [:n=foo]*category, [:n=foo]$Sym : only activated when nth parameter is same with 'foo'. 
    # $Symbol( param1 param2 ) : nonterminal symbol with parameters, whitespace separated, default "0"
    
    # if, unless statement
    IF :parameter value
        RULE ... ......
    END
    IF :parameter ~ match_value1 match_value2 match_value3
        RULE ... ......
    END
    UNLESS :parameter value
        RULE ... ......
    END
    
    # grammer alias
    SET zerozero 0-terminal_symbol_zero 0-terminal_symbol_zero
    
    RULE hundred    1-one %zerozero
END

GNE에 따로 구현되어 있는 코드가 더 잘 작동합니다.