Skip to main content

From Ambiguous Regular Expressions to Deterministic Parsing Automata

  • Conference paper
  • First Online:
Implementation and Application of Automata (CIAA 2015)

Part of the book series: Lecture Notes in Computer Science ((LNTCS,volume 9223))

Included in the following conference series:

Abstract

This new parser generator for ambiguous regular expressions (RE) formally extends the Berry-Sethi (BS) algorithm into a finite-state device that specifies the syntax tree(s). We extend the local testability property of the marked RE’s from terminal strings to linearized syntax trees. The generator supports disambiguation, i.e., selecting a preferred tree in case of ambiguity. The selection is parametric with respect to the Greedy or POSIX criterion. The parser is proved correct and has linear-time complexity. The generator is available as an interactive SW tool (on GitHub - see http://github.com/breveglieri/ebs/README).

Work partially supported by PRIN “Automi e Linguaggi Formali”, Italy.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Allauzen, C., Mohri, M.: A unified construction of the glushkov, follow, and antimirov automata. In: Královič, R., Urzyczyn, P. (eds.) MFCS 2006. LNCS, vol. 4162, pp. 110–121. Springer, Heidelberg (2006)

    Chapter  Google Scholar 

  2. Berry, G., Sethi, R.: From regular expressions to deterministic automata. Theor. Comput. Sci. 48(1), 117–126 (1986)

    Article  MathSciNet  MATH  Google Scholar 

  3. Berstel, J., Pin, J.E.: Local languages and the Berry-Sethi algorithm. Theor. Comput. Sci. 155(2), 439–446 (1996)

    Article  MathSciNet  MATH  Google Scholar 

  4. Book, R., Even, S., Greibach, S., Ott, G.: Ambiguity in graphs and expressions. IEEE Trans. on Comp. C-20(2), 149–153 (1971)

    Google Scholar 

  5. Breveglieri, L., Crespi Reghizzi, S., Morzenti, A.: Shift-reduce parsers for transition networks. In: Dediu, A.-H., Martín-Vide, C., Sierra-Rodríguez, J.-L., Truthe, B. (eds.) LATA 2014. LNCS, vol. 8370, pp. 222–235. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

  6. Dubè, D., Feeley, M.: Efficiently building a parse tree from a regular expression. Acta Inf. 37(2), 121–144 (2000)

    Article  MATH  Google Scholar 

  7. Frisch, A., Cardelli, L.: Greedy regular expression matching. In: Díaz, J., Karhumäki, J., Lepistö, A., Sannella, D. (eds.) ICALP 2004. LNCS, vol. 3142, pp. 618–629. Springer, Heidelberg (2004)

    Chapter  Google Scholar 

  8. IEEE: std. 1003.2, POSIX, regular expression notation, section 2.8 (1992)

    Google Scholar 

  9. Okui, S., Suzuki, T.: Disambiguation in regular expression matching via position automata with augmented transitions. In: Domaratzki, M., Salomaa, K. (eds.) CIAA 2010. LNCS, vol. 6482, pp. 231–240. Springer, Heidelberg (2011)

    Chapter  Google Scholar 

  10. Sakarovitch, J.: Elements of Automata Theory. Cambridge University Press, New York (2009)

    Book  MATH  Google Scholar 

  11. Sulzmann, M., Lu, K.Z.M.: POSIX regular expression parsing with derivatives. In: Codish, M., Sumii, E. (eds.) FLOPS 2014. LNCS, vol. 8475, pp. 203–220. Springer, Heidelberg (2014)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefano Crespi Reghizzi .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2015 Springer International Publishing Switzerland

About this paper

Cite this paper

Borsotti, A., Breveglieri, L., Crespi Reghizzi, S., Morzenti, A. (2015). From Ambiguous Regular Expressions to Deterministic Parsing Automata. In: Drewes, F. (eds) Implementation and Application of Automata. CIAA 2015. Lecture Notes in Computer Science(), vol 9223. Springer, Cham. https://doi.org/10.1007/978-3-319-22360-5_4

Download citation

  • DOI: https://doi.org/10.1007/978-3-319-22360-5_4

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-22359-9

  • Online ISBN: 978-3-319-22360-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics