Multiple Lexicalisation (A Java']Java Based Study)

被引:1
|
作者
Scott, Elizabeth [1 ]
Johnstone, Adrian [1 ]
机构
[1] Royal Holloway Univ London, Comp Sci, Egham, Surrey, England
基金
英国工程与自然科学研究理事会;
关键词
lexicalisation; generalised parsing; syntax analysis;
D O I
10.1145/3357766.3359532
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
We consider the possibility of making the lexicalisation phase of compilation more powerful by avoiding the need for the lexer to return a single token string from the input character string. This has the potential to empower language design by softening the boundaries between lexical and phrase level specification. The large number of lexicalisations makes it impractical to parse each one individually, but it is possible to share the parsing of common subparts, reducing the number of tokens parsed from the product of the token numbers associated with the components to their sum. We report total numbers of lexicalisations of example Java strings, and the impact on these numbers of various lexical disambiguation strategies, and we introduce a new generalised parsing technique that can efficiently parse multiple lexicalisations of character string simultaneously. We then use this technique on Java, reporting on the number of lexicalisations that correspond to syntactically correct Java strings and the degree to which the standard Java lexer is safe in the sense that it does not remove all the syntactically correct lexicalisations of an input character string. Our multi-lexer parser is an alternative to scannerless parsing of a character level grammar, retaining the separation between grammar terminals and the corresponding lexical tokens. This has the advantages of allowing the parser to use terminal level lookahead and keeping lexical level disambiguation separate from the context free grammar.
引用
收藏
页码:71 / 82
页数:12
相关论文
共 50 条
  • [1] The effect of multiple developers on structural attributes: A Study based on java']java software
    Capiluppi, Andrea
    Ajienka, Nemitari
    Counsell, Steve
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2020, 167 (167)
  • [2] On multiple inheritance in Java']Java
    Bettini, L
    Loreti, M
    Venneri, B
    [J]. TECHNOLOGY OF OBJECT-ORIENTED LANGUAGES, SYSTEMS AND ARCHITECTURES, 2003, 732 : 1 - 15
  • [3] Simulating multiple inheritance in Java']Java
    Tempero, E
    Biddle, R
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2000, 55 (01) : 87 - 100
  • [4] Simulating multiple inheritance in Java']Java
    Lyon, D
    [J]. CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2002, 14 (12): : 987 - 1008
  • [5] The Study of WeChat Marketing System Based on Java']Java EE
    Zhao, Jiantao
    Liu, Hongyan
    [J]. INTERNATIONAL CONFERENCE ON COMPUTATIONAL AND INFORMATION SCIENCES (ICCIS 2014), 2014, : 864 - 869
  • [6] Java']Java Cyber class - Java']Java multimedia study hall
    Diehl, S
    [J]. BYTE, 1997, 22 (09): : 30 - 30
  • [7] A Study of Java']Java's Non-Java']Java Memory
    Ogata, Kazunori
    Mikurube, Dai
    Kawachiya, Kiyokuni
    Trent, Scott
    Onodera, Tamiya
    [J]. ACM SIGPLAN NOTICES, 2010, 45 (10) : 191 - 204
  • [8] Implementing multiple protection domains in Java']Java
    Hawblitzel, C
    Chang, CC
    Czajkowski, G
    Hu, DY
    von Eicken, T
    [J]. PROCEEDINGS OF THE USENIX 1998 ANNUAL TECHNICAL CONFERENCE, 1998, : 259 - 270
  • [9] Simulating multiple inheritance and generics in Java']Java
    Thirunarayan, K
    Kniesel, G
    Hampapuram, H
    [J]. COMPUTER LANGUAGES, 1999, 25 (04): : 189 - 210
  • [10] Chips based on Java']Java
    不详
    [J]. COMPUTER DESIGN, 1996, 35 (08): : 14 - &